Skip to content

fix(core): static-query migration should gracefully exit if AOT compiler throws #30269

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

Closed

Conversation

devversion
Copy link
Member

  • See individual commits (except first one)

Note: Blocked on #30254

@devversion devversion force-pushed the refactor/core-static-query-safety branch from 6564025 to af2def7 Compare May 5, 2019 10:23
@devversion devversion added area: core Issues related to the framework runtime comp: ivy action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels May 5, 2019
@ngbot ngbot bot added this to the needsTriage milestone May 5, 2019
@devversion devversion marked this pull request as ready for review May 5, 2019 11:09
@devversion devversion requested a review from a team as a code owner May 5, 2019 11:09
Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

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

LGTM

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, found a typo though

@kara kara removed their assignment May 8, 2019
@kara kara added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels May 8, 2019
@kara
Copy link
Contributor

kara commented May 8, 2019

@devversion Also could you rename the commit to fix(core)? Refactors technically don't change behavior.

@devversion devversion force-pushed the refactor/core-static-query-safety branch from af2def7 to d3d1062 Compare May 8, 2019 09:02
@devversion
Copy link
Member Author

@kara Done. I wasn't too sure if we want to list these changes in the changelog.

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label May 8, 2019
@devversion devversion changed the title refactor(core): static-query migration should gracefully exit if AOT compiler throws fix(core): static-query migration should gracefully exit if AOT compiler throws May 8, 2019
devversion added 3 commits May 8, 2019 18:25
Currently when someone has a call expression within the `ngOnInit` call
and we try to peek into that function with respect to the current function
context, the schematic errors because a call expression argument is
undefined. This is valid because the target function declaration defines
that parameter with a default value. In order to fix this, we need to
respect parameter default values.
In an Angular CLI project scenario where projects only reference
top-level source-files through the `tsconfig` `files` option, we currently
do not migrate referenced source-files. This can be fixed checking all
referenced source-files which aren't coming from an external library.

This is similar to how `tslint` determines project source-files.
…ler throws

The static-query template strategy leverages the AOT compiler
in order to determine the query timing. Unfortunately the AOT
compiler has open bugs that can cause unexpected failures which
make the template strategy unusable in rare cases. These rare
exceptions need to be handled gracefully in order to avoid confusion
and to provide a more smooth migration.

Additionally migration strategy setup failures are now reported with
stack traces as the `ng update` command does not print stack traces.
This makes it easier to reproduce and report migration issues.
@devversion devversion force-pushed the refactor/core-static-query-safety branch from d3d1062 to 2c2bafb Compare May 8, 2019 16:25
@alxhub
Copy link
Member

alxhub commented May 8, 2019

Presubmit (note that this will have a failure because the presubmit CL does not have the manual g3 change needed for the previous PR)

alxhub pushed a commit that referenced this pull request May 8, 2019
…#30269)

Currently when someone has a call expression within the `ngOnInit` call
and we try to peek into that function with respect to the current function
context, the schematic errors because a call expression argument is
undefined. This is valid because the target function declaration defines
that parameter with a default value. In order to fix this, we need to
respect parameter default values.

PR Close #30269
alxhub pushed a commit that referenced this pull request May 8, 2019
In an Angular CLI project scenario where projects only reference
top-level source-files through the `tsconfig` `files` option, we currently
do not migrate referenced source-files. This can be fixed checking all
referenced source-files which aren't coming from an external library.

This is similar to how `tslint` determines project source-files.

PR Close #30269
alxhub pushed a commit that referenced this pull request May 8, 2019
…ler throws (#30269)

The static-query template strategy leverages the AOT compiler
in order to determine the query timing. Unfortunately the AOT
compiler has open bugs that can cause unexpected failures which
make the template strategy unusable in rare cases. These rare
exceptions need to be handled gracefully in order to avoid confusion
and to provide a more smooth migration.

Additionally migration strategy setup failures are now reported with
stack traces as the `ng update` command does not print stack traces.
This makes it easier to reproduce and report migration issues.

PR Close #30269
@alxhub alxhub closed this in 6357d4a May 8, 2019
alxhub pushed a commit that referenced this pull request May 8, 2019
In an Angular CLI project scenario where projects only reference
top-level source-files through the `tsconfig` `files` option, we currently
do not migrate referenced source-files. This can be fixed checking all
referenced source-files which aren't coming from an external library.

This is similar to how `tslint` determines project source-files.

PR Close #30269
alxhub pushed a commit that referenced this pull request May 8, 2019
…ler throws (#30269)

The static-query template strategy leverages the AOT compiler
in order to determine the query timing. Unfortunately the AOT
compiler has open bugs that can cause unexpected failures which
make the template strategy unusable in rare cases. These rare
exceptions need to be handled gracefully in order to avoid confusion
and to provide a more smooth migration.

Additionally migration strategy setup failures are now reported with
stack traces as the `ng update` command does not print stack traces.
This makes it easier to reproduce and report migration issues.

PR Close #30269
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
…angular#30269)

Currently when someone has a call expression within the `ngOnInit` call
and we try to peek into that function with respect to the current function
context, the schematic errors because a call expression argument is
undefined. This is valid because the target function declaration defines
that parameter with a default value. In order to fix this, we need to
respect parameter default values.

PR Close angular#30269
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
In an Angular CLI project scenario where projects only reference
top-level source-files through the `tsconfig` `files` option, we currently
do not migrate referenced source-files. This can be fixed checking all
referenced source-files which aren't coming from an external library.

This is similar to how `tslint` determines project source-files.

PR Close angular#30269
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
…ler throws (angular#30269)

The static-query template strategy leverages the AOT compiler
in order to determine the query timing. Unfortunately the AOT
compiler has open bugs that can cause unexpected failures which
make the template strategy unusable in rare cases. These rare
exceptions need to be handled gracefully in order to avoid confusion
and to provide a more smooth migration.

Additionally migration strategy setup failures are now reported with
stack traces as the `ng update` command does not print stack traces.
This makes it easier to reproduce and report migration issues.

PR Close angular#30269
@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 15, 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: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants