Skip to content

Commit fa4aa59

Browse files
committed
get rid of some non-needed code
1 parent c0f5403 commit fa4aa59

File tree

1 file changed

+0
-57
lines changed

1 file changed

+0
-57
lines changed

base/loading.jl

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,6 @@ function manifest_deps_get(env::String, where::PkgId, name::String)::Union{Nothi
563563
pkg_uuid = explicit_project_deps_get(project_file, name)
564564
return PkgId(pkg_uuid, name)
565565
end
566-
# Check for this being a dependency to a glue module
567-
# glue_dep = project_file_gluedeps_get(project_file, where, name)
568-
# glue_dep === nothing || return glue_dep
569566
# look for manifest file and `where` stanza
570567
return explicit_manifest_deps_get(project_file, where, name)
571568
elseif project_file
@@ -583,10 +580,6 @@ function manifest_uuid_path(env::String, pkg::PkgId)::Union{Nothing,String,Missi
583580
# if `pkg` matches the project, return the project itself
584581
return project_file_path(project_file)
585582
end
586-
# Only used when the project is loading the glue pkg itself
587-
# which is currently not supported
588-
# mby_glue = project_file_glue_path(project_file, pkg.name)
589-
# mby_glue === nothing || return mby_glue
590583
# look for manifest file and `where` stanza
591584
return explicit_manifest_uuid_path(project_file, pkg)
592585
elseif project_file
@@ -605,40 +598,6 @@ function project_file_name_uuid(project_file::String, name::String)::PkgId
605598
return PkgId(uuid, name)
606599
end
607600

608-
function project_file_gluedeps_get(project_file::String, where::PkgId, name::String)
609-
d = parsed_toml(project_file)
610-
glue = get(d, "gluepkgs", nothing)::Union{Dict{String, Any}, Nothing}
611-
project_id = project_file_name_uuid(project_file, "")
612-
if glue !== nothing && where.uuid == uuid5(project_id.uuid, where.name)
613-
gluedeps = get(glue, where.name, nothing)::Union{Nothing, String, Vector{String}}
614-
if gluedeps !== nothing
615-
if gluedeps isa String && name == gluedeps ||
616-
gluedeps isa Vector{String} && name in gluedeps
617-
gluedepses = get(d, "gluedeps", nothing)::Union{Dict{String, Any}, Nothing}
618-
return PkgId(UUID(gluedepses[name]::String), name)
619-
end
620-
# Fall back to normal rules for loading a dep for a a package
621-
return identify_package(project_id, name)
622-
end
623-
end
624-
return nothing
625-
end
626-
627-
function project_file_glue_path(project_file::String, name::String)
628-
d = parsed_toml(project_file)
629-
p = project_file_path(project_file)
630-
glue = get(d, "gluepkgs", nothing)::Union{Dict{String, Any}, Nothing}
631-
if glue !== nothing
632-
if name in keys(glue)
633-
gluefile = joinpath(p, "glue", name * ".jl")
634-
isfile(gluefile) && return gluefile
635-
gluefiledir = joinpath(p, "glue", name, name * ".jl")
636-
isfile(gluefiledir) && return gluefiledir
637-
end
638-
end
639-
return nothing
640-
end
641-
642601
function project_file_path(project_file::String)
643602
d = parsed_toml(project_file)
644603
joinpath(dirname(project_file), get(d, "path", "")::String)
@@ -730,16 +689,6 @@ function explicit_project_deps_get(project_file::String, name::String)::Union{No
730689
uuid = get(deps, name, nothing)::Union{String, Nothing}
731690
uuid === nothing || return UUID(uuid)
732691
end
733-
734-
#=
735-
# Unclear if this is needed
736-
glue = get(d, "gluepkgs", nothing)::Union{Dict{String, Any}, Nothing}
737-
if glue !== nothing
738-
if name in keys(glue)
739-
return uuid5(uuid_project, name)
740-
end
741-
end
742-
=#
743692
return nothing
744693
end
745694

@@ -783,12 +732,6 @@ function explicit_manifest_deps_get(project_file::String, where::PkgId, name::St
783732
uuid === nothing && continue
784733
if UUID(uuid) === where.uuid
785734
found_where = true
786-
gluepkgs = get(entry, "gluepkgs", nothing)::Union{Nothing, Dict{String, Any}}
787-
if gluepkgs !== nothing
788-
if name in keys(gluepkgs)
789-
return PkgId(uuid5(where.uuid, name), name)
790-
end
791-
end
792735
# deps is either a list of names (deps = ["DepA", "DepB"]) or
793736
# a table of entries (deps = {"DepA" = "6ea...", "DepB" = "55d..."}
794737
deps = get(entry, "deps", nothing)::Union{Vector{String}, Dict{String, Any}, Nothing}

0 commit comments

Comments
 (0)