-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
fix(core): static-query migration should gracefully exit if AOT compiler throws #30269
Conversation
6564025
to
af2def7
Compare
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.
LGTM
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.
LGTM, found a typo though
packages/core/schematics/test/static_queries_migration_template_spec.ts
Outdated
Show resolved
Hide resolved
@devversion Also could you rename the commit to |
af2def7
to
d3d1062
Compare
@kara Done. I wasn't too sure if we want to list these changes in the changelog. |
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.
d3d1062
to
2c2bafb
Compare
Presubmit (note that this will have a failure because the presubmit CL does not have the manual g3 change needed for the previous PR) |
…#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
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
…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
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
…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
…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
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
…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
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. |
Note: Blocked on #30254