Skip to content
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

Better watchman queries in the wrapper #359

Merged
merged 2 commits into from
Jan 27, 2017
Merged

Better watchman queries in the wrapper #359

merged 2 commits into from
Jan 27, 2017

Conversation

kageiit
Copy link
Contributor

@kageiit kageiit commented Jan 27, 2017

  • Fixes watchman query fail #302
  • Uses more performant query syntax. Thanks to @wez
  • The buckWrapper now creates a .watchmanconfig file at the project root if it does not exist already

@kageiit kageiit mentioned this pull request Jan 27, 2017
["query", "$WORKING_DIR", {
"expression": ["allof",
["type", "f"],
["anyof",
["imatch", "**/BUCK", "wholename"],
["imatch", ".buckconfig.local", "wholename"]
["name", "BUCK"],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

["name", ["BUCK", ".buckconfig.local"]]

turns these two lines into a faster hash set lookup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

["query", "$WORKING_DIR", {
"expression": ["allof",
["type", "f"],
["anyof",
["imatch", "**/BUCK", "wholename"],
["imatch", ".buckconfig.local", "wholename"]
["name", ["BUCK", ".buckconfig.local"]]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wez I have fixed this up as you suggested. Thanks!

Learnt a lot more about watchman through this exercise :)

@kageiit kageiit merged commit 9005261 into master Jan 27, 2017
@kageiit kageiit deleted the better_watchman branch January 27, 2017 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants