GH-1061: Fix glob matching for non-default file systems - #1062
Conversation
ascopes
left a comment
There was a problem hiding this comment.
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.
|
@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. |
|
@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. |
|
@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.
54e4910 to
72aa0bf
Compare
|
cool no worries, can merge this now and happy to take an PR after if you prefer? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes GH-1061
@ascopes What do you think about it?
IncludesExcludesGlobFilteris not immutable anymore.