[BUGFIX release] Re-add the --watcher flag to build, so that when using vite, we don't run out of watchers on macOS, and allow watchman usage#10859
Conversation
… run out of watchers on macOS, and allow watchman usage
|
anyway to add a test? |
|
other than fixing the fixture/output tests, there is 0 prior art to testing watchman in the repo, and we don't test on macOS, so ... testing the specific situation here might be more effort than it's worth. Adding the I think I'm going to do that -- in which case, tests should start passing |
…BUILD), add a condition to modals/command around where watchman _would_ get used when EMBROIDER_PREBUILD is active
|
I didn't think we needed a test for watchman, just that the correct option is there with and without vite. I believe there are tests I edited when I changed the availableOptions where that would make sense. Also we do test on MacOS... the entire matrix, I believe. |
|
For ember-cli, using release-plan, you should target #release branch |
Exploration in Discord: https://discord.com/channels/480462759797063690/568935504288940056/1432791167799656469
The problem is here:
ember-cli/lib/models/command.js
Line 315 in 01a68b9
We never enter this block unless a
watcheroption is present. when doingember s,watcherhas a default value of"events", specified here:ember-cli/lib/commands/serve.js
Line 57 in 01a68b9
availableOptionsduring$EMBROIDER_PREBUILD-- which opts thebuild --watchthatcompatPrebuildis doing out of usingwatchman(which is a requirement to do anything on macOS with watched files).NOTE:
availableOptionswas found as being relevant while debuggingparseArgsember-cli/lib/models/command.js
Line 554 in 01a68b9
watcher-- which is required to use watchman.ember-cli/lib/models/command.js
Line 584 in 01a68b9
An alternate implementation of this PR is to always use watchman if process.env.EMBROIDER_PREBUILD is present (or rather, assume we "have a watcher" -- and let our call to WatchDetector figure it out -- (Linux, for example, doesn't need watchman))