Strip trailing slashes in JULIA_DEPOT_PATH
when embedding @depot
#51892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new relocatable cache file work uses simple text substitution when stripping out the depot from a cache file's paths, and when substituting it in again over the
@depot
marker. However, if a user starts julia withJULIA_DEPOT_PATH=/opt/foo/
, the embedded path forFoo.jl
's includes list will look like@depotpackages/Foo/XYZ/src/Foo.jl
, and if the user then usesJULIA_DEPOT_PATH=/opt/foo
(which should be equivalent) the cache file will fail to load with the message:This commit standardizes the serialization format to always contain a trailing
pathsep()
, so that textual substitution is more likely to work regardless of slightly-inconsistentJULIA_DEPOT_PATH
settings.