My package https://github.com/KristofferC/OhMyREPL.jl started failing on master with the error.
julia> WARNING: Caught an exception in the keymap: ERROR: MethodError: no method matching (::OhMyREPL.Prompt.##1#28)(::Base.LineEdit.MIState, ::Base.REPL.LineEditREPL, ::String) The applicable method may be too new: running in world age 20392, while current world is 20418. Closest candidates are: #1(::Any, ::Any, ::Any) at /home/kristoffer/.julia/v0.6/OhMyREPL/src/repl.jl:72 (method too new to be called from this world context.)
The error occurs as soon as the package is loaded and a key is pressed.
What the function is supposed to do is to change some hotkeys the REPL normally use to call a few other functions. IIUC this error happens when a method defined in a running context is tried to be called in that context? The method that is said to be too new (at
OhMyREPL/src/repl.jl:72) is an anonymous function that gets bound to a key,
D["*"] = (s, data, c) -> (LineEdit.edit_insert(s, c); rewrite_with_ANSI(s))
How should I rewrite this function as to not run into the current problems?