-
Notifications
You must be signed in to change notification settings - Fork 111
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
Test suite fails with Base_Docs_4352b6d8
error (again)
#695
Comments
Culprit from
|
Yeah, it's a JuliaInterpreter bug. Something changed its quoting in a recent Julia release, and I haven't had time to chase down the right fix. It's being accessed from here but the right fix must be earlier in JuliaInterpreter's handling of that expression. |
Thanks for the comment and hints. Deep down the code now, I'm onto it 😆 Involving
|
JuliaDebug/JuliaInterpreter.jl#535 (comment) might be related. |
Reduced isolated reproducer: using Revise
main() = begin
for (i, (mod, file)) in enumerate(Base._included_files)
endswith(file, "sysimg.jl") && continue
basename(file) == "LazilyInitializedFields.jl" || continue
file = Revise.fixpath(file)
mexs = Revise.parse_source(file, mod)
Revise.instantiate_sigs!(mexs; always_rethrow=true)
end
return
end
main() |
This (horrible) diff using diffdiff --git a/src/interpret.jl b/src/interpret.jl
index 452abeb..a858688 100644
--- a/src/interpret.jl
+++ b/src/interpret.jl
@@ -45,25 +45,34 @@ macro lookup(args...)
frame, node = args
end
nodetmp = gensym(:node) # used to hoist, e.g., args[4]
- if havemod
- fallback = quote
- isa($nodetmp, Symbol) ? getfield($(esc(mod)), $nodetmp) :
- $nodetmp
- end
+ fallback = if havemod
+ :(isa($nodetmp, Symbol) ? getfield($(esc(mod)), $nodetmp) : $nodetmp)
else
- fallback = quote
- $nodetmp
- end
+ :($nodetmp)
end
+ frametmp = gensym(:frame)
quote
$nodetmp = $(esc(node))
- isa($nodetmp, SSAValue) ? lookup_var($(esc(frame)), $nodetmp) :
- isa($nodetmp, GlobalRef) ? lookup_var($(esc(frame)), $nodetmp) :
- isa($nodetmp, SlotNumber) ? lookup_var($(esc(frame)), $nodetmp) :
- isa($nodetmp, QuoteNode) ? $nodetmp.value :
- isa($nodetmp, Symbol) ? getfield(moduleof($(esc(frame))), $nodetmp) :
- isa($nodetmp, Expr) ? lookup_expr($(esc(frame)), $nodetmp) :
- $fallback
+ $frametmp = $(esc(frame))
+ if isa($nodetmp, SSAValue)
+ lookup_var($frametmp, $nodetmp)
+ elseif isa($nodetmp, GlobalRef)
+ lookup_var($frametmp, $nodetmp)
+ elseif isa($nodetmp, SlotNumber)
+ lookup_var($frametmp, $nodetmp)
+ elseif isa($nodetmp, QuoteNode)
+ $nodetmp.value
+ elseif isa($nodetmp, Symbol)
+ try
+ getfield(moduleof($frametmp), $nodetmp)
+ catch
+ $nodetmp
+ end
+ elseif isa($nodetmp, Expr)
+ lookup_expr($frametmp, $nodetmp)
+ else
+ $fallback
+ end
end
end I'm out of ideas atm :/ |
Thanks for the tip, @KristofferC. Fix in JuliaInterpreter coming (EDIT: JuliaDebug/JuliaInterpreter.jl#540). |
It's awesome to see |
LoadError: UndefVarError: Base_Docs_4352b6d8 not defined
appears again.Not only locally when developing, but also in CI (e.g. https://github.com/timholy/Revise.jl/runs/7479727981?check_suite_focus=true).
This is very frustrating, because it affects local development, PRs workflow, and IMO should be treated as top priority.
I'm trying to fix this now.
Reproduce locally (on 1.7.3) with:
Xref:
JuliaDebug/JuliaInterpreter.jl#423
#505
#520
#561
JuliaDebug/JuliaInterpreter.jl#441
JuliaDebug/JuliaInterpreter.jl#440
JuliaDebug/JuliaInterpreter.jl#444
JuliaDebug/JuliaInterpreter.jl#442
JuliaDebug/JuliaInterpreter.jl#535
The text was updated successfully, but these errors were encountered: