[WIP] implement recursive analysis infrastructure#236
Draft
Conversation
c18c845 to
fc68d4e
Compare
Owner
|
I think we're good to go with this approach. We'll need to add tests, but that might be a bit tricky. Alternatively, we could use a test routine that directly analyzes Besides the tests, is the plan for this PR to refactor the JET side to simplify its implementation? Or do you plan to address any items from open discussions or the future work list, which all sound reasonable to me. |
Collaborator
Author
|
Right now I’m working on refactoring and fixing some minor bugs related to module usage in JET. I think it will reduce rework if I fix these first and then proceed with the refactor. Writing the overall tests themselves shouldn’t be a difficult, though the increase in test time might be a bit troublesome. |
2d8d1d9 to
21e0020
Compare
d9b1adb to
6bd8cc5
Compare
6bd8cc5 to
e644c42
Compare
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.
This PR enables JETLS to perform recursive analysis by following dependencies.
(Error detection in InlineStrings.jl when opening CSV.jl)
Overview of the Implementation
The implementation mimics Julia’s package loading: it locates the package and performs a properly handled
include. In ultimatly simplified form, the process is just follows:Additional Details
Open Discussions
This implementation relies heavily on Julia’s internal package loading mechanisms. It may require maintenance to track upstream changes. If a more robust approach becomes available, it should replace the current one.
Also, since the current implementation performs very danger operations on loaded_modules, there is a possibility of critical errors occurring during the analysis of
Baseor when JETLS itself uses the same package as the one being analyzed. My view is that this can be addressed with detailed technical fixes (for example, enablingBase.register_root_moduleto load modules somewhere other thanloaded_modules).Future Work
Caching
Config Enhancements
exclude.I opened this PR to share the direction early.
On the JET side, I plan to do some refactoring soon to remove the duplicated parts from
usemodule_with_err_handling, which has become large and unwieldy. I also haven’t done much work yet on version checks or tests for a working implementation, so I will address those as well. Once these tasks are completed and the points listed under Open Discussions are resolved, I believe this can be merged.