Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ Julia's top-level directory when Julia was built, as recorded by the entries in
"""
const basebuilddir = begin
sysimg = filter(x->endswith(x[2], "sysimg.jl"), Base._included_files)[1][2]
dirname(dirname(sysimg))
@static if VERSION > v"1.9.0-DEV.725"
dirname(dirname(dirname(sysimg)))
else
dirname(dirname(sysimg))
end
end

"""
Expand All @@ -169,7 +173,7 @@ const juliadir = begin
catch
# Binaries probably end up here. We fall back on Sys.BINDIR
jldir = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia")
if !isdir(joinpath(jldir, "base"))
if VERSION > v"1.9.0-DEV.725" ? !isdir(joinpath(jldir, "src", "base")) : !isdir(joinpath(jldir, "base"))
while true
trydir = joinpath(jldir, "base")
isdir(trydir) && break
Expand Down
14 changes: 13 additions & 1 deletion src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ function _track(id, modname; modified_files=revision_queue)
# Test whether we know where to find the files
if isbase
srcdir = fixpath(joinpath(juliadir, "base"))
if VERSION > v"1.9.0-DEV.725"
# All builds now have the base files in src/base.
# In theory, source builds should instead use the copy of Base in
# joinpath(juliadir, "..", "..", "..", "src", "base"), but that makes
# things even more confusing since e.g. `@edit` points towards the
# copy in usr/share
srcdir = fixpath(joinpath(juliadir, "src", "base"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same issue is present for Compiler later in this file.

end
dirs = ["base"]
else
stdlibv = joinpath("stdlib", vstring, String(modname))
Expand Down Expand Up @@ -86,7 +94,11 @@ function _track(id, modname; modified_files=revision_queue)
# Save the result (unnecessary if already in pkgdatas, but doesn't hurt either)
pkgdatas[id] = pkgdata
elseif modname === :Compiler
compilerdir = normpath(joinpath(juliadir, "base", "compiler"))
compilerdir = if VERSION > v"1.9.0-DEV.725"
normpath(joinpath(juliadir, "src", "base", "compiler"))
else
normpath(joinpath(juliadir, "base", "compiler"))
end
pkgdata = get(pkgdatas, id, nothing)
if pkgdata === nothing
pkgdata = PkgData(id, compilerdir)
Expand Down