@@ -388,7 +388,7 @@ function project_file_name_uuid_path(project_file::String,
388
388
uuid = dummy_uuid (project_file)
389
389
path = joinpath (" src" , " $name .jl" )
390
390
for line in eachline (io)
391
- contains (line, re_section ) && break
391
+ isfound (re_section, line ) && break
392
392
if (m = match (re_name_to_string, line)) != nothing
393
393
name = String (m. captures[1 ])
394
394
elseif (m = match (re_uuid_to_string, line)) != nothing
@@ -407,7 +407,7 @@ function project_file_manifest_path(project_file::String)::Union{Nothing,String}
407
407
open (project_file) do io
408
408
dir = abspath (dirname (project_file))
409
409
for line in eachline (io)
410
- contains (line, re_section ) && break
410
+ isfound (re_section, line ) && break
411
411
if (m = match (re_manifest_to_string, line)) != nothing
412
412
return normpath (joinpath (dir, m. captures[1 ]))
413
413
end
@@ -494,9 +494,9 @@ function explicit_project_deps_get(project_file::String, name::String)::Union{Bo
494
494
state = :top
495
495
for line in eachline (io)
496
496
if state == :top
497
- if contains (line, re_section )
497
+ if isfound (re_section, line )
498
498
root_name == name && return root_uuid
499
- state = contains (line, re_section_deps ) ? :deps : :other
499
+ state = isfound (re_section_deps, line ) ? :deps : :other
500
500
elseif (m = match (re_name_to_string, line)) != nothing
501
501
root_name = String (m. captures[1 ])
502
502
elseif (m = match (re_uuid_to_string, line)) != nothing
@@ -506,7 +506,7 @@ function explicit_project_deps_get(project_file::String, name::String)::Union{Bo
506
506
if (m = match (re_key_to_string, line)) != nothing
507
507
m. captures[1 ] == name && return UUID (m. captures[2 ])
508
508
end
509
- elseif contains (line, re_section )
509
+ elseif isfound (re_section, line )
510
510
state = :deps
511
511
end
512
512
end
@@ -524,7 +524,7 @@ function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::St
524
524
uuid = deps = nothing
525
525
state = :other
526
526
for line in eachline (io)
527
- if contains (line, re_array_of_tables )
527
+ if isfound (re_array_of_tables, line )
528
528
uuid == where && break
529
529
uuid = deps = nothing
530
530
state = :stanza
@@ -533,9 +533,9 @@ function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::St
533
533
uuid = UUID (m. captures[1 ])
534
534
elseif (m = match (re_deps_to_any, line)) != nothing
535
535
deps = String (m. captures[1 ])
536
- elseif contains (line, re_subsection_deps )
536
+ elseif isfound (re_subsection_deps, line )
537
537
state = :deps
538
- elseif contains (line, re_section )
538
+ elseif isfound (re_section, line )
539
539
state = :other
540
540
end
541
541
elseif state == :deps && uuid == where
@@ -551,7 +551,7 @@ function explicit_manifest_deps_get(manifest_file::String, where::UUID, name::St
551
551
@warn " Unexpected TOML deps format:\n $deps "
552
552
return nothing
553
553
end
554
- contains (deps, repr (name)) || return true
554
+ isfound ( repr (name), deps ) || return true
555
555
seekstart (io) # rewind IO handle
556
556
manifest_file_name_uuid (manifest_file, name, io)
557
557
end
0 commit comments