Skip to content

GH-1061: Fix glob matching for non-default file systems - #1062

Merged
ascopes merged 1 commit into
ascopes:mainfrom
alerosmile:fix-proto-filters
Sep 29, 2026
Merged

ascopes merged 1 commit into
ascopes:mainfrom
alerosmile:fix-proto-filters

Conversation

@alerosmile

Copy link
Copy Markdown
Contributor

Fixes GH-1061

@ascopes What do you think about it? IncludesExcludesGlobFilter is not immutable anymore.

@ascopes ascopes left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a concrete fix to me, thanks for raising this!

How difficult do you think it would be to build a reproducing integration test for this in src/main/it?

I think we could probably achieve it by building two modules in a new test case... one makes an archive JAR with the protos and the second consumes it, excluding some sources. The groovy test could just assert that the class outputs do not have corresponding files for the excluded cases.

Either way, this looks good to me! Happy to merge.

@alerosmile alerosmile changed the title Fix glob matching for non-default file systems GH-1061: Fix glob matching for non-default file systems Sep 29, 2026
@alerosmile

Copy link
Copy Markdown
Contributor Author

@ascopes I haven't written an IT for a Maven plugin before either, so I'm not sure yet how much effort it would be.

@ascopes

ascopes commented Sep 29, 2026

Copy link
Copy Markdown
Owner

@alerosmile no problem, I can sort that separately

Have you managed to build this on your side and confirm your projects build successfully now? If so, happy to merge and tag.

@alerosmile

Copy link
Copy Markdown
Contributor Author

@ascopes Thanks! I've built and tested it on my side, and it fixes the issue in our projects. It probably wouldn't hurt to add an IT as well, but I'll need a bit of time to figure out the plugin testing setup first.

Compile glob matchers against the file system of the path being evaluated instead of the default file system. Cache compiled include/exclude matchers per FileSystem using a weakly referenced map to support JAR and other custom file systems while avoiding repeated matcher creation.
@ascopes

ascopes commented Sep 29, 2026

Copy link
Copy Markdown
Owner

cool no worries, can merge this now and happy to take an PR after if you prefer?

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.50%. Comparing base (53bba55) to head (72aa0bf).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1062      +/-   ##
==========================================
+ Coverage   94.49%   94.50%   +0.02%     
==========================================
  Files          79       79              
  Lines        2120     2126       +6     
  Branches      136      136              
==========================================
+ Hits         2003     2009       +6     
  Misses         83       83              
  Partials       34       34              
Flag Coverage Δ
maven-3.9.16-java-17-macos-26 92.48% <100.00%> (+0.03%) ⬆️
maven-3.9.16-java-17-ubuntu-24.04 93.42% <100.00%> (+0.02%) ⬆️
maven-3.9.16-java-17-ubuntu-24.04-arm 92.48% <100.00%> (+0.03%) ⬆️
maven-3.9.16-java-17-windows-2025 92.48% <100.00%> (+0.03%) ⬆️
maven-3.9.16-java-21-ubuntu-24.04 93.42% <100.00%> (+0.02%) ⬆️
maven-3.9.16-java-21-windows-11-arm 92.48% <100.00%> (+0.03%) ⬆️
maven-3.9.16-java-25-ubuntu-24.04 93.42% <100.00%> (+0.02%) ⬆️
maven-3.9.6-java-17-ubuntu-24.04 93.42% <100.00%> (+0.02%) ⬆️
maven-4.0.0-rc-5-java-17-ubuntu-24.04 93.42% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...gin/sources/filter/IncludesExcludesGlobFilter.java 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ascopes
ascopes merged commit bb13827 into ascopes:main Sep 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: includes / excludes do not work for sourceDependencies on Windows

2 participants