refactor: file matching implementation#2566
Conversation
|
How about we replace most of this with usage of some popular and well tested crate, instead? |
Well, do you have any in mind that we could use? |
|
I don't think that this is very good idea. Reasons below
The motivation to use this crate was to simplify things. In my opinion |
|
|
|
Need any help with this, @sinrohit-desco? |
Yes, I’d appreciate a review of this PR. |
|
Would it be easier to review and better for maintenance and more reliable to switch to |
We were already using the ignore crate, and this PR is specifically about refactoring our usage of it. Previously, we used the So I’m not sure what you mean by “switch to ignore” here. Could you clarify what you think is missing? |
|
I don't see any existing tests. Do you think we should have tests before making such changes? |
Since this is a refactoring PR and does not introduce new functionality, I’d prefer to keep the scope limited to the code changes here. If there are gaps in the existing test coverage, I agree they should be addressed, but I think that should be done in a separate PR. And I am not interested in opening another PR. |
Replace hand-rolled Walker iterator and build_ignore_set with ignore::WalkBuilder from the same ignore crate. Earlier we were using ignore::gitignore API for pattern matching and a custom Walker struct for directory traversal. WalkBuilder combines both — it walks directories and applies gitignore rules.
|
@sinrohit-desco, since @Lymah123 did #2668 we now have tests for this. Would you be willing to take a look? Seems like a formatting issue. |
|
@mightyiam Could you approve the workflows again ? |
|
Thank you for rebasing, @sinrohit-desco! It seems that @Lymah123's #2668 is paying off with a couple of failing assertions here. |
Precursor to #1921