julia icon indicating copy to clipboard operation
julia copied to clipboard

relocation: account for trailing path separator in depot paths

Open fatteneder opened this issue 1 year ago • 4 comments

Fixes #55340

fatteneder avatar Aug 02 '24 21:08 fatteneder

Seems like something is not good right now:

ERROR: LoadError: ArgumentError: embedded NULs are not allowed in C strings: "/cache/build/builder-amdci5-4/julialang/julia-master/\0+\x16,\xe1v\xe4\xf0\xb8.L=\xdaK3\x89\xf4StyledStrings

KristofferC avatar Aug 10 '24 12:08 KristofferC

Windows now chokes on abspath and complains about an invalid character:

Base.InvalidCharError{Char}(char=Char(0xc6000000))
throw_invalid_char at .\char.jl:93
UInt32 at .\char.jl:140 [inlined]
convert at .\char.jl:192 [inlined]
cconvert at .\essentials.jl:675 [inlined]
lowercase at .\strings\unicode.jl:294 [inlined]
map at .\strings\basic.jl:667
lowercase at .\strings\unicode.jl:636 [inlined]
abspath at .\path.jl:452
replace_depot_path at .\loading.jl:3126

Any idea what that could be?

fatteneder avatar Aug 10 '24 17:08 fatteneder

abspath does not always preserve being a path to the same file (except usually on Windows), so generally is not correct to use compared to other alternatives

vtjnash avatar Aug 10 '24 18:08 vtjnash

this should be good to go now

fatteneder avatar Aug 13 '24 18:08 fatteneder

@topolarity @giordano @gbaraldi bump for approval

IanButterworth avatar Sep 19 '24 14:09 IanButterworth

@topolarity this should be addressed by the abspath call I added

fatteneder avatar Sep 20 '24 21:09 fatteneder

https://github.com/JuliaLang/julia/issues/55850 makes me nervous about relying on abspath for this

topolarity avatar Sep 25 '24 21:09 topolarity

I see what you mean, but I would address that in a separate PR.

Pkgimage compilation has been using abspath so far without problems. Adding normalize_depots_for_relocation just extends this to user provided --output-ji.

fatteneder avatar Sep 26 '24 20:09 fatteneder