RFR: 8296390: Incremental build failed with a NPE
Jan Lahoda
jlahoda at openjdk.org
Fri Nov 4 14:13:12 UTC 2022
In [Enter](https://github.com/openjdk/jdk/blob/22347e46f7e66a864ea987fa084c44792cae2e6a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java#L617), we finish verification that imports in files are valid. But, if the module graph is not finished yet (modules are not initialized), we defer checking imports in module-infos until the modules are setup.
What can happen is that `java.base`', if load lazily, may not be completed as part of module system initialization, and can trigger imports check in other module prematurely.
The proposal is to explicitly complete `java.base` while setting up the compile-time module system. Other (named) modules are normally completed around the same time while [building all modules](https://github.com/openjdk/jdk/blob/22347e46f7e66a864ea987fa084c44792cae2e6a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java#L1414).
-------------
Commit messages:
- 8296390: Incremental build failed with a NPE
Changes: https://git.openjdk.org/jdk/pull/10985/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10985&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8296390
Stats: 40 lines in 2 files changed: 39 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/10985.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10985/head:pull/10985
PR: https://git.openjdk.org/jdk/pull/10985
More information about the compiler-dev
mailing list