Skip to content

Support JuliaInterpreter 0.12 - #139

Merged
davidanthoff merged 3 commits into
mainfrom
avi/juliainterpreter-0.12
Oct 4, 2026
Merged

davidanthoff merged 3 commits into
mainfrom
avi/juliainterpreter-0.12

Conversation

@aviatesk

@aviatesk aviatesk commented Oct 3, 2026

Copy link
Copy Markdown
Member

JuliaInterpreter 0.12 interprets the code passed to Core.eval (JuliaDebug/JuliaInterpreter.jl#783), in frames with a Module scope below the frame of the calling method. is_toplevel_return took any frame with a Module scope paused at a return for the end of the current top-level expression. So stepping into code that a method evaluates, e.g. with @eval, ended the expression at the return of the evaluated code: the paused method frames were dropped, and the rest of the method never ran.

is_toplevel_return now also requires that no method frame is on the caller chain, which is always the case with earlier JuliaInterpreter versions. The compat now allows JuliaInterpreter 0.12.

With the default ALL_MODULES_EXCEPT_MAIN, Core is compiled, so Core.eval keeps evaluating the code natively, and nothing changes in behavior or speed. Only when Core is interpreted does the evaluated code get interpreted too, which is slower but makes it debuggable. That is also why the test steps through a method that calls Core.eval with no compiled modules.

For every PR, please check the following:

No end-user documentation or changelog entry is needed for this PR on its own: the fix only takes effect with JuliaInterpreter 0.12, which the extension does not bundle yet. The changelog entry belongs to the julia-vscode PR that updates the bundled JuliaInterpreter to 0.12 (together with this DebugAdapter change and LoweredCodeUtils 3.10.0).

JuliaInterpreter 0.12 interprets the code passed to `Core.eval`
(JuliaDebug/JuliaInterpreter.jl#783), in frames with a `Module` scope
below the frame of the calling method. `is_toplevel_return` took any frame
with a `Module` scope paused at a return for the end of the current
top-level expression. So stepping into code that a method evaluates, e.g.
with `@eval`, ended the expression at the return of the evaluated code:
the paused method frames were dropped, and the rest of the method never
ran.

`is_toplevel_return` now also requires that no method frame is on the
caller chain, which is always the case with earlier JuliaInterpreter
versions. The compat now allows JuliaInterpreter 0.12.

The test steps through a method that calls `Core.eval`, with no compiled
modules: `ALL_MODULES_EXCEPT_MAIN` would compile `Core`, which evaluates
the code natively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidanthoff and others added 2 commits October 3, 2026 15:05
Base only exports invokelatest from Julia 1.9 on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidanthoff
davidanthoff merged commit 997d371 into main Oct 4, 2026
161 checks passed
@davidanthoff
davidanthoff deleted the avi/juliainterpreter-0.12 branch October 4, 2026 19:17
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 this pull request may close these issues.

2 participants