Comments (11)
There's no refcounting for watches, though that wouldn't be a bad feature request.
from watchman.
I've been thinking about adding an aging feature for watches. The idea is that you would specify a global configuration with the idle parameters. If the watch has no registered triggers and no connected subscribers, and has not had any queries and has not processed any change notifications for the specified amount of time, we could have watchman automatically cancel the watch.
Meanwhile, don't watch-del
unless you know that you own the watch. The watch can be manually cancelled by the user, and will be automatically cancelled when the dir is removed.
from watchman.
Is there a way to know if I completely own the watch?
(maybe do watch-list
before watching?)
from watchman.
No, there's not a great way to know whether another tool might be interested and actively watching. Since we allow non-persistent polling (eg: you don't need to maintain a socket connection between queries), there isn't a way to know for sure who might want the watch to continue existing, which is why a solution to this is most likely to be implemented by automatically aging out watches as I mentioned above.
from watchman.
Yes, this seems like the best solution. However, this isn't really an issue right now, I'll let you know if it becomes a pressing one.
from watchman.
I think the new watch-project stuff obviates the need for this. I'm going to close this issue; we can revisit if needed in the future.
from watchman.
@wez I would like to still plead my case for a watcher decay of some reasonable half-life.
I still need to update ember-cli to take better advantage of watchman, but even with that (and watch-project) I believe a watcher decay would make watchman a much better citizen.
In my developer workflow it is not uncommon to for me to check out various projects a day, each one then indefinitely leaks watchers.
Why would I checkout another project?
- preview an add-on demo
- fix a bug in an add-on
- code-review
- creating a new add-on
- creating a new app
- creating a new reproduction of an error scenario
Theoretically solutions:
-
conventionalize a shared root for all these activities, and watch the root
unfortunately, this will likely be difficult to conventionalize across the larger OSS community
from watchman.
OK, let's re-open under a different name
from watchman.
We have https://reviews.facebook.net/D37701 in review as a possible implementation of this feature
from watchman.
This has landed in master and will be part of Watchman 3.7 that we're cutting this week
from watchman.
nice, thanks @wez
from watchman.
Related Issues (20)
- watchman on riscv
- why watchman does not support query base on time frame and sorting ability?
- Impossible to install on Amazonlinux HOT 2
- Folly related build issue for ARM Ubuntu 18.04.5 LTS
- Missing RPMs in Release v2023.04.24.00
- WatchMan Error on Docker. Watchman-make is not accessible even after installation.
- "Settle" behavior blocks entire file tree during long running zip operation
- Unable to compile with fmt 10.0.0
- Unable to talk to your watchman on /opt/homebrew/var/run/watchman/[user]-state/sock! HOT 8
- serde_bser: Apache-2.0 license file missing from git repo and published crates
- No Mac OS X binary
- Watchman ignores platform-specific path separators in `dirname` expressions
- Watchman root is set to /Users/<username> despite being run from a different directory HOT 1
- Ubuntu packags missing since May HOT 3
- "I don't know how to install any packages on this system linux-mint-21.2"
- Watchman warns on custom_config example line
- Installation guide HOT 2
- Question - `hint_num_files_per_dir` recursive or not?
- Watchman service is timing out waiting for a synchronization cookie file to be observed by the watcher within 20000 milliseconds HOT 2
- Deploy on winget
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchman.