Implement per-source-folder module-info for multi-release compilation#4534
Implement per-source-folder module-info for multi-release compilation#4534laeubi wants to merge 5 commits into
Conversation
|
The reconciler case should now work as well (testcase is missing). |
|
Did you see the compile errors? |
df8762b to
3d604f1
Compare
|
Now there are API errors, I think I'll wait until the next stream opens to fix those... |
It seems I totally missed this - sorry for that. @stephan-herrmann should we go on with this to merge it for the next release stream? Was you able to test if this is fixing your JPMS issues you have seen? |
09a568a to
a8e95f3
Compare
|
@stephan-herrmann finally build is green can you review/merge? |
|
@stephan-herrmann a friendly reminder for review, it would be good to have this in the M1 to allow extended testing period. |
After a large burst of work on type inference I'm back on it now. |
|
For some call paths that are not yet release aware I filed #5149. The following observation, however, might be good to fix in this PR: Using the project from the new test case: Go to any of the
|
|
@laeubi I tried to polish the javadoc for new API, please double check if anything is amiss now. For the build failure I'm sure you understand better than me what is going on here (some baseline checks). |
Is this directly related to classes changed here / module support in general? If not I would prefer to better make smaller PRs than include more than the minimal required to fix one issue at a time. |
I added one comment to a change that looks suspicious the rest seems fine so far.
I think I likely need to re-base the PR if you are fine with that |
This problem can only be reproduced in an MR project with module-info.java, making the feature introduced here appear incomplete / broken. I haven't analyzed where in the code things go wrong. |
If it's a pure rebase with no further changes hidden inside that's fine. |
68161a9 to
61274b7
Compare
I triggered the rebase now, lets see if it helps already...
I can try to take a look but strictly speaking this PR was about compilation so possibly still better to have it in an extra PR as it more seem to surface at the UI. |
Resolve types and modules from the source folder's own release specific module-info.java instead of always using the base module. Fixes duplicate Hover/Open-Declaration results for types only reachable via a higher release module-info.
|
I tried to add a test and fix the issue for this case now by adding MR awareness to the |
Make ASTParser binding resolution, code completion, IType.resolveType and type hierarchy resolution honor a release specific module-info.java in multi-release modular projects. Consolidate release lookup into shared JavaProject.getRelease helpers and add reconcile/AST tests.
|
I now also addressed some other call sites where release awareness was missing. Let me know if you are fine with these or if I should better split up things into individual PRs. |
See issue
@stephan-herrmann this now works for the compilation part but not for the reconciler yet, where I need to check where to inject the info best.
I see two options here: