[code-reflection] RFR: Make jdk.compiler build depend on code model API in java.base

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Apr 29 15:49:34 UTC 2024


This PR fixes a nasty build issue where the jdk.compiler copy of the code model classes were not re-generated during an incremental build after a code model API or implementation change. This resulted in weird situations where, after a breaking change and an incremental build, compiler tests would seem fine, because they would really run against the unmodified copy of the code model classes (that were not regenerated after the breaking change).

The fix is to add the code model java files under `src/java.base/share/classes/java/lang/reflect/code` as dependencies of the `GENSTUBS` target for the `jdk.compiler` module.

To test, I've tried to make `CoreOps::conv` to throw an exception unconditionally, then rebuild incrementally and run the compiler tests, to check that they were indeed seeing the new exception.

-------------

Commit messages:
 - Revert suprious test change
 - Initial push

Changes: https://git.openjdk.org/babylon/pull/65/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=65&range=00
  Stats: 9 lines in 1 file changed: 7 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/babylon/pull/65.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/65/head:pull/65

PR: https://git.openjdk.org/babylon/pull/65


More information about the babylon-dev mailing list