Skip to content

Don't block karma on webpack compilation errors #11170

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

Closed
nicojs opened this issue Jun 8, 2018 · 1 comment · Fixed by #11181
Closed

Don't block karma on webpack compilation errors #11170

nicojs opened this issue Jun 8, 2018 · 1 comment · Fixed by #11181

Comments

@nicojs
Copy link
Contributor

nicojs commented Jun 8, 2018

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Area

- [x] devkit
- [ ] schematics

Versions

$ node --version
v10.1.0
$ npm --version
6.0.1

Windows 10

Repro steps

  1. Create a fresh angular project
  2. Open up your karma.conf.js file and set autoWatch: false
  3. Run karma using npx karma run from the src directory (in another console, ). Specs should pass. Executed 3 of 3 SUCCESS
  4. Now go to the "app.component.ts" file and change styleUrls: ['./app.component.css'] to styleUrls: [''].
  5. Rerun karma using npx karma run. The karma process hangs and is not reporting the error (however, the AngularCompilerPlugin itself does report it).

This can be annoying for users using the Webstorm IDE. It starts angular with singleRun=false, watch=false. It uses karma run in order to kick of a test run and choose which tests to run. The result is that the tests hang in webstorm:

image

I'm investigating using ng test straight up for supporting mutation testing with Stryker. For this new approach to work, it would help a lot if the normal karma way of reporting errors is used.

The log given by the failure

-none-

Desired functionality

The compile error is reported via a karma event. We could use the "normal" error event for this: 'browser_error'. Otherwise we can create a new one: 'compiler_error' or something.

Furthermore, a compiler error should not result in a blocked karma run. Instead, it should finish up the run like normal, using the normal 'run_complete' event.

Mention any other details that might be useful

If we can fix this issue, we should be able to close #8744

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant