-
-
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
bug: Spoon crashes because of module-info.java when building model #3417
Comments
This depends on the used JVM. Which JVM do you use? Could you try with some other versions? |
Hi, I'm encountering similar issues while analysing other projects as well. Here are the details of my environment: Java:
Spoon:
Spoon environment.setEncoding(StandardCharsets.UTF_8);
environment.disableConsistencyChecks();
environment.setComplianceLevel(9); // tried even with 13
environment.setIgnoreDuplicateDeclarations(true);
environment.setCommentEnabled(false);
environment.setNoClasspath(true);
environment.setShouldCompile(false); This happens regardless of what At the moment, the only workaround I have for this issue is to ensure Spoon doesn't see the |
Thanks for the additional info. Does the bug also happen with OpenJDK 9? |
I cannot compile my project with Java 9 (only 11 or above), but I created a new project and get the same issue using OpenJDK 9 analysing Joda-Beans with the same settings I mentioned in my previous comment.
The Java version I used:
Link to download my test project: Commit hash of Joda beans: |
Thanks. We had a recent change in the module code #3549 Could you try with master? |
Now it crashes with NullPointerException
|
Would you be able to write a failing test case in a pull request? That would be super helpful. |
I believe that this was fixed in #4073, I now have no trouble parsing Joda-Beans commit @darius-sas can you confirm that the problem is solved on your end? |
Works for me too! |
@darius-sas Thanks for confirming, I'm closing this issue then :) |
java.lang.IllegalStateException: Module should be known
was thrown when I load this project and tried to build a model with it. Before that Spoon demands that the compliance level should be set to 9 and the error was thrown after it was set in Spoon enviroment.All other spoon configurations during run, please check this file
To reproduce :
Error output log:
The text was updated successfully, but these errors were encountered: