KristofferC / OhMyREPL.jl

Syntax highlighting and other enhancements for the Julia REPL
https://kristofferc.github.io/OhMyREPL.jl/latest/
Other
768 stars 60 forks source link

OMR falis after upgrading to v0.5.18 #307

Closed lanceXwq closed 1 year ago

lanceXwq commented 1 year ago

I use Julia 1.8.5 and Ubuntu 22.04.2. This also happens on my Apple silicon Mac.

[ Info: Precompiling OhMyREPL [5fb14364-9ced-5910-84b2-373655c76a03]
WARNING: could not import Tokenize.Token into OhMyREPL
ERROR: LoadError: UndefVarError: Token not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/OhMyREPL/H7jnU/src/repl_pass.jl:43
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:419
 [3] include(x::String)
   @ OhMyREPL ~/.julia/packages/OhMyREPL/H7jnU/src/OhMyREPL.jl:6
 [4] top-level scope
   @ ~/.julia/packages/OhMyREPL/H7jnU/src/OhMyREPL.jl:21
 [5] include
   @ ./Base.jl:419 [inlined]
 [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base ./loading.jl:1554
 [7] top-level scope
   @ stdin:1
in expression starting at /home/lancexwq/.julia/packages/OhMyREPL/H7jnU/src/repl_pass.jl:43
in expression starting at /home/lancexwq/.julia/packages/OhMyREPL/H7jnU/src/OhMyREPL.jl:2
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile OhMyREPL [5fb14364-9ced-5910-84b2-373655c76a03] to /home/lancexwq/.julia/compiled/v1.8/OhMyREPL/jl_FqnXW4.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:1707
 [3] compilecache
   @ ./loading.jl:1651 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1337
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [6] macro expansion
   @ ./loading.jl:1180 [inlined]
 [7] macro expansion
   @ ./lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
in expression starting at /home/lancexwq/.julia/config/startup.jl:1
singularitti commented 1 year ago

Same issue here! I have to roll back to v0.5.17.

julia> versioninfo()
Julia Version 1.9.0-rc1
Commit 3b2e0d8fbc1 (2023-03-07 07:51 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.4.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
julia> versioninfo()
Julia Version 1.9.0-rc1
Commit 3b2e0d8fbc1 (2023-03-07 07:51 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 128 × AMD EPYC 7742 64-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver2)
  Threads: 1 on 128 virtual cores
KristofferC commented 1 year ago

I think this was caused by an update to JuliaSyntax. Should be fixed in the new release that is in the pipeline of getting registered: https://github.com/JuliaRegistries/General/pull/79840

KristofferC commented 1 year ago

I believe this should be fixed now.

singularitti commented 1 year ago

It seems to be fixed for me.