-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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(zone.js): Update to the simpler Async Stack Tagging v2 API #46958
Conversation
@JiaLiPassion @mgechev PTAL! |
task.asyncId = this.scheduleAsyncTask( | ||
task.source || task.type, task.data?.isPeriodic || task.type === 'eventTask'); | ||
onScheduleTask(delegate: ZoneDelegate, _current: Zone, target: Zone, task: Task): Task { | ||
task.consoleTask = this.scheduleTask(`Zone - ${task.source || task.type}`); |
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.
In the previous version, scheduleAsyncTask
has the 2nd parameter which tells console
the task is period
or not,
- if it is not
period
task, thenfinishAsyncTask
can only be called once. - if it is
period
task such aseventTask
orsetInterval
,finishAsyncTask
can be called multiple times.
So in the v2 API, this spec has been changed?
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.
Yes, in the new API, tasks can always be recurring (aka, they can run multiple times). Consumers of the API don't need to specify this beforehand, nor do they need to cancel the tasks anymore. More details here.
Signed-off-by: Victor Porof <victorporof@chromium.org>
Last minute change: we renamed |
@victorporof , thank you for the explaination, LGTM. |
@victorporof could you please run a TGP with those changes to make sure there are no failures in g3? Thank you. |
@AndrewKushnir I'm not sure what that means :) What button should I press and where can I find it? 😄 |
@victorporof no worries, I'll take care of it and let you know if there are any failures. |
Thank you @AndrewKushnir! I see a few failures there, are they related to this PR? |
@victorporof test failures turned out to be flakes, so this PR is now ready for merge. Thank you. |
Merge-assistance: LGTM from Jia should be enough to proceed with this change. TGP is "green". |
This PR was merged into the repository by commit f23232f. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [zone.js](https://github.com/angular/angular) ([changelog](https://github.com/angular/angular/blob/master/packages/zone.js/CHANGELOG.md)) | dependencies | patch | [`0.11.7` -> `0.11.8`](https://renovatebot.com/diffs/npm/zone.js/0.11.7/0.11.8) | --- ### Release Notes <details> <summary>angular/angular</summary> ### [`v0.11.8`](https://github.com/angular/angular/blob/HEAD/packages/zone.js/CHANGELOG.md#​0118-httpsgithubcomangularangularcomparezonejs-0117zonejs-0118-2022-08-08) [Compare Source](angular/angular@zone.js-0.11.7...zone.js-0.11.8) ##### Features - **zone.js:** Update to the simpler Async Stack Tagging v2 API ([#​46958](angular/angular#46958)) ([f23232f](angular/angular@f23232f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTYuMCIsInVwZGF0ZWRJblZlciI6IjMyLjE1OS4xIn0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1504 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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. |
Signed-off-by: Victor Porof victorporof@chromium.org
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Chrome DevTools is planning on dropping the experimental flag for the new async stack tagging API and enabling this feature by default on the console object. As part of this, the API has been improved to be more robust. More details in the chromium bug and in the V8 implementation.
Does this PR introduce a breaking change?