-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Input coercion static members cannot be used with NGC and strictMetadataEmit enabled #33451
Labels
area: compiler
Issues related to `ngc`, Angular's template compiler
freq2: medium
hotlist: components team
Related to Angular CDK or Angular Material
type: bug/fix
Milestone
Comments
devversion
added
the
hotlist: components team
Related to Angular CDK or Angular Material
label
Oct 28, 2019
devversion
changed the title
ngtsc input coercion static members cannot be used with ngc
Input coercion static members cannot be used with NGC and strictMetadataEmit enabled
Oct 28, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 29, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 29, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 29, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 29, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 29, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 30, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 30, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 30, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 30, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
devversion
added a commit
to devversion/material2
that referenced
this issue
Oct 31, 2019
Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile.
andrewseguin
pushed a commit
to angular/components
that referenced
this issue
Oct 31, 2019
…checking (#17528) * feat: expand input types with coercion to work with ngtsc input type checking * refactor: add workaround for strict metadata emit of coercion static members See: angular/angular#33451 * build: patch ng_module bazel rule to enable strict template type checking Workaround for: angular/angular#33452 * refactor: disable strict metadata emit for legacy build output Workaround for angular/angular#33451. This makes sense at the current time since the Bazel output does *never* work with strict metadata emit... and considering that with Ivy there is no metadata anyway, it could be disabled in the meanwhile. * build: disable strict attribute type checking We are temporarily disabling strict attribute type checking since we have a few templates that set a coerced input while the `NgModel` directive is applied. In those cases, the empty string for the `disabled` input, is not assignable to the `NgModel#disabled` input, since it does not do coercion. We need to figure out what to do in those scenarios.
atscott
added
the
area: compiler
Issues related to `ngc`, Angular's template compiler
label
Nov 1, 2019
Maybe just assign it to |
Fixed in #34296. |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: compiler
Issues related to `ngc`, Angular's template compiler
freq2: medium
hotlist: components team
Related to Angular CDK or Angular Material
type: bug/fix
🐞 bug report
Affected Package
@angular/compiler-cli
Is this a regression?
No
Description
Switching between ngtsc and ngc is not possible when coercion static members are declared for components. e.g.
This works as expected in ngtsc, but as soon as the project is compiled with
ngc
, the metadata validator throws an exception:The error for the static members is actually valid since it only happens if
strictMetadataEmit
is enabled.. and this means that NGC validates that there is no unresolved symbol in the source file metadata. Though, since libraries want to keep that flag enabled to ensure that the metadata works in all cases, we need a way to skip accept coercion members for Ivy/ViewEngine compatibility.The text was updated successfully, but these errors were encountered: