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.
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
relocation: account for trailing path separator in depot paths #55355
relocation: account for trailing path separator in depot paths #55355
Changes from all commits
01d11e9
cba4a7e
8dcf3d6
d03ff12
8c6d7db
0174e43
b600a62
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
In many cases, Windows accepts
/
as a path separator - is there any risk of that appearing here?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.
oh, I did not know that.
I pushed a fix with an accompanying test.
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.
Thanks! The replace isn't safe for UNC paths (it destroys double slashes
\\
), but maybe we don't support those?https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#example-ways-to-refer-to-the-same-file shows some exotic ways to build paths on Windows, in case we do. The Base path functionality uses
splitdrive
to get the UNC, etc. prefixes out of the way.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.
I now settled to just use
abspath
to normalize both.That should also increase the accuracy in matching depots in cases where one is an absolute and the other a relative one.
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.
I traced back the use of
replace_depot_path
and found that these issues should already be taken care of.In particular,
path
argument will be absolute and normalized when it arrives, which happens atbase/loading.jl:_include_dependency
,DEPOT_PATH
also went throughabspath
before they are handed over to precompilation, seebase/loading.jl:create_expr_cache
.So I will revert changes related to this and make the tests pass again.
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.
Right before spawning the precompilation process, here
julia/base/loading.jl
Line 2812 in f2f76d8
Shouldn't
--output-ji
hit that too?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.
That's something that spawns a process with
--output-ji
not the other way aroundThere 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.
I am sorry, I don't understand.
Where would be the entry point for what you describe?
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.
Ah, my point is that it's legal to spawn Julia with
--output-ji
outside of the spawning that precompilation does, and in that case the DEPOT_PATH may not be normalizedThere 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.
Ok, I see. Indeed, that's problematic.