-
Notifications
You must be signed in to change notification settings - Fork 12k
feat(@angular-devkit/schematics): update zone.js to 0.11.8 and add async tagging API support #23750
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
Conversation
fcdc1d7
to
0baea55
Compare
Can you please change the scope to Thanks |
…ging API support 1. Update to `zone.js` 0.11.8 2. `import 'zone.js/plugins/async-stack-tagging` in `development` mode to support `async tagging API` for better debugging experience. For more information, please refer to this PR angular/angular#46693
0baea55
to
690b433
Compare
@alan-agius4 , sure, updated, thank you. |
@@ -14,3 +14,4 @@ export const environment = { | |||
* on performance if an error is thrown. | |||
*/ | |||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. | |||
import 'zone.js/plugins/async-stack-tagging'; // Included with Angular CLI to support async stack tagging API. |
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.
Question: Should this be enabled by default or commented out like the above line and users can opt-in? Does it have any side effects of having this enabled for production?
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.
- I believe this one should be included in the
development
mode by default since this need to integrate withAngular Devtools
. - in production mode, if we enable it, it will have a little impact to the performance, since it will add a new
parent Zone
to thengZone
, just likeTaskTackingZone
.
@mgechev , could you confirm my understanding is correct? Thank you.
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.
At the moment there is no way to conditionally include polyfills based on if it’s development/production.
I think a better approach would be to add zone-error and async-stack-tagging internally in the builder so that we can conditionally add this based on if the build is optimized not.
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.
We'd like to enable it by default in development so folks can get complete stack traces and not use it in production. Async stack tagging (AST) is independent from Angular DevTools and we use it to concatenate async stack traces so that we can give the entire picture to developers.
AST is very similar to Zone's long stack traces with the difference that they work with debugging tools out of the box.
This is handled by angular/angular#47416. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
zone.js
0.11.8import 'zone.js/plugins/async-stack-tagging
indevelopment
modeto support
async tagging API
for better debugging experience.For more information, please refer to this PR angular/angular#46693