Skip to content
Merged
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
15 changes: 11 additions & 4 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ expected_juliadir() = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia")

Full path to the running Julia's cache of source code defining `Base`.
"""
const basesrccache = normpath(joinpath(expected_juliadir(), "base.cache"))
global basesrccache::String

"""
Revise.basebuilddir
Expand Down Expand Up @@ -246,7 +246,7 @@ end
Constant specifying full path to julia top-level source directory.
This should be reliable even for local builds, cross-builds, and binary installs.
"""
global juliadir::String = find_juliadir()
global juliadir::String

const cache_file_key = Dict{String,String}() # corrected=>uncorrected filenames
const src_file_key = Dict{String,String}() # uncorrected=>corrected filenames
Expand All @@ -262,8 +262,8 @@ See also [`Revise.silence`](@ref).
"""
const dont_watch_pkgs = Set{Symbol}()
const silence_pkgs = Set{Symbol}()
const depsdir = joinpath(dirname(@__DIR__), "deps")
const silencefile = Ref(joinpath(depsdir, "silence.txt")) # Ref so that tests don't clobber
global depsdir::String
const silencefile = Ref{String}() # Ref so that tests don't clobber

##
## The inputs are sets of expressions found in each file.
Expand Down Expand Up @@ -1345,6 +1345,13 @@ function __init__()
return nothing
end

# Setting up the paths relative to package module location

global juliadir = find_juliadir()
global basesrccache = normpath(joinpath(expected_juliadir(), "base.cache"))
global depsdir = joinpath(isnothing(pkgdir(@__MODULE__)) ? dirname(@__DIR__) : pkgdir(@__MODULE__), "deps")
silencefile[] = joinpath(depsdir, "silence.txt")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tangentially, the whole silence functionality should be rewritten using Preferences.jl instead of mutating the package folder.

Copy link
Contributor Author

@JanisErdmanis JanisErdmanis Nov 19, 2025

Choose a reason for hiding this comment

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

I am currently overwhelmed and refactoring to use Preferences.jl is not on my plate, but I support the change.


# Check Julia paths (issue #601)
if !isdir(juliadir)
major, minor = Base.VERSION.major, Base.VERSION.minor
Expand Down
Loading