-
Notifications
You must be signed in to change notification settings - Fork 205
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
rake ember:compile returns 0 exit code even with failed compilation #417
Comments
@wireframe thanks, this is certainly a bug. I'll look into it. |
@wireframe on further inspection, things might be behaving properly. The Other than the logs containing output about missing dependencies (which might come from |
after running NOTE: I've disabled the auto-rebuild with each web request due to other issues. |
@wireframe I've tried to reproduce your issues with https://github.com/seanpdoyle/ember-cli-rails-heroku-example, but I'm having some trouble. The Could you pull https://github.com/seanpdoyle/ember-cli-rails-heroku-example down and try to reproduce? If you're able to, could you share the steps it took on this issue? If there are code changes required to make the app more similar to your current project, could you fork it and push a branch? |
I just ran into an issue as well ... I had an issue on one machine, that
The command finishes successfully, but the app is not available and if I look into the log file, this:
This is particularly annoying if this happens in |
As a side note ... If i.e.
|
@klaustopher thanks for the additional information.
I'm not familiar with either of those files or the directory they're located in. Could you explain their significance, and maybe link to some documentation about them? |
ehrm, I have no idea what they are for exactly ... I think it might have something to do with this: https://www.npmjs.com/package/configstore But the problem is, not with this file exactly. The problem is, that an error happens during |
@klaustopher @wireframe using https://github.com/seanpdoyle/ember-cli-rails-heroku-example as a base application, I've done some digging and extracted the shell command that Running it (with ~/src/ember-cli-rails-heroku-example/frontend master
❯ /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log'
Missing npm packages:
Package: ember-data
* Specified: 1.13.15
* Installed: (not installed)
Run `npm install` to install missing dependencies.
~/src/ember-cli-rails-heroku-example/frontend master
❯ echo $?
0 Without the call to ~/src/ember-cli-rails-heroku-example/frontend master
❯ /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend'
Missing npm packages:
Package: ember-data
* Specified: 1.13.15
* Installed: (not installed)
Run `npm install` to install missing dependencies.
~/src/ember-cli-rails-heroku-example/frontend master
❯ echo $?
1 It looks like piping the output to I'll investigate further. |
@thoughtbot/shell can anyone help with #417 (comment)? |
The strange thing is, that |
Using ~/src/ember-cli-rails-heroku-example/frontend master
❯ set -o pipefail; /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log'
Missing npm packages:
Package: ember-data
* Specified: 1.13.15
* Installed: (not installed)
Run `npm install` to install missing dependencies.
~/src/ember-cli-rails-heroku-example/frontend master
❯ echo $?
1 |
@klaustopher they're not "handled" different, in that they're both generated by EmberCli::Command and run through EmberCli::Runner, but they're different commands. |
Then it's really, really strange, that they handle failures differently, I'll take a look tomorrow morning, workday is over ;) |
Closes [#417]. The following is the command `ember-cli-rails` generates for `rake ember:compile`. It was generated using [the example application][repo]. ```bash /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log' Pipes are streaming, so the pipe to `tee` will open before the first program finishes writing, potentially ignoring a non-zero exit status. The solution is to set the [`pipefail`][docs] option for the generated sub-command. [repo]: https://github.com/seanpdoyle/ember-cli-rails-heroku-example [#417]: #417 [docs]: http://www.gnu.org/software/bash/manual/html_node/Pipelines.html
Looking at https://github.com/thoughtbot/ember-cli-rails/blob/master/lib/ember_cli/shell.rb#L44, the install commands are executed directly by the runner, whereas the compile step (https://github.com/thoughtbot/ember-cli-rails/blob/master/lib/ember_cli/shell.rb#L17) is run by an |
@wireframe @klaustopher could you try the # Gemfile
gem "ember-cli-rails", github: "thoughtbot/ember-cli-rails", branch: "set-pipefail" |
Closes [#417]. The following is the command `ember-cli-rails` generates for `rake ember:compile`. It was generated using [the example application][repo]. ```bash /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log' Pipes are streaming, so the pipe to `tee` will open before the first program finishes writing, potentially ignoring a non-zero exit status. The solution is to set the [`pipefail`][docs] option for the generated sub-command. [repo]: https://github.com/seanpdoyle/ember-cli-rails-heroku-example [#417]: #417 [docs]: http://www.gnu.org/software/bash/manual/html_node/Pipelines.html
version 0.7.2
set-pipefail branch:
Looks good to me! 👍 I cannot test on an ubuntu machine before tomorrow morning, but I just tested that |
Closes [#417][#417]. The following is the command `ember-cli-rails` generates for `rake ember:compile`. It was generated using [the example application][repo]. ```bash /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log' Pipes are streaming, so the pipe to `tee` will open before the first program finishes writing, potentially ignoring a non-zero exit status. The solution is to set the [`pipefail`][docs] option for the generated sub-command. [repo]: https://github.com/seanpdoyle/ember-cli-rails-heroku-example [#417]: #417 [docs]: http://www.gnu.org/software/bash/manual/html_node/Pipelines.html
Closes [#417][#417]. The following is the command `ember-cli-rails` generates for `rake ember:compile`. It was generated using [the example application][repo]. ```bash /Users/seanpdoyle/src/ember-cli-rails-heroku-example/frontend/node_modules/.bin/ember build --environment 'development' --output-path '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/tmp/ember-cli/apps/frontend' | /usr/bin/tee -a '/Users/seanpdoyle/src/ember-cli-rails-heroku-example/log/ember-frontend.development.log' ``` Pipes are streaming, so the pipe to `tee` will open before the first program finishes writing, potentially ignoring a non-zero exit status. The solution is to set the [`pipefail`][docs] option for the generated sub-command. [repo]: https://github.com/seanpdoyle/ember-cli-rails-heroku-example [#417]: #417 [docs]: http://www.gnu.org/software/bash/manual/html_node/Pipelines.html
@wireframe @klaustopher could you try the latest version of the (now poorly named) It uses an alternative (hopefully cross platform) solution. |
see comment in the PR, it fails again :/ |
Closes [#417]. Instead of piping output to the [`tee`][tee] command (which was previously swallowing non-zero exit statuses), capture output from `Open3.capture2e` and write to both the specified log file and `STDOUT`. [#417]: #417 [tee]: http://man7.org/linux/man-pages/man1/tee.1.html
@klaustopher @wireframe could you try out the # Gemfile
gem "ember-cli-rails", github: "thoughtbot/ember-cli-rails", branch: "remove-tee" |
Closes [#417]. Instead of piping output to the [`tee`][tee] command (which was previously swallowing non-zero exit statuses), capture output from `Open3.capture2e` and write to both the specified log file and `STDOUT`. [#417]: #417 [tee]: http://man7.org/linux/man-pages/man1/tee.1.html
compiling the app via rake appears like everything is fine, but grepping my
log/ember-appname.development.log
log file is littered with error messages like this:raising an error with a truncated (or full) error from the shell/log would be hugely helpful.
The text was updated successfully, but these errors were encountered: