Skip to content
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

REPL throws huge error when trying to use many packages with 1.11.0-rc2 on NixOS #55309

Closed
robsmith11 opened this issue Jul 30, 2024 · 11 comments
Labels
duplicate Indicates similar issues or pull requests REPL Julia's REPL (Read Eval Print Loop)

Comments

@robsmith11
Copy link
Contributor

I suspect something changed in 1.11 with regards to locating system libraries that is causing Julia on NixOS to have problems using many 3rd-party packages. I haven't had any issues with built-in packages. Julia 1.10 and earlier all worked fine when installed on the same system (by running julia from the extracted the official tarball).

As an example, I get the following error when simply typing DataFrames( (without pressing enter or tab). The error is massive, so just including some pieces from it. I guess it's dumping everything in memory? Is there anything I can do to provide more useful debug info?

$ JULIA_DEPOT_PATH=/home/me/data/dot_julia /home/me/data/julia-1.11.0-rc2/bin/julia
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-rc2 (2024-07-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using DataFrames

julia> DataFrame(
SYSTEM: caught exception of type :TypeError while trying to print a failed Task notice; giving up
ERROR: TaskFailedException
Stacktrace:
  [1] fatal: error thrown and no exception handler available.
TypeError(func=:typeassert, context="", expected=REPL.AbstractREPL, got=REPL.LineEditREPL(t=REPL.Terminals.TTYTerminal(term_type="tmux-256color", in_stream=Base.TTY(handle=0x00000000007a67b0, status=3, buffer=Base.GenericIOBuffer{GenericMemory{:not_atomic, UInt8, Core.AddrSpace{Core}(0x00)}}(data=Memory{UInt8}(65536, 0xd1b648)[0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

...

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], reinit=false, readable=true, writable=true, seekable=false, append=true, size=1, maxsize=9223372036854775807, ptr=2, offset=0, mark=-1), cond=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), readerror=nothing, sendbuf=nothing, lock=Base.ReentrantLock(locked_by=nothing, reentrancy_cnt=0x00000000, havelock=0x00, cond_wait=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), _=(0, 0, 0)), throttle=10485760), out_stream=Base.TTY(handle=0x00000000007a68d0, status=3, buffer=Base.GenericIOBuffer{GenericMemory{:not_atomic, UInt8, Core.AddrSpace{Core}(0x00)}}(data=Memory{UInt8}(0, 0x7fa98adeea90)[], reinit=false, readable=true, writable=true, seekable=false, append=true, size=0, maxsize=9223372036854775807, ptr=1, offset=0, mark=-1), cond=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), readerror=nothing, sendbuf=nothing, lock=Base.ReentrantLock(locked_by=nothing, reentrancy_cnt=0x00000000, havelock=0x00, cond_wait=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), _=(0, 0, 0)), throttle=10485760), err_stream=Base.TTY(handle=0x00000000007a69f0, status=3, buffer=Base.GenericIOBuffer{GenericMemory{:not_atomic, UInt8, Core.AddrSpace{Core}(0x00)}}(data=Memory{UInt8}(0, 0x7fa98adeea90)[], reinit=false, readable=true, writable=true, seekable=false, append=true, size=0, maxsize=9223372036854775807, ptr=1, offset=0, mark=-1), cond=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), readerror=nothing, sendbuf=nothing, lock=Base.ReentrantLock(locked_by=nothing, reentrancy_cnt=0x00000000, havelock=0x00, cond_wait=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), _=(0, 0, 0)), throttle=10485760)), hascolor=true, prompt_color="\e[32m", input_color="\e[0m", answer_color="\e[0m", shell_color="\e[31m", help_color="\e[33m", pkg_color="\e[34m", history_file=true, in_shell=false, in_help=false, envcolors=true, waserror=false, specialdisplay=nothing, options=REPL.Options(hascolor=true, extra_keymap=Array{Base.Dict{Any, Any}, 1}(dims=(0,), mem=Memory{Base.Dict{Any, Any}}(0, 0x7fa9661e30a0)[]), tabwidth=8, kill_ring_max=100, region_animation_duration=0.2, beep_duration=0.2, beep_blink=0.2, beep_maxduration=1, beep_colors=Array{String, 1}(dims=(1,), mem=Memory{String}(1, 0x7fa992d2fe00)["\e[90m"]), beep_use_current=true, backspace_align=true, backspace_adjust=true, confirm_exit=false, auto_indent=true, auto_indent_tmp_off=false, auto_indent_bracketed_paste=false, auto_indent_time_threshold=0.005, auto_refresh_time_delay=0, hint_tab_completes=true, iocontext=Base.Dict{Symbol, Any}(slots=Memory{UInt8}(0, 0x7fa98adeea90)[], keys=Memory{Symbol}(0, 0x7fa98796b730)[], vals=Memory{Any}(0, 0x7fa98ad56de0)[], ndel=0, count=0, age=0x0000000000000000, idxfloor=1, maxprobe=0)), mistate=REPL.LineEdit.MIState(interface=REPL.LineEdit.ModalInterface(modes=Array{REPL.LineEdit.TextInterface, 1}(dims=(6,), mem=Memory{REPL.LineEdit.TextInterface}(6, 0x7fa992d074a0)[
  REPL.LineEdit.Prompt(prompt=REPL.var"#103#104"{REPL.LineEditREPL, String}(repl=<circular reference @-6>, prompt="julia> "), prompt_prefix="\e[32m", prompt_suffix=Base.input_color, output_prefix="", output_prefix_prefix="", output_prefix_suffix="", keymap_dict=Base.Dict{Char, Any}(slots=Memory{UInt8}(64, 0x7fa992cf5760)[0x00, 0x00, 0xc1, 0xf1, 0xe5, 0x00, 0xf2, 0x00, 0x00, 0xbf, 0x00, 0xcd, 0x00, 0x99, 0x00, 0x00, 0xab, 0xd1, 0x00, 0x00, 0xfd, 0x90, 0xe4, 0xb2, 0xee, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xed, 0x8c, 0xb4, 0xa1, 0xd8, 0xc0, 0xbe, 0x00, 0x00, 0x00, 0xef, 0x00, 0x97, 0xb3, 0xc8, 0xfb, 0xf6, 0xef, 0xbc, 0x00, 0x00, 0xbe, 0x90, 0xc5, 0x00, 0xc2, 0xb8, 0x00, 0x00, 0x8a, 0xb3, 0x00, 0x00], keys=Memory{Char}(64, 0x7fa992ce8c80)[Char(0x00000000), Char(0x00000000), Char(0x10000000), Char(0x1f000000), Char(0x0e000000), Char(0x00000000), Char(0x13000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x5d000000), Char(0x00000000), Char(0x08000000), Char(0x00000000), Char(0x00000000), Char(0x7f000000), Char(0x3f000000), Char(0x00000000), Char(0x00000000), Char(0x1d000000), Char(0x0c000000), Char(0x0a000000), Char(0x02000000), Char(0x05000000), Char(0x00000000), Char(0x00000000), Char(0x07000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x1e000000), Char(0x1a000000), Char(0x11000000), Char(0x1c000000), Char(0x0b000000), Char(0x0f000000), Char(0x3b000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x01000000), Char(0x00000000), Char(0x1b000000), Char(0xf48f9fbf), Char(0x16000000), Char(0x18000000), Char(0x09000000), Char(0x17000000), Char(0x0d000000), Char(0x00000000), Char(0x00000000), Char(0x14000000), Char(0x06000000), Char(0x03000000), Char(0x00000000), Char(0x15000000), Char(0x04000000), Char(0x00000000), Char(0x00000000), Char(0x19000000), Char(0x12000000), Char(0x00000000), Char(0x00000000)], vals=Memory{Any}(64, 0x7fa992cfa660)[
  #<null>,
  #<null>,
  REPL.LineEdit.var"#266#270"{REPL.LineEdit.PrefixHistoryPrompt}(p=REPL.LineEdit.PrefixHistoryPrompt(hp=REPL.REPLHistoryProvider(history=Array{String, 1}(dims=(1,), mem=Memory{String}(8, 0x7fa9924814c0)[
  "using DataFrames",
  #<null>,
  #<null>,
  #<null>,
  #<null>,
  #<null>,
  #<null>,
  #<null>]), file_path="/home/me/data/dot_julia/logs/repl_history.jl", history_file=Base.IOStream(handle=0x00007fa9939735c0, ios=Array{UInt8, 1}(dims=(184,), mem=Memory{UInt8}(184, 0x7fa9939735c0)[0xd0, 0x4e, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), name="<file /home/me/data/dot_julia/logs/repl_history.jl>", mark=-1, lock=Base.ReentrantLock(locked_by=nothing, reentrancy_cnt=0x00000000, havelock=0x00, cond_wait=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), _=(0, 0, 0)), _dolock=true), start_idx=0, cur_idx=2, last_idx=1, last_buffer=Base.GenericIOBuffer{GenericMemory{:not_atomic, UInt8, Core.AddrSpace{Core}(0x00)}}(data=Memory{UInt8}(32, 0x7fa9939f2f58)[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], reinit=false, readable=true, writable=true, seekable=true, append=false, size=0, maxsize=9223372036854775807, ptr=1, offset=0, mark=-1), last_mode=nothing, mode_mapping=Base.Dict{Symbol, REPL.LineEdit.Prompt}(slots=Memory{UInt8}(16, 0x7fa992e560c0)[0x00, 0x00, 0x00, 0x96, 0xaf, 0xd0, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00], keys=Memory{Symbol}(16, 0x7fa9931e4ca0)[
  #<null>,
  #<null>,
  #<null>,
  :julia,
  :help,
  :pkg,
  #<null>,
  #<null>,
  #<null>,
  #<null>,
  :shell,
  #<null>,
  #<null>,
  #<null>,
  #<null>,
  #<null>], vals=Memory{REPL.LineEdit.Prompt}(16, 0x7fa9931e4d40)[
  #<null>,
  #<null>,
  #<null>,
  <circular reference @-8>,
  REPL.LineEdit.Prompt(prompt=REPL.var"#103#104"{REPL.LineEditREPL, String}(repl=<circular reference @-14>, prompt="help?> "), prompt_prefix="\e[33m", prompt_suffix=Base.input_color, output_prefix="", output_prefix_prefix="", output_prefix_suffix="", keymap_dict=Base.Dict{Char, Any}(slots=Memory{UInt8}(64, 0x7fa992cf6cc0)[0x00, 0x00, 0xc1, 0xf1, 0xe5, 0x00, 0xf2, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0xfd, 0x90, 0xe4, 0xb2, 0xee, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xed, 0x8c, 0xb4, 0xa1, 0xd8, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x97, 0xb3, 0xc8, 0xfb, 0xf6, 0xef, 0xbc, 0x00, 0x00, 0xbe, 0x90, 0xc5, 0x00, 0xc2, 0xb8, 0x00, 0x00, 0x8a, 0xb3, 0x00, 0x00], keys=Memory{Char}(64, 0x7fa992ce9d60)[Char(0x00000000), Char(0x00000000), Char(0x10000000), Char(0x1f000000), Char(0x0e000000), Char(0x00000000), Char(0x13000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x08000000), Char(0x00000000), Char(0x00000000), Char(0x7f000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x1d000000), Char(0x0c000000), Char(0x0a000000), Char(0x02000000), Char(0x05000000), Char(0x00000000), Char(0x00000000), Char(0x07000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x1e000000), Char(0x1a000000), Char(0x11000000), Char(0x1c000000), Char(0x0b000000), Char(0x0f000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x01000000), Char(0x00000000), Char(0x1b000000), Char(0xf48f9fbf), Char(0x16000000), Char(0x18000000), Char(0x09000000), Char(0x17000000), Char(0x0d000000), Char(0x00000000), Char(0x00000000), Char(0x14000000), Char(0x06000000), Char(0x03000000), Char(0x00000000), Char(0x15000000), Char(0x04000000), Char(0x00000000), Char(0x00000000), Char(0x19000000), Char(0x12000000), Char(0x00000000), Char(0x00000000)], vals=Memory{Any}(64, 0x7fa992cccac0)[
  #<null>,
  #<null>,
  <circular reference @-8>,
  REPL.LineEdit.var"#141#197"(),
  REPL.LineEdit.var"#267#271"{REPL.LineEdit.PrefixHistoryPrompt}(p=<circular reference @-8>),
  #<null>,
  REPL.LineEdit.var"#84#115"{REPL.LineEdit.HistoryPrompt}(p=REPL.LineEdit.HistoryPrompt(hp=<circular reference @-8>, complete=REPL.LatexCompletions(), keymap_dict=Base.Dict{Char, Any}(slots=Memory{UInt8}(64, 0x7fa992d31a60)[0x00, 0x00, 0xc1, 0xf1, 0xe5, 0x00, 0xf2, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0xfd, 0x90, 0xe4, 0xb2, 0xee, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xed, 0x8c, 0xb4, 0xa1, 0xd8, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x97, 0xb3, 0xc8, 0xfb, 0xf6, 0xef, 0xbc, 0x00, 0x00, 0xbe, 0x90, 0xc5, 0x00, 0xc2, 0xb8, 0x00, 0x00, 0x8a, 0xb3, 0x00, 0x00], keys=Memory{Char}(64, 0x7fa992f8f500)[Char(0x00000000), Char(0x00000000), Char(0x10000000), Char(0x1f000000), Char(0x0e000000), Char(0x00000000), Char(0x13000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x08000000), Char(0x00000000), Char(0x00000000), Char(0x7f000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x1d000000), Char(0x0c000000), Char(0x0a000000), Char(0x02000000), Char(0x05000000), Char(0x00000000), Char(0x00000000), Char(0x07000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x1e000000), Char(0x1a000000), Char(0x11000000), Char(0x1c000000), Char(0x0b000000), Char(0x0f000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x00000000), Char(0x01000000), Char(0x00000000), Char(0x1b000000), Char(0xf48f9fbf), Char(0x16000000), Char(0x18000000), Char(0x09000000), Char(0x17000000), Char(0x0d000000), Char(0x00000000), Char(0x00000000), Char(0x14000000), Char(0x06000000), Char(0x03000000), Char(0x00000000), Char(0x15000000), Char(0x04000000), Char(0x00000000), Char(0x00000000), Char(0x19000000), Char(0x12000000), Char(0x00000000), Char(0x00000000)], vals=Memory{Any}(64, 0x7fa992d3f100)[
  #<null>,

...
@robsmith11
Copy link
Contributor Author

After further testing, I see that it's the loading of the DataFrames package that seems to break other packages.. which is strange.

For example, LibPQ is working fine until I run using DataFrames, and then it breaks:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-rc2 (2024-07-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> import LibPQ

julia> c = LibPQ.Connection("postgresql://[REDACTED]");

julia> [x[1] for x in LibPQ.execute(c, "select 1")]
1-element Vector{Int32}:
 1

julia> using DataFrames

julia> [x[1] for x in LibPQ.execute(c, "select 1")]
1-element Error showing value of type ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-1.11.0-rc2/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
  [2] #invokelatest#2
    @ ./essentials.jl:1043 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1040 [inlined]
  [4] active_module
    @ ./show.jl:519 [inlined]
  [5]
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-1.11.0-rc2/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
  [2] #invokelatest#2
    @ ./essentials.jl:1043 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1040 [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

@robsmith11
Copy link
Contributor Author

Maybe related to #54888 ?

@nsajko nsajko added the REPL Julia's REPL (Read Eval Print Loop) label Jul 30, 2024
@nsajko
Copy link
Contributor

nsajko commented Jul 30, 2024

Which version of DataFrames is this? You can find it by executing st DataFrames in the Pkg REPL.

@nsajko
Copy link
Contributor

nsajko commented Jul 30, 2024

Could you try and see if this reproduces with nightly, too?

https://julialang.org/downloads/nightlies/

@nsajko
Copy link
Contributor

nsajko commented Jul 30, 2024

TypeError(func=:typeassert, context="", expected=REPL.AbstractREPL, got=REPL.LineEditREPL

The weird thing is that REPL.LineEditREPL does subtype REPL.AbstractREPL:

mutable struct LineEditREPL <: AbstractREPL

@nsajko
Copy link
Contributor

nsajko commented Jul 30, 2024

Could you try this script and report the output:

using REPL: REPL
term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
repl = REPL.LineEditREPL(term, true)
println(repl isa REPL.AbstractREPL)
using DataFrames
println(repl isa REPL.AbstractREPL)
println(repl isa DataFrames.REPL.AbstractREPL)

Try:

  • just pasting this into a fresh REPL
  • include-ing it into a fresh REPL
  • running it from the command line

@nsajko
Copy link
Contributor

nsajko commented Jul 30, 2024

Could you try if the issue still repros with a fresh depot? Just start Julia with an empty directory as its depot.

@robsmith11
Copy link
Contributor Author

I was already using a fresh depot. I tried with both DataFrames 1.6.1 and the current master with the same result.

I get an error with the 2nd line of your REPL commands when pasting it into the REPL or including it:

$ JULIA_DEPOT_PATH=/home/me/data/dot_julia /home/me/data/julia-1.11.0-rc2/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-rc2 (2024-07-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using REPL: REPL
[ Info: Precompiling REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb]

julia> term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
Error showing value of type ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-1.11.0-rc2/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
  [2] #invokelatest#2
    @ ./essentials.jl:1043 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1040 [inlined]
  [4] active_module
    @ ./show.jl:519 [inlined]
  [5]
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-1.11.0-rc2/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
  [2] #invokelatest#2
    @ ./essentials.jl:1043 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1040 [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

But just running the commands as a file works:

$ JULIA_DEPOT_PATH=/home/me/data/dot_julia /home/me/data/julia-1.11.0-rc2/bin/julia /tmp/a.jl
true
true
true

@robsmith11
Copy link
Contributor Author

Same with latest Julia nightly:

$ JULIA_DEPOT_PATH=/home/me/data/dot_julia /home/me/data/julia-e0f2e29509/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.0-DEV.947 (2024-07-30)
 _/ |\__'_|_|_|\__'_|  |  Commit e0f2e295091 (0 days old master)
|__/                   |

julia> using REPL: REPL
[ Info: Precompiling REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb]

julia> term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
Error showing value of type ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-e0f2e29509/share/julia/stdlib/v1.12/REPL/src/REPL.jl:764
  [2] #invokelatest#2
    @ ./essentials.jl:1045 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1042 [inlined]
  [4] active_module
    @ ./show.jl:519 [inlined]
  [5]
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError:
Stacktrace:
  [1] active_module()
    @ REPL ~/data/julia-e0f2e29509/share/julia/stdlib/v1.12/REPL/src/REPL.jl:764
  [2] #invokelatest#2
    @ ./essentials.jl:1045 [inlined]
  [3] invokelatest
    @ ./essentials.jl:1042 [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

@robsmith11
Copy link
Contributor Author

On a 1 year old nightly, it works fine:

$ JULIA_DEPOT_PATH=/home/me/data/dot_julia /home/me/data/julia-3e04129d61/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-DEV.234 (2023-08-05)
 _/ |\__'_|_|_|\__'_|  |  Commit 3e04129d61e (359 days old master)
|__/                   |

julia> using REPL: REPL

julia> term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
REPL.Terminals.TTYTerminal("dumb", Base.TTY(RawFD(12) paused, 0 bytes waiting), Base.TTY(RawFD(15) open, 0 bytes waiting), Base.TTY(RawFD(17) open, 0 bytes waiting))

@KristofferC
Copy link
Member

The error looks identical to #54888 so let's close this as a duplicate.

@KristofferC KristofferC closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
@nsajko nsajko added the duplicate Indicates similar issues or pull requests label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Indicates similar issues or pull requests REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

3 participants