-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
globset: fix recursive suffix over matching #1756
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BurntSushi
approved these changes
May 31, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, thank you!
BurntSushi
added
the
rollup
A PR that has been merged with many others in a rollup.
label
May 31, 2021
BurntSushi
pushed a commit
that referenced
this pull request
May 31, 2021
Previous, 'foo/**' would match 'foo', but it shouldn't have. In this case, not matching 'foo' is what is documented and also seems consistent with other recursive globbing implementations (like that in zsh). This also updates the prefix extractor to pull 'foo/' out of 'foo/**'. Closes #1756
BurntSushi
pushed a commit
that referenced
this pull request
Jun 1, 2021
Previous, 'foo/**' would match 'foo', but it shouldn't have. In this case, not matching 'foo' is what is documented and also seems consistent with other recursive globbing implementations (like that in zsh). This also updates the prefix extractor to pull 'foo/' out of 'foo/**'. Closes #1756
facebook-github-bot
pushed a commit
to facebookincubator/reindeer
that referenced
this pull request
Jun 15, 2021
Summary: The only real change here is: BurntSushi/ripgrep#1756 This is a patch release but fixes a very glaring bug that others have depended on. This diff fixes the uses to match the old behavior. Although it's billed as a "fix", it's actually a huge perf improvement for Linttool, which uses predominantly recursive suffix globs. The fact that we don't have to compile ~5,000 regexps at Linttool startup anymore makes such a huge difference that I am going to do write up soon. Reviewed By: ndmitchell Differential Revision: D29085977 fbshipit-source-id: 304470e5fa8cb986738aa0d9dd941641684a9194
facebook-github-bot
pushed a commit
to facebook/sapling
that referenced
this pull request
Jun 15, 2021
Summary: The only real change here is: BurntSushi/ripgrep#1756 This is a patch release but fixes a very glaring bug that others have depended on. This diff fixes the uses to match the old behavior. Although it's billed as a "fix", it's actually a huge perf improvement for Linttool, which uses predominantly recursive suffix globs. The fact that we don't have to compile ~5,000 regexps at Linttool startup anymore makes such a huge difference that I am going to do write up soon. Reviewed By: ndmitchell Differential Revision: D29085977 fbshipit-source-id: 304470e5fa8cb986738aa0d9dd941641684a9194
passcod
added a commit
to watchexec/watchexec
that referenced
this pull request
Jul 10, 2021
Breakage caused by this fix: BurntSushi/ripgrep#1756 The fix is correct, but it does break a lot of stuff :/
Even though I agree this is a fix as per documentation, perhaps it should have been a semver bump? It changed behaviour (and broke my tests)... |
Perhaps. But in this case, this is bringing the implementation in line with documented behavior. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The syntax documentation correctly states how recursive suffixes should
behave:
Previously
**
would actually matchfoo
. This patch makes it so thatit doesn't. Also adds support to the "prefix" strategic matcher so that
it handles common cases like
foo/**
.