Hello. Watchman has been quite hard to start with. There's no documentation for getting going quickly as a developer, seeing what's happening. It took a couple hours of reading the docs & playing around on the command line, but I feel like this ought to work:
$ watchman watch-project $(pwd) --no-local
{
"version": "2022.07.04.00",
"watch": "/Users/pinko-fowle/src/my-project",
"watcher": "fsevents"
}
$ watchman watch-list
{
"version": "2022.07.04.00",
"roots": [
"/Users/pinko-fowle/src/my-project"
]
}
$ watchman-replicate-subscription $(pwd) --list
No matching subscriptions
$ watchman-replicate-subscription $(pwd)
Error, no matching subscriptions:
criteria: (name='Any', pid='Any' client='Any')
path: /Users/pinko-fowle/src/my-project
To get a list of subscriptions for a watched root, use:
watchman-replicate-subscription PATH --list
Alas, watchman-replicate-subscription -p 79722pwd--list $(pwd) doesn't work any better than the above attempts.
I don't know how to begin to debug this or figure out what's wrong with this. I'd really love if there was some kind of quick cheatsheet or tutorial for watching watchman in use. I've written my own node-js client and can use this project there acceptably, but the command line interface remains incredibly forboding & that lack of first-use-cli-user-experience very much keeps me from ever consider trying to drive broader adoption of this wonderful tool that I love & can code. Also, what am I doing wrong?
Afaik watchman-replicate-subscription is the only cli tool available that will helpfully show you what is happening without having to go build a json query. (Edit: oohh this is probably the error... I still have to make a subscription don't I? Trying.) This is a huge first step. I've tried searching online for watchman-replicate-subscription, but see very few results.
I had to create a subscription & open a persistent client via cat mysub.json | watchman -j -p. This shows me the subscription actively. And I can run watchman-replicate-subscription on it.
Hello. Watchman has been quite hard to start with. There's no documentation for getting going quickly as a developer, seeing what's happening. It took a couple hours of reading the docs & playing around on the command line, but I feel like this ought to work:
After the above, I can also see:
Alas,
watchman-replicate-subscription -p 79722
pwd--list $(pwd)
doesn't work any better than the above attempts.I don't know how to begin to debug this or figure out what's wrong with this. I'd really love if there was some kind of quick cheatsheet or tutorial for watching watchman in use. I've written my own node-js client and can use this project there acceptably, but the command line interface remains incredibly forboding & that lack of first-use-cli-user-experience very much keeps me from ever consider trying to drive broader adoption of this wonderful tool that I love & can code. Also, what am I doing wrong?
Afaik
watchman-replicate-subscription
is the only cli tool available that will helpfully show you what is happening without having to go build a json query. (Edit: oohh this is probably the error... I still have to make a subscription don't I? Trying.) This is a huge first step. I've tried searching online for watchman-replicate-subscription, but see very few results.