[code-reflection] RFR: Regression: compiler SPI does not work with exploded build
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Nov 21 22:00:45 UTC 2024
The recent refactoring from compiler plugin to simple SPI introduced a regression.
With compiler plugins, the code-reflection extension was effectively loaded in two steps:
* if the code reflection module was not available in the boot layer, then an attempt was made to load it from a fresh layer created on the fly
* otherwise, plugins were searched in the boot layer (like for any other regular plugin)
When running in exploded mode, incubating modules are part of the boot layer, so they are loaded normally (w/o the need of an extra layer).
Unfortunately, the recent refactoring from plugin to SPI removed the second kind of lookup, meaning that now javac will no longer look for an extension in the boot layer.
The solution is simple: javac should look in the fresh layer if it has created one (meaning the incubating module is not part of the boot layer); otherwise, it should just look for the extension in the boot layer.
-------------
Commit messages:
- Fix issue with exploded build
Changes: https://git.openjdk.org/babylon/pull/278/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=278&range=00
Stats: 7 lines in 1 file changed: 0 ins; 4 del; 3 mod
Patch: https://git.openjdk.org/babylon/pull/278.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/278/head:pull/278
PR: https://git.openjdk.org/babylon/pull/278
More information about the babylon-dev
mailing list