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)
- fb-watchman license listed as Apache-2.0 on NPM HOT 1
- Ubuntu .deb file not present in the latest release HOT 6
- Watchman is running at a lower than normal priority. HOT 1
- Watchman/buck2 integration
- Version v2023.12.18.00 just hangs on mac
- not bin HOT 1
- Publish new serde_bser version
- Installation error: ‘CertUtils’ has not been declared in ‘fizz (Ubuntu 22.04.3 LTS) HOT 3
- Unable to install watchman on arch HOT 2
- Prebuilt Linux binaries are unusable on any modern system HOT 5
- PCRE link is broken
- MacOS binaries missing HOT 5
- Hard dependency on Homebrew HOT 1
- Windows binaries are missing
- Unable to install pywatchman
- Unable to build watchman from source for ubuntu in the latest versions of releases HOT 1
- Could you provide `fc39.x86_64.rpm`? HOT 1
- Error from yarn gets written into plist
- Prebuilt macOS binaries no longer exist HOT 5
- `watchman list` command crashes with boost/icu4c HOT 1
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.