On Mon, 23 Nov 2026 07:41:46 GMT, Andreas Chmielewski 
<[email protected]> wrote:

> Hi all,
> 
> Please review this change which adds build-time verification for generated AD 
> files.
> 
> The build system currently allows generated .ad files to become out of sync 
> with their corresponding .m4 source files without being detected. This change 
> regenerates the expected AD content during the build and compares it with the 
> checked-in .ad files, reporting an error when differences are detected.
> 
> Additional testing:
> - Manually modified an .m4 source without regenerating the corresponding .ad 
> file and verified that the build fails with a mismatch error:
>   
> https://github.com/chmielewskiandreas/jdk/actions/runs/45191897963/job/137752460509?pr=4#step:9:94
> 
> Thanks,
> Andreas
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

The new script uses m4 as well as shell tools like sed and grep directly from 
the path, bypassing the lookups done in configure. Is there any risk that the 
check would fail if the local version of m4 was different from the one used to 
generate the files? It seems m4 tries to stay stable, but that's not a 
guarantee. Requiring exact output seems brittle.

For this check to fit into the OpenJDK build, it needs to use tools defined in 
configure and only be activated if a suitable m4 version is detected.

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

PR Review: https://git.openjdk.org/jdk/pull/34019#pullrequestreview-6027802265

Reply via email to