-
Notifications
You must be signed in to change notification settings - Fork 697
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
Don't Glob if Glob Ain't Glob 2: The Globbening #10518
base: master
Are you sure you want to change the base?
Don't Glob if Glob Ain't Glob 2: The Globbening #10518
Conversation
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.
Great work!
Minor points:
- Please squash the "throwaway" commits into the base one
- I wonder if we can try to be even smarter, or whether
GlobFile [Literal filename]
is the only relevant shortcut we can take
The error message in one of the glob tests seems to regress a bit:
My intuition is that I think this is fine, since the speedup is likely more relevant than reporting non-existent directory root rather vs invalid filepath. Do check whether the test itself is meant to test specifically for the behaviour which we're losing, so you can update it accordingly and say the behaviour is now something else (something something, "despite /home/user not existing, we report the error with the full path because of the early "fast" check..."), if that makes sense. |
I actually think this is a pretty confusing message: I'll review the tests, but I'm unsure what's actually failing. |
There's a prior check that separates out the It is slightly faster to bypass the entire parsing step and joining of prefixes like that (as seen in #10502 ), but doing so in a type-safe way requires changing the API. I don't think the marginal performance impact there is worth breaking it.
I looked into the |
RE squashing commits: I'm not great at git, any chance y'all can do a |
@parsonsmatt yes, squashing is easy on our side: we should make sure that the merge label we use is "squash+merge". Moreover, it's the author's job to pick the label, normally. |
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.
Thanks!
Very good @parsonsmatt. Ready to land. |
Thanks! I'm unable to add labels to the PR though. |
@parsonsmatt I just added respective permissions to your account I hope. But I also applied the label to this PR. |
This PR is a less invasive variant of #10502 which moves the special treatment of glob patterns into
runDirFileGlob
directly. Locally, I'm observing a comparable performance improvement to that PR: #10502 takes about 150ms, and this one takes about 250ms.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: