-
Couldn't load subscription status.
- Fork 114
Fix path logic on 1.9.0-DEV.725 and newer #694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This resolves #691 on binaries, but makes things worse on an installation from source. Using the tagged version of (@v1.9) pkg> st
Status `~/.julia/environments/v1.9/Project.toml`
[6e4b80f9] BenchmarkTools v1.3.1
[f68482b8] Cthulhu v2.6.3
[c3a54625] JET v0.6.0
[295af30f] Revise v3.3.3
julia> using Cthulhu
julia> @descend sin(1)
sin(x::Real)
@ Base.Math math.jl:1460
│ ─ %-1 = invoke sin(::Int64)::Float64
1461 1 ─ %1 = Base.sitofp(Float64, x)::Float64 │╻╷╷ float
1463 2 ─ %2 = invoke Base.Math.sin(%1::Float64)::Float64 │
└── return %2 │
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
[ Info: tracking Base
@eval function ($f)(x::Real)
xf = float(x)
x === xf && throw(MethodError($f, (x,)))
return ($f)(xf)
end
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
julia> versioninfo()
Julia Version 1.9.0-DEV.998
Commit e1739aa42a (2022-07-18 10:27 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
julia> Revise.juliadir
"/home/jishnu/julia/usr/share/julia/src"but using this PR julia> Revise.juliadir
"/home/jishnu/julia/usr/share/julia"
julia> using Cthulhu
julia> @descend sin(1)
sin(x::Real)
@ Base.Math math.jl:1460
│ ─ %-1 = invoke sin(::Int64)::Float64
1461 1 ─ %1 = Base.sitofp(Float64, x)::Float64 │╻╷╷ float
1463 2 ─ %2 = invoke Base.Math.sin(%1::Float64)::Float64 │
└── return %2 │
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
┌ Error: unable to find path containing source for Base, tracking is not possible
└ @ Revise ~/Dropbox/JuliaPackages/Revise.jl/src/recipes.jl:62
[ Info: tracking Base
@eval function ($f)(x::Real)
xf = float(x)
x === xf && throw(MethodError($f, (x,)))
return ($f)(xf)
end┌ Warning: /home/jishnu/julia/usr/share/julia/base/special is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
┌ Warning: /home/jishnu/julia/usr/share/julia/base/strings is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
┌ Warning: /home/jishnu/julia/usr/share/julia/base/compiler/ssair is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
┌ Warning: /home/jishnu/julia/usr/share/julia/base/ryu is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
┌ Warning: /home/jishnu/julia/usr/share/julia/base/ is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
┌ Warning: /home/jishnu/julia/usr/share/julia/base/docs is not an existing directory, Revise is not watching
└ @ Revise /home/jishnu/Dropbox/JuliaPackages/Revise.jl/src/packagedef.jl:570
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
julia> @which sin(1)
sin(x::Real)
@ Base.Math ~/julia/usr/share/julia/src/base/math.jl:1460This is a strange state, where it actually manages to track |
|
Does |
|
julia> Revise.juliadir
"/home/jishnu/julia/usr/share/julia"
julia> isdir(Revise.juliadir)
true
julia> isdir(joinpath(Revise.juliadir, "base"))
false$ ls /home/jishnu/julia/usr/share/julia
base.cache cert.pem julia-config.jl src stdlib test
$ ls -dl /home/jishnu/julia/usr/share/julia/src/base
drwxrwxr-x 7 jishnu jishnu 4096 Jul 20 17:27 /home/jishnu/julia/usr/share/julia/src/base
|
|
Ok, that should be fixed now. Turns out the symlink from |
|
Can confirm that this is fixed now. Thank you so much for this! I have one unrelated question, although I'm unsure if this is a julia> using Cthulhu
julia> @which sin(1)
sin(x::Real)
@ Base.Math math.jl:1460
julia> @descend sin(1)
sin(x::Real)
@ Base.Math math.jl:1460
│ ─ %-1 = invoke sin(::Int64)::Float64
1461 1 ─ %1 = Base.sitofp(Float64, x)::Float64 │╻╷╷ float
1463 2 ─ %2 = invoke Base.Math.sin(%1::Float64)::Float64 │
└── return %2 │
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
[ Info: tracking Base
@eval function ($f)(x::Real)
xf = float(x)
x === xf && throw(MethodError($f, (x,)))
return ($f)(xf)
end
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
• %2 = invoke sin(::Float64)::Float64
↩
julia> @which sin(1)
sin(x::Real)
@ Base.Math ~/julia/usr/share/julia/src/base/math.jl:1460The file name display format in the output of |
|
Mh, I think that happens because Revise writes the full path into the method table: No type piracy happening at all. |
|
I see. Perhaps type-piracy isn't the right word, but I wonder if writing the full path isn't something that should be done by |
|
So you'd want Base to write the full path into the method table? Not sure that's possible without a performance hit on startup. Anyways, this is unrelated to this PR (or did this not happen in the past?). |
|
It's unrelated to this PR. Maybe I'll discuss this elsewhere. Thanks again for this! |
| # 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")) |
There was a problem hiding this comment.
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.
|
I guess the key question is whether JuliaLang/julia#45441 is up for reconsideration. |
|
With JuliaLang/julia#46420 merged, should we close this? |
Fixes #691. Fixes #687.