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

Issue with revise? #561

Closed
PallHaraldsson opened this issue Oct 17, 2020 · 9 comments
Closed

Issue with revise? #561

PallHaraldsson opened this issue Oct 17, 2020 · 9 comments

Comments

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Oct 17, 2020

Hi,

I hit a rather weird error in VS Code, that I could reproduce again and again, scratching my head why, until I meant to show a colleague and then it was gone (I did something minor in-between)! So I can't show you either.

Anyway, I didn't really implicate Revise yesterday, but thought there might be some corruption going on with Julia until I see now trying in the same REPL (EDIT: see next comment, Revise probably just a symptom):

julia> 1/3
ERROR: UndefVarError: Base_Docs_4352b6d8 not defined
Stacktrace:
 [1] _invoked_shouldlog(logger::Revise.ReviseLogger, level::Base.CoreLogging.LogLevel, _module::Module, group::Symbol, id::Symbol)
   @ Base.CoreLogging logging.jl:78
 [2] doc!(__module__::Module, b::Base.Docs.Binding, str::Base.Docs.DocStr, sig::Type{Union{}})
   @ Base.Docs logging.jl:361
 [3] top-level scope
   @ ~/.julia/packages/JLLWrappers/m1BKg/src/toplevel_generators.jl:79Revise evaluation error at /home/pharaldsson_sym/.julia/packages/JLLWrappers/m1BKg/src/toplevel_generators.jl:79

