caleb-allen / VimBindings.jl

Vim bindings for the Julia REPL
https://caleb-allen.github.io/VimBindings.jl/
MIT License
113 stars 3 forks source link

Adapt for REPL changes in `1.12` #98

Open caleb-allen opened 8 months ago

caleb-allen commented 8 months ago

Looks like some code's moved around which will need a closer look:

ERROR: LoadError: InitError: LoadError: UndefVarError: `TextInterface` not defined in `REPL`
Suggestion: check for spelling errors or missing imports.
IanButterworth commented 2 months ago

Also method overwriting is no longer allowed during precompilation. On bada969c14fd8f58804b662f5cca44808bb52433

% ./julia -ie "using VimBindings"
Info Given VimBindings was explicitly requested, output will be shown live
WARNING: Method definition (::Type{Base.Dict{K, V} where V where K})(Base.RegexMatch{S} where S<:AbstractString) in module Base at regex.jl:304 overwritten in module Parse at /Users/ian/.julia/packages/VimBindings/7dPgl/src/parse.jl:183.
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
  ? VimBindings
[ Info: Precompiling VimBindings [51b3953f-5e5d-4a6b-bd62-c64b6fa1518a]
WARNING: Method definition (::Type{Base.Dict{K, V} where V where K})(Base.RegexMatch{S} where S<:AbstractString) in module Base at regex.jl:304 overwritten in module Parse at /Users/ian/.julia/packages/VimBindings/7dPgl/src/parse.jl:183.
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
┌ Info: Skipping precompilation due to precompilable error. Importing VimBindings [51b3953f-5e5d-4a6b-bd62-c64b6fa1518a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
ERROR: LoadError: InitError: LoadError: UndefVarError: `TextInterface` not defined in `REPL`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
  [1] getproperty(x::Module, f::Symbol)
    @ Base ./Base.jl:42
  [2] top-level scope
    @ ~/.julia/packages/VimBindings/7dPgl/src/lineeditalt.jl:163
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:582
  [4] include
    @ ~/.julia/packages/VimBindings/7dPgl/src/VimBindings.jl:9 [inlined]
  [5] __init__()
    @ VimBindings ~/.julia/packages/VimBindings/7dPgl/src/VimBindings.jl:46
  [6] include(mod::Module, _path::String)
    @ Base ./Base.jl:582
  [7] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2506
  [8] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2291
  [9] #invoke_in_world#3
    @ ./essentials.jl:1082 [inlined]
 [10] invoke_in_world
    @ ./essentials.jl:1079 [inlined]
 [11] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2278
 [12] macro expansion
    @ ./loading.jl:2217 [inlined]
 [13] macro expansion
    @ ./lock.jl:287 [inlined]
 [14] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2174
 [15] #invoke_in_world#3
    @ ./essentials.jl:1082 [inlined]
 [16] invoke_in_world
    @ ./essentials.jl:1079 [inlined]
 [17] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2167
 [18] eval
    @ ./boot.jl:439 [inlined]
 [19] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:290
 [20] _start()
    @ Base ./client.jl:553
in expression starting at /Users/ian/.julia/packages/VimBindings/7dPgl/src/lineeditalt.jl:163
during initialization of module VimBindings
in expression starting at /Users/ian/.julia/packages/VimBindings/7dPgl/src/VimBindings.jl:1
caleb-allen commented 2 months ago

Thanks for the stacktrace @IanButterworth.

The TextInterface error isn't too surprising considering how fragile the hack is that this package uses to load. Bound to break with any substantial changes.

Hopefully the fix for the bad precompilation is as simple as removing some precompile statements.