Type conversion error when switching to a nested module (julia 1.9)

Open
#59 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
cli

Research direction

Reproduce the nested-module switch on Julia 1.9 with RemoteREPL 0.2.17, then inspect src/client.jl around run_remote_repl_command at line 369. Confirm the Expr-to-Symbol conversion failure and identify the compatible handling for the module command; done means switching to a nested module no longer raises the MethodError.

Written by the indexing model from the issue text.

Description

julia versions 1.9.0, 1.9.1
remoterepl 0.2.17

everything generally works fine, the error just pops up when you switch to a nested module
did not occur on julia 1.6, didn't check other versions

julia@localhost> %module A.B
ERROR: MethodError: Cannot `convert` an object of type Expr to an object of type Symbol

Closest candidates are:
  convert(::Type{T}, ::T) where T
   @ Base Base.jl:64
  Symbol(::Any...)
   @ Base strings/basic.jl:229

Stacktrace:
  [1] setproperty!(x::RemoteREPL.Connection, f::Symbol, v::Expr)
    @ Base ./Base.jl:38
  [2] run_remote_repl_command(conn::RemoteREPL.Connection, out_stream::Base.TTY, cmdstr::String)
    @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:369
  [3] (::RemoteREPL.var"#52#54"{Base.TTY, RemoteREPL.Connection})(c::String)
    @ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:447
  [4] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
  [5] invokelatest
    @ ./essentials.jl:813 [inlined]
  [6] (::REPL.var"#do_respond#80"{Bool, Bool, RemoteREPL.var"#52#54"{Base.TTY, RemoteREPL.Connection}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL ~/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:893
  [7] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
  [8] invokelatest
    @ ./essentials.jl:813 [inlined]
  [9] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/LineEdit.jl:2647
 [10] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/julia-1.9.0/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1300
 [11] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:514
Dominant language
Julia
Stars
148
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaWeb/RemoteREPL.jl

All issues in JuliaWeb/RemoteREPL.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.