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

feat(@angular-devkit/schematics): update zone.js to 0.11.8 and add async tagging API support #23750

Closed
wants to merge 1 commit into from

Conversation

JiaLiPassion
Copy link
Contributor

  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

@alan-agius4
Copy link
Collaborator

Can you please change the scope to @schematics/angular?

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
@JiaLiPassion
Copy link
Contributor Author

@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.
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alan-agius4

  • I believe this one should be included in the development mode by default since this need to integrate with Angular 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 the ngZone, just like TaskTackingZone.
    @mgechev , could you confirm my understanding is correct? Thank you.

Copy link
Collaborator

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.

Copy link
Member

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.

@alan-agius4 alan-agius4 added target: minor This PR is targeted for the next minor release needs: discussion On the agenda for team meeting to determine next steps labels Aug 16, 2022
@alan-agius4 alan-agius4 removed the needs: discussion On the agenda for team meeting to determine next steps label Sep 22, 2022
@JiaLiPassion
Copy link
Contributor Author

This is handled by angular/angular#47416.

@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 Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants