Watchman

What are the performance and reliability implications of watching too many files?

狂风中的少年 提交于 2019-12-02 09:03:38
In Facebook's Watchman application, somewhere in the docs it says this : Most systems have a finite limit on the number of directories that can be watched effectively; when that limit is exceeded the performance and reliability of filesystem watching is degraded, sometimes to the point that it ceases to function. This seems vague to me. Before it "ceases to function", what exactly can I expect to happen if I start watching too many files? And are we talking 100 files, 1,000 files, 100,000 files..? (I realise this number will vary on different systems, but some rough idea of a sensible limit

watchman: I am missing file deletions happening before subscription

放肆的年华 提交于 2019-12-02 08:37:50
I am missing deletes in watchman. Version 4.9.0, inotify. My test code: #!/usr/bin/env python3 import pathlib import pywatchman w = pywatchman.client() w.query('watch', '/tmp/z') clock = w.query('clock', '/tmp/z')['clock'] print(clock) q = w.query('subscribe', '/tmp/z', 'Buffy', {'expression':["since", clock], "fields": ["name", "exists", "oclock", "ctime_ns", "new", "mode"]}) print(q) f = pathlib.Path('/tmp/z/xx') f.touch() data = w.receive() clock = data['clock'] print() print('Touch file:') print(data) print('Clock:', clock) f.unlink() print() print('Delete file:') print(w.receive()) w

React Native `npm start` with watchman error

萝らか妹 提交于 2019-12-01 08:56:48
I was first getting this issue: https://github.com/facebook/react-native/issues/10088 Then I followed this solution to resolve for that issue: https://github.com/facebook/react-native/issues/910#issuecomment-94181845 Now when I enter npm start I get [sane] Warning: Lost connection to watchman, reconnecting.. . Any suggestions? Update: This started happening when I updated my MacOS to MacOS Sierra. Update: So I tried running react-native run-ios which opens a new console window and invokes npm start . Its still gives the [sane] Warning: Lost connection to watchman, reconnecting.. warnings but

React Native `npm start` with watchman error

冷暖自知 提交于 2019-12-01 05:43:33
问题 I was first getting this issue: https://github.com/facebook/react-native/issues/10088 Then I followed this solution to resolve for that issue: https://github.com/facebook/react-native/issues/910#issuecomment-94181845 Now when I enter npm start I get [sane] Warning: Lost connection to watchman, reconnecting.. . Any suggestions? Update: This started happening when I updated my MacOS to MacOS Sierra. Update: So I tried running react-native run-ios which opens a new console window and invokes npm

React Native macOS Android 搭建开发环境

天大地大妈咪最大 提交于 2019-11-30 08:58:20
这个讲的是React Native完整的原生开发环境。 这个环境的搭配,会根据你使用的操作系统、针对的目标平台不同,具体的搭配步骤就会有所不同;如果想同时开发iOS和Android也是没有问题的,你需要先选一个平台开始,对于另一个平台的环境搭建只是稍有不同。 开发平台:macOS、Windows、Linux 目标平台:iOS、Android React Native macOS Android 搭建开发环境: (1)安装依赖 必须安装的依赖有:Node、Watchman和React Native命令行工具以及JDK和Android Studio。 虽然可以使用任何的编辑器来开发应用(编写js代码),但你仍然必须安装Android Studio来获得编译Android应用所需的工具和环境。 我们推荐使用 Homebrew 来安装Node和Watchman,在命令行中执行下列命令: brew install node brew install watchman 注意:如果你已经安装了Node,请检查其Node版本是否在v8.3以上;安装完了Node后建议设置npm镜像以加快后面的过程。 还有需要注意的是不要使用cnpm安装!!!,因为cnpm安装的模块路径比较奇怪,packager不能正常识别。 npm config set registry https://registry.npm