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

refactor(core): add static-query template strategy #29815

Closed
wants to merge 3 commits into from

Conversation

devversion
Copy link
Member

@devversion devversion commented Apr 10, 2019

Introduces a new strategy for the static-query schematic that
is enabled by default. In order to provide a migration that works
for the most Angular applications and makes the upgrade as easy
as possible, the template strategy leverages the view engine
Angular compiler logic in order to determine the same query timing
that is currently used within applications using view engine.

@devversion devversion added state: blocked action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Apr 10, 2019
@devversion devversion requested review from a team as code owners April 10, 2019 17:38
@ngbot ngbot bot added this to the needsTriage milestone Apr 10, 2019
@devversion devversion added state: WIP and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 10, 2019
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Apr 10, 2019
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

👍 for the compiler.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

Approach looks good, some minor changes requested for the printed comment / tests

@kara kara added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 11, 2019
@kara kara assigned devversion and unassigned kara Apr 11, 2019
@devversion devversion force-pushed the static-query-strategies branch 2 times, most recently from 768d41a to eecc18b Compare April 11, 2019 16:40
@devversion devversion force-pushed the static-query-strategies branch 2 times, most recently from 65ca60f to bf92da0 Compare April 11, 2019 17:03
In order to support multiple strategies for detecting the query timing, the
query usage logic has been moved into a query usage strategy.
The `@angular/compiler` package currently contains the logic for determining whether
given queries are used statically or dynamically. This logic would be necessary in order
to build a schematic that leverages the Angular compiler API's in order to simulate the
query timing based on what ViewEngine computed at compilation-time/runtime.

Exporting the logic that is necessary to detect the timing should not affect the public
API as the `@angular/compiler` package is denoted as private in `PUBLIC_API.md`
Introduces a new strategy for the `static-query` schematic that
is enabled by default. In order to provide a migration that works
for the most Angular applications and makes the upgrade as easy
as possible, the template strategy leverages the view engine
Angular compiler logic in order to determine the query timing
that is currently used within applications using view engine.
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Apr 12, 2019
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added action: presubmit The PR is in need of a google3 presubmit 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 Apr 12, 2019
@kara
Copy link
Contributor

kara commented Apr 12, 2019

presubmit

@kara kara removed the action: presubmit The PR is in need of a google3 presubmit label Apr 12, 2019
@kara
Copy link
Contributor

kara commented Apr 12, 2019

caretaker note: will need a patch to angular BUILD to add dependency

@alxhub alxhub closed this in 205a45e Apr 15, 2019
alxhub pushed a commit that referenced this pull request Apr 15, 2019
The `@angular/compiler` package currently contains the logic for determining whether
given queries are used statically or dynamically. This logic would be necessary in order
to build a schematic that leverages the Angular compiler API's in order to simulate the
query timing based on what ViewEngine computed at compilation-time/runtime.

Exporting the logic that is necessary to detect the timing should not affect the public
API as the `@angular/compiler` package is denoted as private in `PUBLIC_API.md`

PR Close #29815
alxhub pushed a commit that referenced this pull request Apr 15, 2019
Introduces a new strategy for the `static-query` schematic that
is enabled by default. In order to provide a migration that works
for the most Angular applications and makes the upgrade as easy
as possible, the template strategy leverages the view engine
Angular compiler logic in order to determine the query timing
that is currently used within applications using view engine.

PR Close #29815
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
In order to support multiple strategies for detecting the query timing, the
query usage logic has been moved into a query usage strategy.

PR Close angular#29815
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
The `@angular/compiler` package currently contains the logic for determining whether
given queries are used statically or dynamically. This logic would be necessary in order
to build a schematic that leverages the Angular compiler API's in order to simulate the
query timing based on what ViewEngine computed at compilation-time/runtime.

Exporting the logic that is necessary to detect the timing should not affect the public
API as the `@angular/compiler` package is denoted as private in `PUBLIC_API.md`

PR Close angular#29815
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
Introduces a new strategy for the `static-query` schematic that
is enabled by default. In order to provide a migration that works
for the most Angular applications and makes the upgrade as easy
as possible, the template strategy leverages the view engine
Angular compiler logic in order to determine the query timing
that is currently used within applications using view engine.

PR Close angular#29815
@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 Sep 14, 2019
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 cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants