-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchman #2458
Watchman #2458
Conversation
Why disable polling? |
@rwjblue in this branch is only to test watchman. Once i patch broccoli-sane-watch or sane to auto-detect I will restore polling. So i wanted to prevent any ambiguity in watcher. This at least gives users who have this problem a resolution for today and help us get feedback. |
Gotcha, thanks for clarifying. Also, another work around today for 0.1.2 is to use |
@stefanpenner by polling you mean LiveReload? I am using this branch and it instantly fixed my Error: watch EMFILE issue without needing a restart but now I lost LiveReload so I have to stop and start my server to see changes in affected files |
polling !==
if live-reload is actually broken, why can't you just refresh the page? |
@stefanpenner actually its prolly more then LiveReload, When I make a change to a file and save, I check my console running ember serve and no rebuild happens, the app doesn't rebuild again with the new change until I restart the server |
@jcope2013 please provide
|
@stefanpenner restart of my computer fixed that issue but randomly my app server crashed and gave me this error message a few hours later
then I started the server back up and it is working fine again node version: v0.11.14 |
I believe this is unrelated, rather a short race during stating.. Likely something in broccoli (thoughts @rwjblue ?) |
ce456a5
to
1cd5a1d
Compare
hasWatchman: function() { | ||
if (/win\d{2}/.test(os.platform())) { | ||
debug('hasWatchman windows -> false'); | ||
return Promise.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to rich object that fulfills with meaningful info.
@stefanpenner updated today to the latest of this branch and now all I see on my screen is this after starting the server after when the first build in the console happens when I make a code change, a fix is to restart my server everytime I make a code change as this white screen only comes after the second and subsequent rebuilds after server launch, I have a co-worker who is also experiencing the same issues node version: v0.11.14 |
@stefanpenner this matches what I was seeing today too. On Monday, November 10, 2014, Josh Cope [email protected] wrote:
|
@lukemelia which version of watchman? |
@lukemelia maybe i can get my hands on your machine tomorrow and do some debugging? |
can you two also try brew install --HEAD watchman |
oops correction I'll try and investigate on luke's machines this mornng |
1cd5a1d
to
275d628
Compare
if you guys can update to the latest version of this branch and start ember with: DEBUG=express*,ember-cli:watcher* ember s And then provide the output (from the boot that it boots to the point that it stops working) |
➜ account git:(account-section) ✗ DEBUG=express*,ember-cli:watcher* ember s
version: 0.1.2
ember-cli:watcher init +0ms
ember-cli:watcher hasWatchman: `which watchman` +3ms
express:application compile etag weak +0ms
express:application compile query parser extended +1ms
express:application compile trust proxy false +0ms
express:application booting in development mode +1ms
express:router use / query +2ms
express:router:layer new / +1ms
express:router use / expressInit +1ms
express:router:layer new / +0ms
express:router use / <anonymous> +0ms
express:router:layer new / +0ms
express:router use /ember-cli-live-reload.js <anonymous> +5ms
express:router:layer new /ember-cli-live-reload.js +0ms
express:router use / <anonymous> +11ms
express:router:layer new / +0ms
Livereload server on port 37532
Serving on http://0.0.0.0:6003/prefs/
ember-cli:watcher buildOptions: watchman found +574ms
ember-cli:watcher buildOptions { polling: false, verbose: true, watchman: true } +0ms
using: WatchmanWatcher
ember-cli:watcher didChange: { directory: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-LvhAIs8c.tmp', graph: { tree: { inputTrees: [Object], options: [Object], description: 'TreeMerger (allTrees)', tmpDestDir: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-LvhAIs8c.tmp' }, subtrees: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object] ], selfTime: 12863043, totalTime: 35006989860, directory: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-LvhAIs8c.tmp' }, totalTime: 35006989860, filePath: undefined } +35s
Build successful - 35007ms.
Slowest Trees | Total
-------------------------------+----------------
EsnextFilter | 17980ms
JSHint - App | 5573ms
EsnextFilter | 2790ms
ES6Concatenator | 2166ms
ES3SafeFilter | 1946ms
ember-cli:watcher didInitialize +28ms
express:router dispatching GET /prefs/assets/vendor.css +45s
express:router query : /prefs/assets/vendor.css +2ms
express:router expressInit : /prefs/assets/vendor.css +1ms
express:router <anonymous> : /prefs/assets/vendor.css +0ms
express:router <anonymous> : /prefs/assets/vendor.css +1ms
express:router dispatching GET /prefs/assets/account.css +8ms
express:router query : /prefs/assets/account.css +1ms
express:router expressInit : /prefs/assets/account.css +0ms
express:router <anonymous> : /prefs/assets/account.css +0ms
express:router <anonymous> : /prefs/assets/account.css +0ms
express:router dispatching GET /prefs/assets/vendor.js +4ms
express:router query : /prefs/assets/vendor.js +0ms
express:router expressInit : /prefs/assets/vendor.js +0ms
express:router <anonymous> : /prefs/assets/vendor.js +0ms
express:router <anonymous> : /prefs/assets/vendor.js +0ms
express:router dispatching GET /prefs/assets/account.js +87ms
express:router query : /prefs/assets/account.js +1ms
express:router expressInit : /prefs/assets/account.js +2ms
express:router <anonymous> : /prefs/assets/account.js +0ms
express:router <anonymous> : /prefs/assets/account.js +1ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.woff +2s
express:router query : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.woff +0ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.woff +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.woff +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.woff +0ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.ttf +223ms
express:router query : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.ttf +0ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/regular/ProximaNova-Reg-webfont.ttf +0ms
express:router dispatching GET /prefs/assets/account.js +67ms
express:router query : /prefs/assets/account.js +0ms
express:router expressInit : /prefs/assets/account.js +0ms
express:router <anonymous> : /prefs/assets/account.js +0ms
express:router <anonymous> : /prefs/assets/account.js +0ms
express:router dispatching GET /prefs/assets/images/site-header/yapp_120x52.png +3s
express:router query : /prefs/assets/images/site-header/yapp_120x52.png +0ms
express:router expressInit : /prefs/assets/images/site-header/yapp_120x52.png +0ms
express:router <anonymous> : /prefs/assets/images/site-header/yapp_120x52.png +0ms
express:router <anonymous> : /prefs/assets/images/site-header/yapp_120x52.png +0ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.woff +5ms
express:router query : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.woff +0ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.woff +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.woff +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.woff +0ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.woff +32ms
express:router query : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.woff +0ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.woff +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.woff +1ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.woff +0ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.ttf +284ms
express:router query : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.ttf +1ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/light/ProximaNova-Light-webfont.ttf +0ms
express:router dispatching GET /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.ttf +2ms
express:router query : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.ttf +0ms
express:router expressInit : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.ttf +0ms
express:router <anonymous> : /prefs/assets/fonts/proxima-nova/thin/ProximaNova-Thin-webfont.ttf +0ms
file changed components/user-info-name.js
ember-cli:watcher didChange: { directory: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-2YkHfEjg.tmp', graph: { tree: { inputTrees: [Object], options: [Object], description: 'TreeMerger (allTrees)', tmpDestDir: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-2YkHfEjg.tmp' }, subtrees: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object] ], selfTime: 22924917, totalTime: 4012974955, directory: '/Volumes/EmberCliRamdisk/account/tree_merger-tmp_dest_dir-2YkHfEjg.tmp' }, totalTime: 4012974955, filePath: '/Users/lmelia/p/yapp/account/app/components/user-info-name.js' } +27s
Build successful - 4013ms.
Slowest Trees | Total
-------------------------------+----------------
EsnextFilter | 694ms
CustomStaticCompiler | 452ms
JSHint - App | 304ms
ES6Concatenator | 254ms
TreeMerger (app) | 207ms
express:router dispatching GET /prefs/assets/vendor.css +16s
express:router query : /prefs/assets/vendor.css +0ms
express:router expressInit : /prefs/assets/vendor.css +0ms
express:router <anonymous> : /prefs/assets/vendor.css +0ms
express:router <anonymous> : /prefs/assets/vendor.css +1ms
express:router dispatching GET /prefs/assets/account.css +6ms
express:router query : /prefs/assets/account.css +0ms
express:router expressInit : /prefs/assets/account.css +0ms
express:router <anonymous> : /prefs/assets/account.css +0ms
express:router <anonymous> : /prefs/assets/account.css +0ms
express:router dispatching GET /prefs/assets/vendor.js +4ms
express:router query : /prefs/assets/vendor.js +0ms
express:router expressInit : /prefs/assets/vendor.js +0ms
express:router <anonymous> : /prefs/assets/vendor.js +0ms
express:router <anonymous> : /prefs/assets/vendor.js +0ms
express:router dispatching GET /prefs/assets/account.js +36ms
express:router query : /prefs/assets/account.js +0ms
express:router expressInit : /prefs/assets/account.js +0ms
express:router <anonymous> : /prefs/assets/account.js +0ms
express:router <anonymous> : /prefs/assets/account.js +1ms
|
@stefanpenner also having the same problem here node version: v0.10.32
|
I am able to reproduce, but only when large amounts of files are changed. (e.g. via git co) I am also not convinced it is watchman related, let me try and confirm, |
Just updated to 3.0.0 on watchman (from 2.9.8), getting the same error as before after changing any files:
|
I believe I have found the problem, it is a race between the watcher, builder and broccoli middleware. This PR makes aspects of the watcher async, I suspect that is causing the issue. I will investigate tonight. It appears we are serving files that no-longer exists, the tmp dir backing the files we want to serve has already been pruned. Possibilities: we are trying to serve stale data, we are trying to server files that do not yet exists (but will shortly) this seems unlikely, or the files we are trying to serve have been remove per-maturly. I'm out of time, I will have to look into it tonight. On a positive note, this appears to have nothing to do with watchman, but rather how we are detecting watchman. If we move the detection earlier, this will be fine. I would like to see if we can remove this race to allow for more flexibility here. |
688af72
to
7f9899d
Compare
i have removed the auto-detection for now, and will restore it later. This branch should once again work for people with watchman installed https://github.com/stefanpenner/ember-cli/tree/watchman-auto still exists for auto-detection, but i will need to address the broccoli <-> watcher async race before it will work. Or more likely cheat, and do the detection earlier. |
7f9899d
to
868a84d
Compare
Has anybody had issues with broccoli-less-single on this branch? It seems like less files aren't being compiled and just getting copied over to dist. Going to investigate more, just wanted to check in version: 0.1.2 |
DOH seeing now the readme was updated.... |
0e4df26
to
2c869ae
Compare
@@ -100,7 +100,7 @@ | |||
"broccoli-jshint": "0.5.3", | |||
"broccoli-kitchen-sink-helpers": "0.2.5", | |||
"broccoli-merge-trees": "0.2.1", | |||
"broccoli-sane-watcher": "0.0.7", | |||
"broccoli-sane-watcher": "krisselden/broccoli-sane-watcher", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll need to cut a new one.
dc2a688
to
cc82ad4
Compare
…and it doesn’t export a function
cc82ad4
to
3762c50
Compare
[fixes #2226]
*nix
and wont support windows.To use:
use node
v0.11.x
use this branch:
install watchman:
docs: https://facebook.github.io/watchman/
watchman version
returns json payload of the person which would allow us to use node-semver to ensure a valid and compliant version is used.Commenters reporting issues, please provide: