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

method error on julia nightly #222

Closed
sivapvarma opened this issue Sep 6, 2020 · 5 comments · Fixed by #232
Closed

method error on julia nightly #222

sivapvarma opened this issue Sep 6, 2020 · 5 comments · Fixed by #232

Comments

@sivapvarma
Copy link

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-DEV.850 (2020-09-06)
 _/ |\__'_|_|_|\__'_|  |  Commit bf886b5953 (0 days old master)
|__/                   |

julia> using OhMyREPL
ERROR: InitError: MethodError: no method matching keymap(::Vector{Dict{K, Any} where K})
Closest candidates are:
  keymap(::Any, ::Union{REPL.LineEdit.HistoryPrompt, REPL.LineEdit.PrefixHistoryPrompt}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2007
  keymap(::Union{Vector{Dict{Any, Any}}, Vector{Dict{Char, Any}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:1610
  keymap(::REPL.LineEdit.PromptState, ::REPL.LineEdit.Prompt) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2505
  ...
Stacktrace:
 [1] insert_keybindings(repl::Any)
   @ OhMyREPL.Prompt ~/.julia/packages/OhMyREPL/QUBZn/src/repl.jl:284
 [2] insert_keybindings
   @ ~/.julia/packages/OhMyREPL/QUBZn/src/repl.jl:270 [inlined]
 [3] __init__()
   @ OhMyREPL ~/.julia/packages/OhMyREPL/QUBZn/src/OhMyREPL.jl:99
 [4] _include_from_serialized(path::String, depmods::Vector{Any})
   @ Base ./loading.jl:597
 [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, cache::Base.TOMLCache)
   @ Base ./loading.jl:682
 [6] _require(pkg::Base.PkgId, cache::Base.TOMLCache)
   @ Base ./loading.jl:908
 [7] require(uuidkey::Base.PkgId, cache::Base.TOMLCache)
   @ Base ./loading.jl:829
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:824
during initialization of module OhMyREPL
@KristofferC
Copy link
Owner

Could you try with #223?

@sivapvarma
Copy link
Author

sivapvarma commented Sep 7, 2020

with #223, i don't get method errors anymore. thanks for fixing.

This is weird, I don't get any errors when loading from REPL, but when I add it to startup.jl, I am getting method errors.

image

@singularitti
Copy link

singularitti commented Oct 30, 2020

This is weird, I don't get any errors when loading from REPL, but when I add it to startup.jl, I am getting method errors.

This happens to me, too. I can run any code in my ~/.julia/config/startup.jl without any error, but when I start it directly from REPL with startup.jl loaded, I have this error. I am using OhMyREPL.jl 0.5.9. My startup.jl looks like:

import Pkg

if isfile("Project.toml")
    Pkg.activate(".")
    try
        using OhMyREPL
        colorscheme!("Base16MaterialDarker")
        enable_autocomplete_brackets(false)
    catch
        Pkg.add("OhMyREPL")
    end
end
julia> versioninfo()
Julia Version 1.6.0-DEV.1378
Commit 905ebec534 (2020-10-29 20:12 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.0 (ORCJIT, skylake-avx512)

Please fix this!

@mkborregaard
Copy link
Contributor

Hi, I can see that this issue is closed with reference to #223 but I still have it on OhMyREPL master on Julia 1.6:

MethodError: no method matching keymap(::Vector{Dict})
Closest candidates are:
  keymap(::Any, ::Union{REPL.LineEdit.HistoryPrompt, REPL.LineEdit.PrefixHistoryPrompt}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2014
  keymap(::Union{Vector{Dict{Any, Any}}, Vector{Dict{Char, Any}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:1617
  keymap(::REPL.LineEdit.PromptState, ::REPL.LineEdit.Prompt) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2512

The offending lines in startup.jl are:

 try
     using OhMyREPL
     colorscheme!("Monokai24bit")
 catch err
     @warn "Could not load OhMyREPL"
 end

Could we reopen the issue, or is there a fix on a particular branch?

@mkborregaard
Copy link
Contributor

@sivapvarma this was just fixed in #232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants