On Mon, 2 Mar 2026 12:38:32 GMT, David Beaumont <[email protected]> wrote:
> After talking with Jan, this seemed the better option. What would the Filer > API have simplified here? After some further consideration, I could give better guidance if I understood more about the overall architecture about how the annotation processor was being used in the build process and how the Valhalla build would be sequenced with this change. I have not attempted to research how the Valhalla build differs from a mainline build, but I'm generally aware there is some kind of post-processing of classes in java.base to make them value classes in the Valhalla images output. I think two basic approaches to running an annotation processor to aid the post processing would be: 1) As an integrated part of the "base build", have the annotation processor run and generate the new source files in the chosen directory. (Is these were completely new files and new not meant to replace existing files in the output, the compilation of the new files could be handled as part of the built-in annotation processing compilation machinery). 2) As a post-pass after the base build, scan over the source (or class files) in question and find the annotated classes to have replacements be generated. For something closer to 1) the Filer has a few facilities to do extra checking and some infrastructure for concepts like the SOURCE_OUTPUT location. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2180#discussion_r2873901326
