Raise BuildError when a build or install command fails - #663
Merged
Conversation
`Runner#run!` exited the calling process when its command failed, so a failing `ember build` or dependency installation terminated any Ruby process running it — `EmberCli.compile!` and `EmberCli.install_dependencies!` callers included, and `App#compile` runs during request handling in development, where a build failure could take the Rails server down with it. Raise `EmberCli::BuildError` instead, naming the command and its exit status. The rake tasks (`ember:compile` / `ember:install`) still exit nonzero, now through the uncaught exception, and a request-time build failure surfaces the same way `BuildMonitor#check!` failures already do. This completes the exit removal started for `ember test`, which raises `EmberCli::TestFailureError` since 0.13.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Runner#run!exited the calling process when its command failed, so a failingember buildor dependency installation terminated any Ruby process running it — callers ofEmberCli.compile!andEmberCli.install_dependencies!included.App#compilealso runs during request handling in development, where a build failure could take the Rails server down with it.Runner#run!now raisesEmberCli::BuildError, naming the command and its exit status, instead of callingexitember:compile/ember:install) still exit nonzero, now through the uncaught exceptionBuildMonitor#check!failures already do (both raiseBuildError)Runner#run!spec (which documented theSystemExit) and add a CHANGELOG entryThis completes the exit removal started for
ember testin #660, which raisesEmberCli::TestFailureErrorsince 0.13.1.Verification
spec/lib: 126 examples, with the only local failure being the known Chrome-dependentApp#testexample (passes on CI); theApp#compileexample exercises a realember buildthrough the new path