loading: provide code for reifying a load-path lookup result#37632
loading: provide code for reifying a load-path lookup result#37632
Conversation
KristofferC
left a comment
There was a problem hiding this comment.
This does indeed seem useful to have!
base/loading.jl
Outdated
| 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.
Yeah, this line feels strange to me too.
|
|
||
| # 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.
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.
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_depsinto 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 toplevelusingorcachecompilecall.