tricknotes / ember-cli-rails

Unify your EmberCLI and Rails Workflows
http://thoughtbot.github.io/ember-cli-rails/
MIT License
713 stars 205 forks source link

Log SKIP_EMBER when true in Development #566

Open Samsinite opened 6 years ago

Samsinite commented 6 years ago

Hi, at work we love this gem and appreciate the hard work that has been put into it.

Just ran into an issue where a co-worker accidentally had SKIP_EMBER=true in development, and it took us 20 minutes to track down. I was thinking that it would be useful to log to the server that SKIP_EMBER=true when in development and there is a build error, thoughts?

Samsinite commented 6 years ago

If interested, I would be more than happy to work on a PR, it would be a feature that could likely save our team time in the future.

seanpdoyle commented 6 years ago

@Samsinite I like this idea!

How would we structure the communication of how the application is configured?

ember-cli outputs a block of dependencies and version numbers at the start of commands like ember serve and ember test, were you thinking of something similar?

Samsinite commented 6 years ago

Honestly, I haven't put a lot of thought into the structure of the log message. What would you prefer the log message to look like or say?

seanpdoyle commented 6 years ago

Honestly, I haven't put a lot of thought into the structure of the log message. What would you prefer the log message to look like or say?

I'm less focussed on the structure of the log message, and more thinking about when and how it should be communicated.

Just ran into an issue where a co-worker accidentally had SKIP_EMBER=true in development, and it took us 20 minutes to track down.

At what point in the process would some indication that SKIP_EMBER=true be most helpful?

Samsinite commented 6 years ago

What about adding a check for app.development? and app.skip? here: https://github.com/thoughtbot/ember-cli-rails/blob/989e6101277c7ef35bfb02e47cefbc6da656dd6a/lib/ember_cli/deploy/file.rb#L49

Thoughts? Unless I am mistaken, the current gem structure should make this feature fairly straight forward.

Samsinite commented 6 years ago

Or, if we should just warn regardless when in development, we could add a method that does the check and warn if true, then call it in https://github.com/thoughtbot/ember-cli-rails/blob/989e6101277c7ef35bfb02e47cefbc6da656dd6a/lib/ember_cli/deploy/file.rb#L19

Seems like it could still be useful to warn, even if the build is successful.