Stacktrace:
  [1] methods_by_execution!(recurse::Any, methodinfo::Revise.CodeTrackingMethodInfo, docexprs::Dict{Module, Vector{Expr}}, mod::Module, ex::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/lowered.jl:230
  [2] eval_with_signatures(mod::Module, ex::Expr; mode::Symbol, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/packagedef.jl:455
  [3] instantiate_sigs!(modexsigs::OrderedDict{Module, OrderedDict{Revise.RelocatableExpr, Union{Nothing, Vector{Any}}}}; mode::Symbol, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/packagedef.jl:463
  [4] instantiate_sigs!
    @ ~/.julia/dev/Revise/src/packagedef.jl:460 [inlined]
  [5] maybe_extract_sigs!
    @ ~/.julia/dev/Revise/src/pkgs.jl:145 [inlined]
  [6] (::Revise.var"#46#47"{String})()
    @ Revise ~/.julia/dev/Revise/src/pkgs.jl:524
  [7] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:491
  [8] with_logger
    @ ./logging.jl:603 [inlined]
  [9] watch_manifest(mfile::String)
    @ Revise ~/.julia/dev/Revise/src/pkgs.jl:503
 [10] (::Revise.TaskThunk)()
    @ Revise ~/.julia/dev/Revise/src/types.jl:272

caused by: UndefVarError: Base_Docs_4352b6d8 not defined
Stacktrace:
  [1] collect_args(frame::JuliaInterpreter.Frame, call_expr::Expr; isfc::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:60
  [2] collect_args
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:135 [inlined]
  [3] evaluate_call_recurse!(recurse::Any, frame::JuliaInterpreter.Frame, call_expr::Expr; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:208
  [4] evaluate_call_recurse!
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:202 [inlined]
  [5] eval_rhs(recurse::Any, frame::JuliaInterpreter.Frame, node::Expr)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:389
  [6] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, node::Any, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:532
  [7] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:582
  [8] finish!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/commands.jl:14
  [9] finish_and_return!
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/commands.jl:29 [inlined]
 [10] evaluate_call_recurse!(recurse::Any, frame::JuliaInterpreter.Frame, call_expr::Expr; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:240
 [11] evaluate_call_recurse!
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:202 [inlined]
 [12] eval_rhs(recurse::Any, frame::JuliaInterpreter.Frame, node::Expr)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:389
 [13] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, node::Any, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:532
 [14] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:582
 [15] finish!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/commands.jl:14
 [16] finish_and_return!
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/commands.jl:29 [inlined]
 [17] evaluate_call_recurse!(recurse::Any, frame::JuliaInterpreter.Frame, call_expr::Expr; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:240
 [18] evaluate_call_recurse!
    @ ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:202 [inlined]
 [19] eval_rhs(recurse::Any, frame::JuliaInterpreter.Frame, node::Expr)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:389
 [20] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, node::Any, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/muncv/src/interpret.jl:527
 [21] signature(recurse::Any, frame::JuliaInterpreter.Frame, stmt::Any, pc::Int64)
    @ LoweredCodeUtils ~/.julia/packages/LoweredCodeUtils/VkHnf/src/signatures.jl:51
 [22] methoddef!(recurse::Any, signatures::Vector{Any}, frame::JuliaInterpreter.Frame, stmt::Any, pc::Int64; define::Bool)
    @ LoweredCodeUtils ~/.julia/packages/LoweredCodeUtils/VkHnf/src/signatures.jl:472
 [23] methods_by_execution!(recurse::Any, methodinfo::Revise.CodeTrackingMethodInfo, docexprs::Dict{Module, Vector{Expr}}, frame::JuliaInterpreter.Frame, isrequired::Vector{Bool}; mode::Symbol, skip_include::Bool)
    @ Revise ~/.julia/dev/Revise/src/lowered.jl:281
 [24] methods_by_execution!(recurse::Any, methodinfo::Revise.CodeTrackingMethodInfo, docexprs::Dict{Module, Vector{Expr}}, mod::Module, ex::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/lowered.jl:220
 [25] eval_with_signatures(mod::Module, ex::Expr; mode::Symbol, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/packagedef.jl:455
 [26] instantiate_sigs!(modexsigs::OrderedDict{Module, OrderedDict{Revise.RelocatableExpr, Union{Nothing, Vector{Any}}}}; mode::Symbol, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Revise ~/.julia/dev/Revise/src/packagedef.jl:463
 [27] instantiate_sigs!
    @ ~/.julia/dev/Revise/src/packagedef.jl:460 [inlined]
 [28] maybe_extract_sigs!
    @ ~/.julia/dev/Revise/src/pkgs.jl:145 [inlined]
 [29] (::Revise.var"#46#47"{String})()
    @ Revise ~/.julia/dev/Revise/src/pkgs.jl:524
 [30] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:491
 [31] with_logger
    @ ./logging.jl:603 [inlined]
 [32] watch_manifest(mfile::String)
    @ Revise ~/.julia/dev/Revise/src/pkgs.jl:503
 [33] (::Revise.TaskThunk)()
    @ Revise ~/.julia/dev/Revise/src/types.jl:272

julia> 1+1
0.3333333333333333

julia> 2+2
0.3333333333333333

julia> versioninfo()
Julia Version 1.6.0-DEV.1177
2Commit 113afd9309 (2020-10-10 16:54 UTC)


julia> 
julia> Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU D-1541 @ 2.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-10.0.1 (ORCJIT, broadwell)
Environment:
  JULIA_EDITOR = atom  -a
  JULIA_NUM_THREADS = 8
@PallHaraldsson
Copy link
Contributor Author

A probable cause (and Revise then maybe not implicated) is, I've been seeing onscreen what I thought to be smudges, but then like dead pixels, and I had no clue until now.

It's related to Unicode, I was pasting some stuff in (from the julia parser file).

image

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Oct 18, 2020

I was doing something innocent like:

julia> length("> < >= ≥ <= ≤ == === ≡ != ≠ !== ≢ ∈ ∉ ∋ ∌ ⊆ ⊈ ⊂ ⊄ ⊊ ∝ ∊ ∍ ∥ ∦ ∷ ∺ ∻ ∽ ∾ ≁ ≃ ≂ ≄ ≅ ≆ ≇ ≈ ≉ ≊ ≋ ≌ ≍ ≎ ≐ ≑ ≒ ≓ ≖ ≗ ≘ ≙ ≚ ≛ ≜ ≝ ≞ ≟ ≣ ≦ ≧ ≨ ≩ ≪ ≫ ≬ ≭ ≮ ≯ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ ⊃ ⊅ ⊇ ⊉ ⊋ ⊏ ⊐ ⊑ ⊒ ⊜ ⊩ ⊬ ⊮ ⊰ ⊱ ⊲ ⊳ ⊴ ⊵ ⊶ ⊷ ⋍ ⋐ ⋑ ⋕ ⋖ ⋗ ⋘ ⋙ ⋚ ⋛ ⋜ ⋝ ⋞ ⋟ ⋠ ⋡ ⋢ ⋣ ⋤ ⋥ ⋦ ⋧ ⋨ ⋩ ⋪ ⋫ ⋬ ⋭ ⋲ ⋳ ⋴ ⋵ ⋶ ⋷ ⋸ ⋹ ⋺ ⋻ ⋼ ⋽ ⋾ ⋿ ⟈ ⟉ ⟒ ⦷ ⧀ ⧁ ⧡ ⧣ ⧤ ⧥ ⩦ ⩧ ⩪ ⩫ ⩬ ⩭ ⩮ ⩯ ⩰ ⩱ ⩲ ⩳ ⩵ ⩶ ⩷ ⩸ ⩹ ⩺ ⩻ ⩼ ⩽ ⩾ ⩿ ⪀ ⪁ ⪂ ⪃ ⪄ ⪅ ⪆ ⪇ ⪈ ⪉ ⪊ ⪋ ⪌ ⪍ ⪎ ⪏ ⪐ ⪑ ⪒ ⪓ ⪔ ⪕ ⪖ ⪗ ⪘ ⪙ ⪚ ⪛ ⪜ ⪝ ⪞ ⪟ ⪠ ⪡ ⪢ ⪣ ⪤ ⪥ ⪦ ⪧ ⪨ ⪩ ⪪ ⪫ ⪬ ⪭ ⪮ ⪯ ⪰ ⪱ ⪲ ⪳ ⪴ ⪵ ⪶ ⪷ ⪸ ⪹ ⪺ ⪻ ⪼ ⪽ ⪾ ⪿ ⫀ ⫁ ⫂ ⫃ ⫄ ⫅ ⫆ ⫇ ⫈ ⫉ ⫊ ⫋ ⫌ ⫍ ⫎ ⫏ ⫐ ⫑ ⫒ ⫓ ⫔ ⫕ ⫖ ⫗ ⫘ ⫙ ⫷ ⫸ ⫹ ⫺ ⊢ ⊣ ⟂ <: >:")

That got me the correct (or plausible) number yesterday, this time the REPL (i.e. history is surpricingly ok), but that gives the answer 4, so clearly Julia is corrupt, just not fully broken as in segfaulting.

julia> 1+1

julia> 2+2
577

@racinmat
Copy link

Yes, something similar happened to me too, just during import of my package, it throwed:

Revise.LogRecord(Error, evaluation error starting at C:\Users\racinsky\.julia\packages\JLLWrappers\C3ISx\src\toplevel_generators.jl:79, lowered, Revise_e943ed8b, "C:\Users\racinsky\.julia\packages\Revise\BqeJF\src\lowered.jl", 106, (mod=Zlib_jll, ex=
begin
julia> 8 =#
    #= C:\Users\racinsky\.julia\packages\Zlib_jll\BGVLi\src\Zlib_jll.jl:8 =# JLLWrappers.@generate_main_file "Zlib" UUID("83775a58-1f1d-513f-b197-d71354ab007a")
end)UndefVarError: Base_Docs_4352b6d8 not defined
Stacktrace:
 [1] collect_args(::JuliaInterpreter.Frame, ::Expr; isfc::Bool) at C:\Users\racinsky\.julia\packages\JuliaInterpreter\RmxVj\src\interpret.jl:60)

@timholy
Copy link
Owner

timholy commented Oct 19, 2020

If it's reproducible and you can share the steps needed to reproduce it, this may be fixable. Otherwise this is not enough to go on.

Please also provide Julia version and Revise version.

@racinmat
Copy link

Oh, it is not reproducible for me, it disappeared after I upgraded all my dependencies.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Oct 19, 2020

You might want to keep open for @racinmat issue (if he also had a corruption, then not for sure upgrading really fixed), and I'm not sure you're answering him or me, but for my part of this, then it's for sure a corruption, and not for sure cause by revise, why I opened at Julialang. I just reported first here, as I did see the first (obvious) effect with the error at the top.

For the record:

(@v1.6) pkg> st Revise
Status ~/.julia/environments/v1.6/Project.toml
[295af30f] Revise v3.1.2 ~/.julia/dev/Revise

113afd9309 (8 days old master)

What may have caused (but I can't reproduce with):

julia> length(""> < >= ≥ <= ≤ == === ≡ != ≠ !== ≢ ∈ ∉ ∋ ∌ ⊆ ⊈ ⊂ ⊄ ⊊ ∝ ∊ ∍ ∥ ∦ ∷ ∺ ∻ ∽ ∾ ≁ ≃ ≂ ≄ ≅ ≆ ≇ ≈ ≉ ≊ ≋ ≌ ≍ ≎ ≐ ≑ ≒ ≓ ≖ ≗ ≘ ≙ ≚ ≛ ≜ ≝ ≞ ≟ ≣ ≦ ≧ ≨ ≩ ≪ ≫ ≬ ≭ ≮ ≯ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ ⊃ ⊅ ⊇ ⊉ ⊋ ⊏ ⊐ ⊑ ⊒ ⊜ ⊩ ⊬ ⊮ ⊰ ⊱ ⊲ ⊳ ⊴ ⊵ ⊶ ⊷ ⋍ ⋐ ⋑ ⋕ ⋖ ⋗ ⋘ ⋙ ⋚ ⋛ ⋜ ⋝ ⋞ ⋟ ⋠ ⋡ ⋢ ⋣ ⋤ ⋥ ⋦ ⋧ ⋨ ⋩ ⋪ ⋫ ⋬ ⋭ ⋲ ⋳ ⋴ ⋵ ⋶ ⋷ ⋸ ⋹ ⋺ ⋻ ⋼ ⋽ ⋾ ⋿ ⟈ ⟉ ⟒ ⦷ ⧀ ⧁ ⧡ ⧣ ⧤ ⧥ ⩦ ⩧ ⩪ ⩫ ⩬ ⩭ ⩮ ⩯ ⩰ ⩱ ⩲ ⩳ ⩵ ⩶ ⩷ ⩸ ⩹ ⩺ ⩻ ⩼ ⩽ ⩾ ⩿ ⪀ ⪁ ⪂ ⪃ ⪄ ⪅ ⪆ ⪇ ⪈ ⪉ ⪊ ⪋ ⪌ ⪍ ⪎ ⪏ ⪐ ⪑ ⪒ ⪓ ⪔ ⪕ ⪖ ⪗ ⪘ ⪙ ⪚ ⪛ ⪜ ⪝ ⪞ ⪟ ⪠ ⪡ ⪢ ⪣ ⪤ ⪥ ⪦ ⪧ ⪨ ⪩ ⪪ ⪫ ⪬ ⪭ ⪮ ⪯ ⪰ ⪱ ⪲ ⪳ ⪴ ⪵ ⪶ ⪷ ⪸ ⪹ ⪺ ⪻ ⪼ ⪽ ⪾ ⪿ ⫀ ⫁ ⫂ ⫃ ⫄ ⫅ ⫆ ⫇ ⫈ ⫉ ⫊ ⫋ ⫌ ⫍ ⫎ ⫏ ⫐ ⫑ ⫒ ⫓ ⫔ ⫕ ⫖ ⫗ ⫘ ⫙ ⫷ ⫸ ⫹ ⫺ ⊢ ⊣ ⟂ <: >:")

See how this got "imprinted" on my screen in a way, and feel free to close here, as issue open at JuliaLang.

@timholy timholy closed this as completed Oct 19, 2020
@PallHaraldsson
Copy link
Contributor Author

Reopen here, since Revise seems (still) implicated? I answered you in the other thread, and the bug is despite this line should have run:

pushfirst!(Base.active_repl_backend.ast_transforms, revise_first)

@timholy
Copy link
Owner

timholy commented Oct 19, 2020

Without a reproducer, no reason to reopen. I use issues as a TODO list, and there is nothing (yet) TODO here.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Oct 19, 2020

It just troubling to me that this happens, and I'm curious to know why. So I would want some issue open, it doesn't have to be yours.

One question. In Juno, I do type stuff in its REPL, that Revise "sees", which likely triggered this. BUT, in Juno unlike VS Code, if I highlight code and press ALT-ENTER, that code doesn't get "copied" to the REPL, it runs, would Revise still "see" it? If not, then at least it's more likely Revise (plus I guess Juno still) is implicated. And I can exclude some stuff as a cause.

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

No branches or pull requests

3 participants