-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loading: provide code for reifying a load-path lookup result #37632
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does indeed seem useful to have!
base/loading.jl
Outdated
@@ -227,7 +251,7 @@ function locate_package(pkg::PkgId, cache::TOMLCache=TOMLCache())::Union{Nothing | |||
return implicit_manifest_uuid_path(env, pkg, cache) | |||
end | |||
@assert found.uuid !== nothing | |||
return locate_package(found, cache) # restart search now that we know the uuid for pkg | |||
return locate_package(found, cache) # restart search now that we know the uuid for pkg (TODO: the existence of this line of code is probably a bug) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this line feels strange to me too.
@@ -371,6 +425,7 @@ end | |||
|
|||
# given a directory (implicit env from LOAD_PATH) and a name, | |||
# check if it is an implicit package | |||
# TODO: aren't we supposed to first check for the Project file first and see if it declares a path? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path entry in Project
the project file seems to me like a bit of an experiment that turned out to be unused. Pkg doesn't know about it for example.
uuid === nothing && continue | ||
if UUID(uuid) === where.uuid | ||
found_where = true | ||
# deps is either a list of names (deps = ["DepA", "DepB"]) or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could some of this code be shared with explicit_manifest_deps_get
?
In what way did you imagine passing this information to worker. |
This doesn’t need either form. It’s just a trivial key/value store with a tiny, well-defined set of pairs. We actually already deal with these, just only sending a large subset of them instead of all. |
8116c50
to
7f66398
Compare
Rebased |
Allows asking (and storing) queries about what total set of modules might need to be loaded, before starting any load work.
7f66398
to
8d13cd0
Compare
@KristofferC is this PR still of any interest? |
This allows asking (and storing) queries about what total set of modules might need to be loaded, before starting any load work. This is base work for later working on #28781, so we might add additional information later (such as folding
concrete_deps
into it?). This is intended to allow us to pass around the dependency list explicitly, so that worker processes (such as during module loading, precompile, Distributed, and so on) can be isolated from the implicit and mutable LOAD_PATH and Project file parts of the system, once a load is triggered by a toplevelusing
orcachecompile
call.