Today I updated to v1.11 and I get the following error when I go to package mode
(@v1.11) pkg>
SYSTEM: caught exception of type :TypeError while trying to print a failed Task notice; giving up
This only happens when I startup julia with --startup-file=yes
with the startup.jl containing a single command: using Revise
.
If startup.jl
is empty the error doesn’t happen.
If I start without startup file and load using Revise
manually the error doesn’t exist.
The error makes the package mode totally unusable and generally the kernel unpredictable (e.g. I get a stack trace when I call versioninfo()
)
julia> versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2b (2024-10-07 11:40 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 64 × AMD EPYC 7282 16-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 64 virtual cores)
Environment:
JULIA_DEPOT_PATH = /u/bulk/home/wima/fchrstou/julia
I deleted all ~/.julia/{compiled, packages, artifacts}
but still the same happens.
1.10.4
keeps working normally.
Not sure how I managed, but I got this error during a local package loading which I think it’s related:
ERROR: LoadError: InitError: MethodError: no method matching
Stacktrace:
[1] __init__()
@ REPLExt /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:305
[2]
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError:
Stacktrace:
[1] active_module()
@ REPL /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:593
[2] #invokelatest#2
@ ./essentials.jl:1054 [inlined]
[3] invokelatest
@ ./essentials.jl:1051 [inlined]
[4] active_module
@ ./show.jl:519 [inlined]
[5]
SYSTEM (REPL): caught exception of type TypeError while trying to handle a nested exception; giving up
Same happened to me at some point. I think it was resolved by deleteing ~/.julia/compiled/v1.11
if I recall correctly.
I switched back to 1.10
for a while untill 1.11.1
was out hoping it would get fixed. Unfortunately I still get an error.
(@v1.11) pkg> Unhandled Task ERROR: InitError: MethodError: no method matching repl_init(::REPL.LineEditREPL)
The function `repl_init` exists, but no method is defined for this combination of argument types.
Closest candidates are:
repl_init(::REPL.AbstractREPL)
@ REPLExt /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:163
Stacktrace:
[1] __init__()
@ REPLExt /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:305
[2] run_module_init(mod::Module, i::Int64)
@ Base ./loading.jl:1336
[3] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1324
[4] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
@ Base ./loading.jl:1213
[5] _include_from_serialized (repeats 2 times)
@ ./loading.jl:1169 [inlined]
[6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Nothing, DEPOT_PATH::Vector{String})
@ Base ./loading.jl:1985
[7] _require_search_from_serialized
@ ./loading.jl:1908 [inlined]
[8] macro expansion
@ ./loading.jl:2592 [inlined]
[9] macro expansion
@ ./lock.jl:273 [inlined]
[10] require_stdlib(package_uuidkey::Base.PkgId, ext::String)
@ Base ./loading.jl:2557
[11] macro expansion
@ /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/Pkg_beforeload.jl:8 [inlined]
[12] macro expansion
@ ./lock.jl:273 [inlined]
[13] load_pkg()
@ REPL /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/Pkg_beforeload.jl:7
[14] (::REPL.var"#119#137"{REPL.LineEdit.MIState, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ REPL /u/bulk/home/wima/fchrstou/julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1248
during initialization of module REPLExt
I think this is a dup of REPLExt: no method matching repl_init(::REPL.LineEditREPL) when loading packages in REPL mode. · Issue #56216 · JuliaLang/julia · GitHub
which is pretty terrible.
( I also use a custom $JULIA_DEPOT_PATH
)
As hacky temporary workaround writing using Pkg
as a first line in my startup.jl
seems to be fixing it