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

Comment in REPL triggers an exception #40776

Closed
xitology opened this issue May 10, 2021 · 3 comments · Fixed by #40784
Closed

Comment in REPL triggers an exception #40776

xitology opened this issue May 10, 2021 · 3 comments · Fixed by #40784
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)

Comments

@xitology
Copy link
Contributor

In the current master, writing a bare comment in REPL triggers an exception, like this:

julia> # foo
ERROR: type Nothing has no field head
Stacktrace:
  [1] getproperty(x::Nothing, f::Symbol)
    @ Base ./Base.jl:33
  [2] modules_to_be_loaded(ast::Any, mods::Any) (repeats 2 times)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:178
  [3] check_for_missing_packages_and_run_hooks(ast::Any)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:168
  [4] eval_user_input(ast::Any, backend::REPL.REPLBackend)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:143
  [5] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:237
  [6] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:222
  [7] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:355
  [8] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL ~/src/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:342
  [9] (::Base.var"#892#894"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:394
 [10] #invokelatest#2
    @ ./essentials.jl:726 [inlined]
 [11] invokelatest
    @ ./essentials.jl:724 [inlined]
 [12] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:379
 [13] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:309
 [14] _start()
    @ Base ./client.jl:495
julia> versioninfo()
Julia Version 1.7.0-DEV.1079
Commit e4f79b7167* (2021-05-10 15:38 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = gvim
@oscardssmith oscardssmith added bug Indicates an unexpected problem or unintended behavior parser Language parsing and surface syntax REPL Julia's REPL (Read Eval Print Loop) labels May 10, 2021
@oscardssmith
Copy link
Member

Confirmed. This is one of the weirder bugs I've seen in a while.

@simeonschaub
Copy link
Member

Looks like this was introduced in #39026.
cc @IanButterworth

@simeonschaub simeonschaub added regression Regression in behavior compared to a previous version and removed parser Language parsing and surface syntax labels May 10, 2021
@IanButterworth
Copy link
Member

This is now fixed on the nightlies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants