Skip to content

Commit 9b15fea

Browse files
committed
Use upstream functionality for fixing stdlib paths
This allows us to automatically get new functionality like JuliaLang/julia#57274.
1 parent 213f826 commit 9b15fea

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/utils.jl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -310,28 +310,7 @@ function maybe_fix_path(file)
310310
file = normpath(newfile)
311311
end
312312
end
313-
return maybe_fixup_stdlib_path(file)
314-
end
315-
316-
safe_isfile(x) = try isfile(x); catch; false end
317-
const BUILDBOT_STDLIB_PATH = dirname(abspath(String((@which uuid1()).file), "..", "..", ".."))
318-
replace_buildbot_stdlibpath(str::String) = replace(str, BUILDBOT_STDLIB_PATH => Sys.STDLIB)
319-
"""
320-
path = maybe_fixup_stdlib_path(path::String)
321-
322-
Return `path` corrected for julia issue [#26314](https://github.com/JuliaLang/julia/issues/26314) if applicable.
323-
Otherwise, return the input `path` unchanged.
324-
325-
Due to the issue mentioned above, location info for methods defined one of Julia's standard libraries
326-
are, for non source Julia builds, given as absolute paths on the worker that built the `julia` executable.
327-
This function corrects such a path to instead refer to the local path on the users drive.
328-
"""
329-
function maybe_fixup_stdlib_path(path)
330-
if !safe_isfile(path)
331-
maybe_stdlib_path = replace_buildbot_stdlibpath(path)
332-
safe_isfile(maybe_stdlib_path) && return maybe_stdlib_path
333-
end
334-
return path
313+
return Base.fixup_stdlib_path(file)
335314
end
336315

337316
function postpath(filename, pre)

0 commit comments

Comments
 (0)