Skip to content
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

Detect broken build state #23

Closed
rwz opened this issue Dec 14, 2014 · 9 comments
Closed

Detect broken build state #23

rwz opened this issue Dec 14, 2014 · 9 comments
Assignees

Comments

@rwz
Copy link
Collaborator

rwz commented Dec 14, 2014

Sometimes EmberCLI fails to build assets due to syntax error. Rails does not provide any sort of feedback and continues to serve an old pre-fail version of assets. All that results in the situation where developer refreshes the page several times not realizing that the changes he just made are not included into the resulting assets.

It'd be nice to make EmberCLI::Rails gem to have an ability to detect this state and display an error view similar to the one you see when Assets Pipeline fails to build an asset.

Is there a way to do that without parsing EmberCLI build process output? Maybe there could be a hidden file containing last build error, so we could check for its existence to detect a broken build state?

//cc @rwjblue

@rwjblue
Copy link
Contributor

rwjblue commented Dec 14, 2014

I can't recall if we have discussed this in an issue yet, but my suggestion would be to inject an addon into the ember-cli app and have that addon detect build failures and write a file with the error details. This would also provide a nice way to communicate between ember-cli and Rails...

@rondale-sc
Copy link
Collaborator

@rwjblue Is there a way to override the default behavior on error with an addon?

[edit] I've been meaning to add an addon for the storeConfigInMeta stuff. I think I'll start workin' on it and see where we end up.

@rwjblue
Copy link
Contributor

rwjblue commented Dec 14, 2014

I have a hacked up branch that adds a 'buildError' addon hook. I'm pretty sure that should be all you need.

@rondale-sc rondale-sc self-assigned this Dec 14, 2014
@rondale-sc
Copy link
Collaborator

Merged into ember-cli here: ember-cli/ember-cli#2832

@rondale-sc
Copy link
Collaborator

I'm starting to fool around with this locally, will let you know when I have something.

@rwjblue
Copy link
Contributor

rwjblue commented Dec 28, 2014

0.1.5 is released and includes the buildError hook.

@rwz
Copy link
Collaborator Author

rwz commented Jan 8, 2015

We need to make this work. If only there were like 30 hours in a day and less other awesome things to procrastinate on.

@rondale-sc
Copy link
Collaborator

@rondale-sc
Copy link
Collaborator

Yay!

rwz added a commit that referenced this issue Jan 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants