forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
include()
and include_dependency()
files to resolve to diff…
…erent depots (JuliaLang#52750) Fixes JuliaLang#52161 JuliaLang#52161 is an awkward use of the relocation feature in the sense that it attempts to load the `include()` and `include_dependency` files of a pkg from two separate depots. The problem there is that the value with which we replace the `@depot` tag for both `include()` and `include_dependency()` files is determined by trying to relocate only the `include()` files. We then end up not finding the `include_dependency()` files. Solution: @staticfloat noted that the pkg slugs in depot paths like `@depot/packages/Foo/1a2b3c/src/Foo.jl` are already enough to (weakly) content-address a depot. This means that we should be able to load any `include()` file of a pkg from any `depot` that contains a precompile cache, provided the hashes match. The same logic can be extended to `include_dependency()` files, which this PR does. Note that we continue to use only one file from the `include()` files to determine the depot which we use to relocate all `include()` files. [this behavior is kept from master] But for `include_dependency()` files we allow each file to resolve to a different depot. This way the MWE given in JuliaLang#52161 should be extendable to two README files being located in two different pkgs that lie in two different depots. --- Side note: JuliaLang#49866 started with explicitly verifying that all `include()` files come from the same depot. In JuliaLang#52346 this was already relaxed to pick the first depot for which any `include()` file can be resolved to. This works, because if any other file might be missing from that depot then this is caught in `stalecache()`.
- Loading branch information
1 parent
8dc2c30
commit 55113b5
Showing
4 changed files
with
128 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters