-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
fix: fetchin module from the JDT compiler #3549
Conversation
9567ad5
to
6dd5a94
Compare
Could you move the change to |
6dd5a94
to
1f9876d
Compare
@Strum355 still draft here? Would you be able to add the corresponding test case? |
Thanks a lot for the test case! In Spoon, we try to always have a contract in natural language in each test, see the other Could you add this? Then we merge! |
Added some contracts, let me know if you'd like any amendments to them :) |
Thanks a lot @Strum355 |
Hi, I'm a new code intel SWE at Sourcegraph, and I'll be owning the https://github.com/sourcegraph/lsif-java project for the foreseeable time :)
We came across an issue with Java 9 modules (tracking here), and I discovered a relevant
TODO
https://github.com/INRIA/spoon/blob/d7da4c6684/src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java#L94The following screenshot gives some insight into the state leading up to the exception, where it seems to extract the wrong module name from the file folder
VSCode Java Debugger state
I havent tested this PR in multi-module scenarios, this was the simpler path instead of sorting
this.filenames
andthis.modNames
and determining the most recent module name (from the sorted list), given non module-info.java and package-info.java entries in this.filenames havenull
set for their index inthis.modNames
.If this doesn't work as expected in multi-module scenarios (which I will follow up on after this PR is made), this PR can be amended or a new one made for it.
Thanks :)
Note: I'm relying on CI tests to run as I'm unable to run them locally as of yet