facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.72k stars 994 forks source link

Request for clarification: since and suffix interaction #944

Closed conartist6 closed 3 years ago

conartist6 commented 3 years ago

I'm working on a build system and I'd really like to be able to view all files with some set of suffixes which have changed since a particular clock time and whose names matcher certain user-supplied globs.

My reading of the docs says that since is a generator and suffix is a generator and that if I specify both in my query the result will not be what I naively expect (a list of files with particular suffixes changed since a particular clock), but rather all files with particular suffixes (regardless of when they were changed) concatenated with a list of all changed files (regardless of their suffix).

Because this would be such a surprising result I am requesting clarification. At the moment I believe the docs are simply wrong or outdated. Looking at the code I see only SuffixExpr, a class which seems to filter a result set generated elsewhere (just as I would naively suspect).

conartist6 commented 3 years ago

The particular documentation that I suspect is misleading is here

conartist6 commented 3 years ago

Ah I see, suffix shows up two ways, as a generator and as an expression term. I want to since generator with the suffix expression term.

conartist6 commented 3 years ago

Ah, but that feature is bleeding edge -- it's in 5.0, which is as yet unreleased (though it's not clear how much that matters for a package whose current primary distribution method is building from sources).