-
Notifications
You must be signed in to change notification settings - Fork 26.6k
fix(core): Attribute
decorator attributeName
is mandatory
#38131
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
Conversation
`Attribute` decorator has defined `attributeName` as optional but actually its mandatory and compiler throws an error if `attributeName` is undefined. Made `attributeName` mandatory in the `Attribute` decorator to reflect this functionality Fixes angular#32658
dccd552
to
e0cbb99
Compare
@ajitsinghkaler Are there any tests that cover this change? |
I don't think it is a breaking change because if the attributeName is left empty it will give you an error already. So eveybody should already be following it's just that we have not enforced it. |
@sonukapoor Actually I'm a bit confused if a test is actually needed for this because the attribute was already optional I actually don't know even what actually to test for example should we test if the attributeName is empty it should throw but that was already happening. A bit confused by this |
I assume there is already a unit test for this, that checks if the |
I don't know if that's actually the reason, but something to consider: maybe the idea with keeping the |
I don't think so even in docs it is not optional. Maybe not sure why but did not find anything like that |
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, if this throws an error already, I don't see this as a breaking change
Reviewed-for: public-api
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!
Considering that there is no way to inject an attribute without also specifying the attribute name, this change is not a breaking change and therefor it should be fine to land it without much trouble.
If google3 presubmits pass, then we can go as far as landing this in a patch version.
Reviewed-for: public-api
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.
Reviewed-for: public-api
@AndrewKushnir PTAL |
Should we add it to patch version |
…r#38131) `Attribute` decorator has defined `attributeName` as optional but actually its mandatory and compiler throws an error if `attributeName` is undefined. Made `attributeName` mandatory in the `Attribute` decorator to reflect this functionality Fixes angular#32658 PR Close angular#38131
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. |
…r#38131) `Attribute` decorator has defined `attributeName` as optional but actually its mandatory and compiler throws an error if `attributeName` is undefined. Made `attributeName` mandatory in the `Attribute` decorator to reflect this functionality Fixes angular#32658 PR Close angular#38131
Attribute
decorator has definedattributeName
as optional but actually itsmandatory and compiler throwa an error if
attributeName
is undefined. MadeattributeName
mandatory in theAttribute
decorator to reflect this functionalityFixes #32658
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #32658
What is the new behavior?
Does this PR introduce a breaking change?
Other information