-
Notifications
You must be signed in to change notification settings - Fork 58
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
CPLAT-11143 Emit a build error for mismatched components in the new boilerplate #496
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
final confidences = VersionConfidences( | ||
// If the component extends from a base class known to be supported by the new boilerplate, | ||
// has no annotation, is not abstract, and does not have $isClassGenerated, then it's | ||
// most likely intended to be part of a new boilerplate class component declaration. | ||
// | ||
// Make this `likely` so that components that don't get associated with factory/props | ||
// due to naming issues aren't silently ignored. | ||
v4_mixinBased: !classish.hasAbstractKeyword && | ||
!_overridesIsClassGenerated(classish) && | ||
mixinBoilerplateBaseClasses.contains(classish.superclass?.nameWithoutPrefix) | ||
? Confidence.likely | ||
: Confidence.neutral, | ||
v2_legacyBackwardsCompat: Confidence.neutral, | ||
v3_legacyDart2Only: Confidence.neutral, |
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.
This is really cool
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.
Thanks! I'm super happy that the confidence approach made this kind of change easy
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.
One quick little thing but overall looks good!
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.
+1
85c7073
QA +1 |
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.
just updating to remove the "request changes" - changes have been reflected
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.
fine
@Workiva/release-management-p |
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.
+1 from RM
Motivation
If a component isn't named correctly in the new boilerplate, it won't get associated with the factory and props class the author intended it to be.
Currently, this mismatched component is ignored and the component gets interpreted as a props mapview, and when the consumer invokes the builder, they get a runtime error.
It would be better if it failed the build.
Changes
v4_mixinBased
confidence of components to aboveneutral
, resulting in mismatched components emitting errors instead of getting silently ignored.Release Notes
Emit a build error for mismatched components in the new boilerplate
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: