Revise.jl
Revise.jl copied to clipboard
`juliadir` is incorrectly inferred on nightly
On v1.8
julia> Sys.BINDIR
"/home/jishnu/packages/julias/julia-1.8/bin"
julia> Revise.juliadir
"/home/jishnu/packages/julias/julia-1.8/share/julia"
On v1.9
julia> Sys.BINDIR
"/home/jishnu/packages/julias/julia-latest/bin"
julia> Revise.juliadir
"/"
(@v1.9) pkg> st Revise
Status `~/.julia/environments/v1.9/Project.toml`
[295af30f] Revise v3.3.3
This is certainly not the correct path, and seems to lead to issues in tracking files. Potentially related: #687 (although I'm not certain about this)
Edit: the path to Base seems to be ~/packages/julias/julia-latest/share/julia/src/base on v1.9 (note the extra /src after /share/julia, which seems to make this detection fail, as the upward search starts at /share/julia)
Can't repro this on a recent build of 1.9.
That's strange, what's your versioninfo? I still see this on a freshly downloaded binary. Are you perhaps building from source?
julia> Revise.juliadir
"/"
julia> versioninfo()
Julia Version 1.9.0-DEV.1013
Commit 8378d4cf96f (2022-07-20 02:54 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.5 (ORCJIT, tigerlake)
Threads: 1 on 8 virtual cores
Environment:
LD_LIBRARY_PATH = :/usr/lib/x86_64-linux-gnu/gtk-3.0/modules
JULIA_EDITOR = vim
(@v1.9) pkg> st Revise
Status `~/.julia/environments/v1.9/Project.toml`
[295af30f] Revise v3.3.3
I am, yes. Revise.juliadir is also subtly wrong for me, though.
julia> Revise.juliadir
"/home/pfitzseb/Documents/Git/julia/usr/share/julia/src"
julia> Revise.basebuilddir
"/home/pfitzseb/Documents/Git/julia/usr/share/julia/src"
julia> versioninfo()
Julia Version 1.9.0-DEV.1013
Commit 8378d4cf96* (2022-07-20 02:54 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.5 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_EDITOR = nvim
Ok, that explains. The mechanism to detect juliadir is different in pre-built downloadable binaries from that for direct builds from the source. For binaries, Revise.basebuilddir points to a path in /cache, in which case Revise tries to detect juliadir in a hack-y way and fails.
julia> Revise.juliadir
"/"
julia> Revise.basebuilddir
"/cache/build/default-amdci4-0/julialang/julia-master/usr/share/julia/src"
On the other hand, if I build from source, I obtain
julia> Revise.basebuilddir
"/home/jishnu/julia/usr/share/julia/src"
julia> Revise.juliadir
"/home/jishnu/julia/usr/share/julia/src"
which seem correct.
Nah, those are also wrong. Wanna give https://github.com/timholy/Revise.jl/pull/694 a go?
I'm assuming this has been fixed now due to reverting the change that broke this.