Pass --watcher only when the build watches - #680
Merged
Conversation
tricknotes
marked this pull request as ready for review
September 11, 2026 16:46
tricknotes
force-pushed
the
pass-watcher-only-when-watching
branch
2 times, most recently
from
September 11, 2026 17:25
465b36f to
b662544
Compare
`Command#ember_build` puts `--watcher` on the command line whenever a watcher is configured, whether or not the build watches. The flag names the backend `ember build` watches the file system with, so it has no effect on a build that does not watch: `rake ember:compile` and `assets:precompile` of an application configured with `watcher`, through the app option or `EmberCli.configuration`, carried it for nothing. Gate the flag on `watch`, and say in the classic builder's comment why it only rides along with `--watch`. A watching build is unchanged, and the existing examples for it already pass `watch: true`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tricknotes
force-pushed
the
pass-watcher-only-when-watching
branch
from
September 11, 2026 17:29
b662544 to
1d4bb7b
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Command#ember_buildputs--watcheron the command line whenever a watcher is configured, whether or not the build watches:--watchernames the backendember buildwatches the file system with, so it has no effect on a build that does not watch.rake ember:compileandassets:precompileof an application configured withwatcher— through the app option orEmberCli.configuration.watcher— carry the flag for nothing.The change
Gate the flag on
watch:and say in the classic builder's comment why it only rides along with
--watch. A watching build is unchanged, and the existing examples for it already passwatch: true, so none of them needed editing.Tests
bin/rspec spec/lib/ember_cli/command_spec.rb— 15 examples, 0 failures, including a new one asserting--watcheris omitted from a non-watching buildbin/rspec spec/lib— 2 failures, both (app_spec.rb:192,app_spec.rb:200) failing identically onmain; they neednode_modulesinstalled to find theemberbinary🤖 Generated with Claude Code