On Wed, 10 Dec 2025 10:15:34 GMT, Jan Lahoda <[email protected]> wrote:

>> OK, I see -- this is an "hidden" option, just used internally by javac to 
>> communicate to the file manager whether preview mode should be enabled or 
>> not. I now see the same pattern being used as that for multirelease jars.
>
> Yes - we need a separate option, as (AFAIK) the current framework does not 
> allow options to be used both for and outside of file managers.
> 
> We more or less need to send the preview mode using an option/`handleOption`, 
> as the file manager may be a file manager provided by the user, and only 
> delegate to `JavacFileManager`. That's the same reason why `--multi-release` 
> is used for file managers.

If either of you think an additional comment would help future maintainers 
here, let me know what it should be.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1761#discussion_r2622813360

Reply via email to