File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,28 @@ function maybe_fix_path(file)
359359 file = normpath (newfile)
360360 end
361361 end
362- return Base. fixup_stdlib_path (file)
362+ return maybe_fixup_stdlib_path (file)
363+ end
364+
365+ safe_isfile (x) = try isfile (x); catch ; false end
366+ const BUILDBOT_STDLIB_PATH = dirname (abspath (String ((@which uuid1 ()). file), " .." , " .." , " .." ))
367+ replace_buildbot_stdlibpath (str:: String ) = replace (str, BUILDBOT_STDLIB_PATH => Sys. STDLIB)
368+ """
369+ path = maybe_fixup_stdlib_path(path::String)
370+
371+ Return `path` corrected for julia issue [#26314](https://github.com/JuliaLang/julia/issues/26314) if applicable.
372+ Otherwise, return the input `path` unchanged.
373+
374+ Due to the issue mentioned above, location info for methods defined one of Julia's standard libraries
375+ are, for non source Julia builds, given as absolute paths on the worker that built the `julia` executable.
376+ This function corrects such a path to instead refer to the local path on the users drive.
377+ """
378+ function maybe_fixup_stdlib_path (path)
379+ if ! safe_isfile (path)
380+ maybe_stdlib_path = replace_buildbot_stdlibpath (path)
381+ safe_isfile (maybe_stdlib_path) && return maybe_stdlib_path
382+ end
383+ return path
363384end
364385
365386function postpath (filename, pre)
You can’t perform that action at this time.
0 commit comments