-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: emit error and prevent re-test #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as stats.compilation
is defined, this is ok. Better with tests but you might have a plan for that. 👍
Long story in regards to the tests. Now that karma-webpack is maintained by |
4330c3a
to
ece82eb
Compare
@filipesilva - This should cover both of the plugins currently needed by |
Awesome, thanks so much for taking on this issue! I'll integrate it into the CLI after it's merged and released. |
Let me test this on the CLI as well, as per your original comment. |
This is the original commit where I used variations of the plugins in #49 and #66 to fix the error behaviour: angular/angular-cli@8ab3954 The two cases we test for in the CLI are:
I tried the changes on this PR by applying them over the released version
So I would say that the watch mode change is not ideal, since it requires users to re-run Karma on every error. The single-run mode is what we did though. |
Give me 30 minutes & i'll fix the watch mode annoyance and properly cover those use cases.
|
@filipesilva - Got dragged away. After mulling this over for a while and in the spirit of not breaking apps that depend on karma-webpack or everyones CLI apps ( to include my own ) the right answer here imo is to just make this respect the
Assuming you don't mind a small PR into the CLI, i'll go the route above. |
@d3viant0ne apologies for taking so long to get back to your message. I agree with the approach you've outlined, it's the best option overall. I was actually worried what direction it might take because of CLI version range, thank you for taking that into consideration 👍 |
Any news? Just spent almost an hour investigating a strange error in Karma. The root cause was in missing package in |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
Currently karma-webpack is swallowing fatal compilation errors which has a substantial negative effect on the development experience.
What is the new behavior?
karma-webpack: compiler.plugin
will throw on anyfatal compilation error
.karma-webpack: compiler.plugin
will prevent re-running tests on the above condition.karma-webpack: addEntry
will not propagate errors for failed module imports.Does this PR introduce a breaking change?
If this PR contains a breaking change, please describe the following...
Relates to: #49
Relates to: #66