timholy / HeaderREPLs.jl

Custom interactive REPL prompts that convey status
Other
7 stars 2 forks source link

Eliminate method-overwritten warnings #1

Open timholy opened 6 years ago

timholy commented 6 years ago

@Keno, you might find this package somewhere between intriguing and annoying :smile:. See the README for an overview.

I found the logic to handle transitions to be tricky, especially while searching history. In the end I gave up and just re-defined some methods in REPL/LineEdit.jl. In the longer term it would be good to fix that. A bigger question is whether a custom AbstractREPL is really the way to do this, or whether some new kind of AbstractPrompt would be more appropriate. There are a lot of methods specialized for Prompt, so in the interests of minimal duplication/disruption at this stage of Julia's release I went with the AbstractREPL approach so I could use Prompt's repl field to attach the required additional information.

tpapp commented 5 years ago

For a while I did not get warnings, but they are back again (startup after pkg> up):

Info: Generating builtins for this julia version...
WARNING: Method definition deactivate(REPL.LineEdit.TextInterface, REPL.LineEdit.ModeState, Any, REPL.Terminals.TextTerminal) in module LineEdit at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2204 overwritten in module HeaderREPLs at /home/tamas/.julia/packages/HeaderREPLs/xrHVE/src/HeaderREPLs.jl:396.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition transition(Function, REPL.LineEdit.PrefixSearchState, Any) in module LineEdit at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:1701 overwritten in module HeaderREPLs at /home/tamas/.julia/packages/HeaderREPLs/xrHVE/src/HeaderREPLs.jl:327.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition activate(REPL.LineEdit.TextInterface, REPL.LineEdit.ModeState, Any, REPL.Terminals.TextTerminal) in module LineEdit at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2209 overwritten in module HeaderREPLs at /home/tamas/.julia/packages/HeaderREPLs/xrHVE/src/HeaderREPLs.jl:382.
  ** incremental compilation may be fatally broken for this module **

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-DEV.654 (2019-04-05)
 _/ |\__'_|_|_|\__'_|  |  Commit bef16eee72 (0 days old master)
|__/                   |

(v1) pkg> st --manifest Rebugger
    Status `~/.julia/environments/v1/Manifest.toml`
  [da1fd8a2] CodeTracking v0.5.5
  [54d51984] HeaderREPLs v0.3.0
  [aa1ae85d] JuliaInterpreter v0.4.1
  [ee283ea6] Rebugger v0.3.1
  [295af30f] Revise v2.0.6
  [b77e0a4c] InteractiveUtils 
  [44cfe95a] Pkg 
  [3fa0cd96] REPL 
  [8dfed614] Test 
  [cf7118a7] UUIDs 

julia> versioninfo()
Julia Version 1.2.0-DEV.654
Commit bef16eee72 (2019-04-05 02:32 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_REVISE_INCLUDE = 1
  JULIA_CMDSTAN_HOME = /home/tamas/src/cmdstan-2.18.1/
timholy commented 5 years ago

You'll always get them when you rebuild. They are just more threatening now.