-
Notifications
You must be signed in to change notification settings - Fork 26.5k
feat(core): default to dynamic queries #32720
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
feat(core): default to dynamic queries #32720
Conversation
These changes switch to defaulting the `static` flag on `ViewChild` and `ContentChild` queries to `false`, in addition to removing the logic that statically determines whether a query is dynamic.
@@ -37,7 +37,6 @@ export class ViewCompiler { | |||
outputCtx: OutputContext, component: CompileDirectiveMetadata, template: TemplateAst[], | |||
styles: o.Expression, usedPipes: CompilePipeSummary[]): ViewCompileResult { | |||
let embeddedViewCount = 0; | |||
const staticQueryIds = findStaticQueryIds(template); |
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.
@kara @IgorMinar there are two more functions related to static queries that I wanted to clean up (findStaticQueryIds
and staticViewQueryIds
) because they aren't used in the compiler anymore. I wasn't sure whether I could, because both of them are exported through @angular/compiler
so that the static query migration can use them. If they aren't considered part of the public API I can move them into the static query migration so they're closer to where they're being used and so that new code doesn't start depending on them.
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.
I am not aware of anyone using them.
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.
you can remove them. @angular/compiler is not part of our public api service.
Disables the dynamic queries migration until we can land the relevant framework changes (angular#32686 and angular#32720).
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. thanks
@@ -37,7 +37,6 @@ export class ViewCompiler { | |||
outputCtx: OutputContext, component: CompileDirectiveMetadata, template: TemplateAst[], | |||
styles: o.Expression, usedPipes: CompilePipeSummary[]): ViewCompileResult { | |||
let embeddedViewCount = 0; | |||
const staticQueryIds = findStaticQueryIds(template); |
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.
you can remove them. @angular/compiler is not part of our public api service.
This reverts commit 948b01c.
Global VE presubmit (with tap train) Edit: there are a few failures in the global presubmit that need to be fixed before this can be merged |
I submitted changes to fix the g3 failures and reran the failing tests from the global presubmit to verify they are now passing. Should be good to merge now. |
Followup to angular#32720 that removed the logic that statically determines whether a query is dynamic. This updates the docs to reflect that, and mentions that the flag now defaults to false.
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. |
These changes switch to defaulting the
static
flag onViewChild
andContentChild
queries tofalse
, in addition to removing the logic that statically determines whether a query is dynamic.