On Wed, 18 Feb 2026 18:06:46 GMT, Alan Bateman <[email protected]> wrote:

>> David Beaumont has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains five additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'lworld' into jdk_8377162_exploded_modules/squashed
>>  - revert unnecessary filter in ModulePatcher
>>  - Latest version
>>  - Limit awareness of preview resources to system modules only.
>>    
>>    * limit preview handling
>>    * Patch ModuleReaderTest from mainline
>>  - Preview mode for exploded system module readers
>>    
>>    * with better flag plumbing
>>    * Simpler approach with linked hash set
>>    * Revert weird import change
>>    * First cut at a preview aware module reader for exploded builds
>>    * Test for partiy of JRT file-system and class resources in preview mode
>
> src/java.base/share/classes/jdk/internal/module/ModuleReferences.java line 
> 453:
> 
>> 451:                 files.map(f -> Resources.toResourceName(dir, f))
>> 452:                         .filter(s -> !s.isEmpty())
>> 453:                         .filter(s -> previewDir == null || 
>> !isPreviewEntry(s))
> 
> Okay, so if preview features are not enabled then the META-INF/preview/** 
> resources will appear in the list, just doubling checking.

Yes, this is in contrast to all other ways that preview resources are handled, 
but it means that preview resources are not hidden for things like patched 
modules etc. which is what we discussed offline.

The alternative is to have a 2nd flag (or subclass) for the system module 
reader so it can filter preview things out, but leave other readers not 
caring/knowing about the preview namespace.

> test/jdk/java/lang/module/ModuleReader/ModuleReaderTest.java line 179:
> 
>> 177:         Path previewDir = outDir.resolve("META-INF", 
>> "preview").resolve(pkgPath);
>> 178:         Files.createDirectories(previewDir);
>> 179:         Files.writeString(previewDir.resolve("test.txt"), "Preview 
>> Version");
> 
> The setup for the test is dense. Do you mind putting a blank line before the 
> comment of each step to make it easier to follow the steps.

Done.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2032#discussion_r2827253763
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2032#discussion_r2827257951

Reply via email to