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

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Apr 29 21:11:20 UTC 2024


On Mon, 29 Apr 2024 15:44:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: b5030b31
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/b5030b313b8182284e0b9ce90633019bbc4fb7bf
Stats:     11 lines in 2 files changed: 7 ins; 2 del; 2 mod

Make jdk.compiler build depend on code model API in java.base

Reviewed-by: psandoz

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

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


More information about the babylon-dev mailing list