Skip to content

Conversation

@pmvald
Copy link
Member

@pmvald pmvald commented Jul 9, 2023

An initial implementation which captures what we need for both JIT and local compilations. This PR only changes deps tracker files which are NOT being used anywhere yet. So this change does not affect anything. In a follow up PR I'll migrate JIT compilation to use this deps tracker (instead of transitiveScopesFor tools and monkey patching) and hopefully it will break lots of tests cross g3 and worldwide which makes it look like I have done something ...

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 pmvald requested a review from devversion July 9, 2023 20:32
@pullapprove pullapprove bot requested a review from crisbeto July 9, 2023 20:32
@pmvald pmvald added the area: core Issues related to the framework runtime label Jul 9, 2023
@ngbot ngbot bot added this to the Backlog milestone Jul 9, 2023
@pmvald pmvald added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jul 9, 2023
@devversion devversion requested a review from alxhub July 11, 2023 14:07
@pmvald pmvald removed the request for review from crisbeto July 11, 2023 19:29
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

overall LGTM. this is pretty clean!

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM overall, just some minor comments

Copy link
Member

Choose a reason for hiding this comment

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

Is the as cast here correct? wouldn't it be NgModuleWIthProvider or something?

Copy link
Member Author

Choose a reason for hiding this comment

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

The main issue is the import type in NgModuleDef<T> does not include ModuleWithProviders, even though the comment says it should. But changing that would require more changes. In a separate PR I can fix this type issue and make things more consistent.

@pmvald pmvald force-pushed the rdt-impl branch 2 times, most recently from 848314e to ac6d36d Compare July 17, 2023 00:34
@pmvald pmvald requested a review from crisbeto July 17, 2023 00:38
pmvald added 4 commits July 17, 2023 12:13
…cy tracker

The implementation is more or less follows the pattern in render3/jit/module.ts#transitiveScopesFor helper. A few additional helper functions also added to jit utils.
…untime deps tracker

The logic mainly followed the `render3/jit/directive.ts#getStandaloneDefFunctions` helper.
This method mainly has application test beds where we want to apply overrides and re-compute the scope.
… the runtime deps tracker

This includes implementation of methods getComponentDependencies and registerNgModule.

In order to correlate ng-modules with their declarations it is required to use the method registerNgModule to regiater the ng-module. However, the actual correlation will happen lazily once getComponentDependencies method is called. This lazy behaviour also allows for forward refs to be resolved.

The method getComponentDependencies will be used in local compilation mode to compute the rendering component deps in runtime.
The previous commits add a new runtime error code (RUNTIME_DEPS_INVALID_IMPORTED_TYPE) which needs to be added to the golden for the tests to pass.
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@pullapprove pullapprove bot requested a review from dylhunn July 17, 2023 21:55
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: public-api

@crisbeto crisbeto 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 labels Jul 18, 2023
@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Jul 18, 2023
@crisbeto crisbeto removed request for alxhub and dylhunn July 18, 2023 07:34
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 89c84bf.

jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2023
…untime deps tracker (#50980)

The logic mainly followed the `render3/jit/directive.ts#getStandaloneDefFunctions` helper.

PR Close #50980
jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2023
…#50980)

This method mainly has application test beds where we want to apply overrides and re-compute the scope.

PR Close #50980
jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2023
… the runtime deps tracker (#50980)

This includes implementation of methods getComponentDependencies and registerNgModule.

In order to correlate ng-modules with their declarations it is required to use the method registerNgModule to regiater the ng-module. However, the actual correlation will happen lazily once getComponentDependencies method is called. This lazy behaviour also allows for forward refs to be resolved.

The method getComponentDependencies will be used in local compilation mode to compute the rendering component deps in runtime.

PR Close #50980
jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2023
…50980)

The previous commits add a new runtime error code (RUNTIME_DEPS_INVALID_IMPORTED_TYPE) which needs to be added to the golden for the tests to pass.

PR Close #50980
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
…cy tracker (angular#50980)

The implementation is more or less follows the pattern in render3/jit/module.ts#transitiveScopesFor helper. A few additional helper functions also added to jit utils.

PR Close angular#50980
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
…untime deps tracker (angular#50980)

The logic mainly followed the `render3/jit/directive.ts#getStandaloneDefFunctions` helper.

PR Close angular#50980
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
…angular#50980)

This method mainly has application test beds where we want to apply overrides and re-compute the scope.

PR Close angular#50980
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
… the runtime deps tracker (angular#50980)

This includes implementation of methods getComponentDependencies and registerNgModule.

In order to correlate ng-modules with their declarations it is required to use the method registerNgModule to regiater the ng-module. However, the actual correlation will happen lazily once getComponentDependencies method is called. This lazy behaviour also allows for forward refs to be resolved.

The method getComponentDependencies will be used in local compilation mode to compute the rendering component deps in runtime.

PR Close angular#50980
sunilbaba pushed a commit to sunilbaba/angular that referenced this pull request Jul 26, 2023
…ngular#50980)

The previous commits add a new runtime error code (RUNTIME_DEPS_INVALID_IMPORTED_TYPE) which needs to be added to the golden for the tests to pass.

PR Close angular#50980
@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 Aug 18, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…cy tracker (angular#50980)

The implementation is more or less follows the pattern in render3/jit/module.ts#transitiveScopesFor helper. A few additional helper functions also added to jit utils.

PR Close angular#50980
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…untime deps tracker (angular#50980)

The logic mainly followed the `render3/jit/directive.ts#getStandaloneDefFunctions` helper.

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

This method mainly has application test beds where we want to apply overrides and re-compute the scope.

PR Close angular#50980
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
… the runtime deps tracker (angular#50980)

This includes implementation of methods getComponentDependencies and registerNgModule.

In order to correlate ng-modules with their declarations it is required to use the method registerNgModule to regiater the ng-module. However, the actual correlation will happen lazily once getComponentDependencies method is called. This lazy behaviour also allows for forward refs to be resolved.

The method getComponentDependencies will be used in local compilation mode to compute the rendering component deps in runtime.

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

The previous commits add a new runtime error code (RUNTIME_DEPS_INVALID_IMPORTED_TYPE) which needs to be added to the golden for the tests to pass.

PR Close angular#50980
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 target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants