Repository navigation
Support JuliaInterpreter 0.12 - #139
Merged
Merged
Conversation
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>
Base only exports invokelatest from Julia 1.9 on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JuliaInterpreter 0.12 interprets the code passed to
Core.eval(JuliaDebug/JuliaInterpreter.jl#783), in frames with aModulescope below the frame of the calling method.is_toplevel_returntook any frame with aModulescope 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_returnnow 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,Coreis compiled, soCore.evalkeeps evaluating the code natively, and nothing changes in behavior or speed. Only whenCoreis 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 callsCore.evalwith 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).