Skip to content

throwOnError defaults to false, should it be true? #69

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

Open
stefanpenner opened this issue Jun 5, 2018 · 6 comments
Open

throwOnError defaults to false, should it be true? #69

stefanpenner opened this issue Jun 5, 2018 · 6 comments

Comments

@stefanpenner
Copy link
Collaborator

cc @krisselden

@krisselden
Copy link
Collaborator

I thought I made it default to true if NODE_ENV=production it is annoying to have the build fail for a typo during development instead of emitting as many files as it can.

@krisselden
Copy link
Collaborator

I can update it to check EMBER_ENV too, but I wish we'd adopt NODE_ENV

ember-cli/rfcs#109

@rwjblue
Copy link
Collaborator

rwjblue commented Jun 9, 2018

it is annoying to have the build fail for a typo during development instead of emitting as many files as it can

Hmm, throwing wont crash a running ember serve, it will emit the error (and use the custom middleware for showing errors) and it should resume once the error is corrected. There is even a capability to show a codeframe in the output. This is already exactly what happens with Babel and it doesn’t seem onerous / annoying...

@krisselden
Copy link
Collaborator

Typing errors are different than babel errors and typescript is better at emitting useable code on error that often you want to inspect on the console to address type errors especially when you are trying to derive the types.

@rwjblue
Copy link
Collaborator

rwjblue commented Jun 10, 2018

Seems like you have thought this through a bit more than me. I still don’t think I agree (maybe just my own ignorance in typescripts ways), but thank you for explaining the reasoning behind it being enabled only for production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants