-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Starter project - version of 'globs/rglobs' that uses regular python regular expression syntax #3341
Comments
Does |
Also, please note that we've completely re-implemented these for the new engine, and will be trying to switch the implementation over very shortly. See https://github.com/pantsbuild/pants/blob/master/tests/python/pants_test/engine/exp/test_fs.py#L61 |
@stuhood zglobs wouldn't help, it is powered by the same broken I think this may still be broken in the new engine. I created an RB to demonstrate it: |
@ericzundel : Thanks! @JieGhost noticed that during his most recent review; it is fixed there: https://rbcommons.com/s/twitter/r/3828/ |
Terriffic! So you are planning to cherry pick this into the 1.0.x branch? |
No, this will definitely not go in the 1.0.x branch. The daemon might make
|
for posterity sake: I (misguidedly) took a whack at a glob->regex translator as part of converting master...twitter:kwlzn/pantsd/watchman_ignore#diff-25fffac73b9eb494eb3f5cb839ebfc91R43 with a basic passing test suite here: master...twitter:kwlzn/pantsd/watchman_ignore#diff-d1037a3870180a48a65be900f0aba836R44 the spec itself may need a little more work, but I think we could easily get this to our own custom, ~perfect version of |
Fixing up the fnmatch.translate would be nice if we are going to stick with On Thu, May 26, 2016 at 12:42 AM Kris Wilson [email protected]
|
The implementation of globs has been completely overhauled and normalized in the v2 engine (now the default in master), and it no longer uses Conversion from |
'rglobs()' just barely works, you can't specify a complex expression (like a prefix before the '*') and expect it to work, see twitter-archive/commons#380
Ideally we'd fix the broken underlying function but I've tried it and its not simple! See https://rbcommons.com/s/twitter/r/2351/
But I was thinking that it should be pretty easy to make a new Fileset type that respected python regular expression syntax. Then you could be reasonably certain that any type of expression would work. You could make a version of globs:
and a version of rglobs:
The text was updated successfully, but these errors were encountered: