Open maleadt opened 1 year ago
Same with missing packages, these are not really useful backtraces:
julia> using Foo
ERROR: ArgumentError: Package Foo not found in current path.
- Run `import Pkg; Pkg.add("Foo")` to install the Foo package.
Stacktrace:
[1] macro expansion
@ Base ./loading.jl:1707 [inlined]
[2] macro expansion
@ Base ./lock.jl:267 [inlined]
[3] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1688
[4] invoke_in_world(::UInt64, ::typeof(Base.__require), ::Module, ::Symbol; kwargs::@Kwargs{})
@ Base ./essentials.jl:898 [inlined]
[5] invoke_in_world(::UInt64, ::typeof(Base.__require), ::Module, ::Symbol)
@ Base ./essentials.jl:895 [inlined]
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1681
or
ERROR: LoadError: ArgumentError: Package TimerOutputs [a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Stacktrace:
[1] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1861
[2] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1747
[3] invoke_in_world(::UInt64, ::typeof(Base.__require_prelocked), ::Base.PkgId, ::String; kwargs::@Kwargs{})
@ Base ./essentials.jl:898 [inlined]
[4] invoke_in_world(::UInt64, ::typeof(Base.__require_prelocked), ::Base.PkgId, ::String)
@ Base ./essentials.jl:895 [inlined]
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1738
[6] macro expansion
@ Base ./loading.jl:1725 [inlined]
[7] macro expansion
@ Base ./lock.jl:267 [inlined]
[8] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1688
[9] invoke_in_world(::UInt64, ::typeof(Base.__require), ::Module, ::Symbol; kwargs::@Kwargs{})
@ Base ./essentials.jl:898 [inlined]
[10] invoke_in_world(::UInt64, ::typeof(Base.__require), ::Module, ::Symbol)
@ Base ./essentials.jl:895 [inlined]
[11] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1681
Or (in VSCode)
ERROR: ArgumentError: Package Fooafdsa not found in current path.
- Run `import Pkg; Pkg.add("Fooafdsa")` to install the Fooafdsa package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:1630 [inlined]
[2] macro expansion
@ ./lock.jl:267 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1611
[4] eval
@ ./boot.jl:370 [inlined]
[5] eval
@ ./Base.jl:68 [inlined]
[6] repleval(m::Module, code::Expr, #unused#::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:222
[7] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:186
[8] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[9] with_logger
@ ./logging.jl:626 [inlined]
[10] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:187
[11] #invokelatest#2
@ ./essentials.jl:816 [inlined]
[12] invokelatest(::Any)
@ Base ./essentials.jl:813
[13] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
[14] (::VSCodeServer.var"#61#62")()
@ VSCodeServer ./task.jl:514
When a package, or any of its dependencies, fails to precompile, users are confronted with pretty long backtraces that aren't relevant to the actual failure, and just point to code loading:
This has been worsened recently by #49525, but it's probably better to hide the stack trace altogether. cc @KristofferC