Skip to content

Enable using the runtime dependency tracker in JIT compiler#51293

Closed
pmvald wants to merge 2 commits intoangular:mainfrom
pmvald:jit-rdt-rollout
Closed

Enable using the runtime dependency tracker in JIT compiler#51293
pmvald wants to merge 2 commits intoangular:mainfrom
pmvald:jit-rdt-rollout

Conversation

@pmvald
Copy link
Copy Markdown
Member

@pmvald pmvald commented Aug 7, 2023

This change simply flips the flag USE_RUNTIME_DEPS_TRACKER_FOR_JIT guarding usage of runtime dependency tracker in the JIT compiler. As a result, the JIT compiler will use the runtime dependency tracker for calculating scopes instead of patching them into the types.

This change particularly affects all the Angular tests in g3. Multiple TGPs were run, including this most recent one and all were green.

In the event of any further failure, we can simply revert this PR (or alternatively just set the flag USE_RUNTIME_DEPS_TRACKER_FOR_JIT to false) to resolve the issue.

Once this change was confirm not to break anything, the flag USE_RUNTIME_DEPS_TRACKER_FOR_JIT will be deleted in a separate PR.

Also, some internal tests had to be updated as we adopt to use the runtime dependency tracker.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

pmvald added 2 commits August 7, 2023 18:07
…racker

Using verification helpers such as `isComponent` may trigger JIT compilation. Now in some tests such compilation is made purposely to fail, and so in such cases any reference to the `depsTracker.clearScopeCacheFor` method will cause the exception to be thrown earlier than expected which results in teh test failure. Such scenario is the case in the next commit when we enable using the deps tracker in the jit compilation. Note that such failure is only for the framework tests and is a very edge case. The tests in downstream apps will not lead to such scenario of failure at all.
This change simply flip the flag which enables using the deps tracker in JIT compilation (the logic is already implemented in a previous PR). Some tests which depend on the old JIT implementation (e.g., patching the scope info into the type) are modified accordingly.
@pmvald pmvald changed the title Jit rdt rollout Enable using the runtime dependency tracker in JIT compiler Aug 8, 2023
@pmvald pmvald marked this pull request as ready for review August 8, 2023 18:51
@pullapprove pullapprove bot requested review from pkozlowski-opensource and removed request for devversion August 8, 2023 18:51
@pmvald pmvald added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release compiler: jit labels Aug 8, 2023
@ngbot ngbot bot modified the milestone: Backlog Aug 8, 2023
@pmvald pmvald requested review from devversion and removed request for pkozlowski-opensource August 8, 2023 18:52
@pullapprove pullapprove bot removed the request for review from devversion August 8, 2023 18:52
@pmvald pmvald requested a review from devversion August 8, 2023 18:53
@devversion
Copy link
Copy Markdown
Member

Caretaker note: TGP is green

@devversion devversion added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Aug 9, 2023
@devversion devversion requested review from crisbeto and removed request for AndrewKushnir August 10, 2023 12:19
@devversion devversion added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Aug 10, 2023
Copy link
Copy Markdown
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@pmvald pmvald added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer PullApprove: disable labels Aug 14, 2023
@pkozlowski-opensource
Copy link
Copy Markdown
Member

This PR was merged into the repository by commit bc55d82.

pkozlowski-opensource pushed a commit that referenced this pull request Aug 14, 2023
This change simply flip the flag which enables using the deps tracker in JIT compilation (the logic is already implemented in a previous PR). Some tests which depend on the old JIT implementation (e.g., patching the scope info into the type) are modified accordingly.

PR Close #51293
pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this pull request Aug 14, 2023
pkozlowski-opensource added a commit to pkozlowski-opensource/angular that referenced this pull request Aug 14, 2023
pkozlowski-opensource added a commit that referenced this pull request Aug 14, 2023
@pkozlowski-opensource
Copy link
Copy Markdown
Member

@pmvald this PR was reverted in #51358 as it was breaking Angular AIO tests. You will have to open a new PR with changes here and another PR.

@angular-automatic-lock-bot
Copy link
Copy Markdown

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 14, 2023
LayZeeDK pushed a commit to LayZeeDK/angular__angular that referenced this pull request Sep 20, 2023
…racker (angular#51293)

Using verification helpers such as `isComponent` may trigger JIT compilation. Now in some tests such compilation is made purposely to fail, and so in such cases any reference to the `depsTracker.clearScopeCacheFor` method will cause the exception to be thrown earlier than expected which results in teh test failure. Such scenario is the case in the next commit when we enable using the deps tracker in the jit compilation. Note that such failure is only for the framework tests and is a very edge case. The tests in downstream apps will not lead to such scenario of failure at all.

PR Close angular#51293
LayZeeDK pushed a commit to LayZeeDK/angular__angular that referenced this pull request Sep 20, 2023
…r#51293)

This change simply flip the flag which enables using the deps tracker in JIT compilation (the logic is already implemented in a previous PR). Some tests which depend on the old JIT implementation (e.g., patching the scope info into the type) are modified accordingly.

PR Close angular#51293
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…racker (angular#51293)

Using verification helpers such as `isComponent` may trigger JIT compilation. Now in some tests such compilation is made purposely to fail, and so in such cases any reference to the `depsTracker.clearScopeCacheFor` method will cause the exception to be thrown earlier than expected which results in teh test failure. Such scenario is the case in the next commit when we enable using the deps tracker in the jit compilation. Note that such failure is only for the framework tests and is a very edge case. The tests in downstream apps will not lead to such scenario of failure at all.

PR Close angular#51293
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…r#51293)

This change simply flip the flag which enables using the deps tracker in JIT compilation (the logic is already implemented in a previous PR). Some tests which depend on the old JIT implementation (e.g., patching the scope info into the type) are modified accordingly.

PR Close angular#51293
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime compiler: jit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants