timholy / SnoopCompile.jl

Provide insights about latency (TTFX) for Julia packages
https://timholy.github.io/SnoopCompile.jl/dev/
Other
309 stars 48 forks source link

Use `Base.fixup_stdlib_path` in paths printed in e.g. `ascend` #328

Open KristofferC opened 1 year ago

KristofferC commented 1 year ago

Right now, links to stdlibs are those of the build machine:

Choose possible caller of MethodInstance for Pkg.Types.Compat(::Pkg.Versions.VersionSpec, ::Any) or proceed to typed code:
 > "/Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.10/Pkg/src/project.jl", read_project_compat: lines [66]
   Browse typed code

There is a Base.fixup_stdlib_path function that fixes this:

julia> Base.fixup_stdlib_path("/Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.10/Pkg/src/project.jl")
"/Users/kristoffercarlsson/Downloads/julia-7a561bd6f0/share/julia/stdlib/v1.10/Pkg/src/project.jl"
timholy commented 1 year ago

I've got a local fix for this in Cthulhu, I'll run it for a little while to make sure it's working.