relocation: account for trailing path separator in depot paths
Fixes #55340
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
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?
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
this should be good to go now
@topolarity @giordano @gbaraldi bump for approval
@topolarity this should be addressed by the abspath call I added
https://github.com/JuliaLang/julia/issues/55850 makes me nervous about relying on abspath for this
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.