CPLAT-5211 Add @Component2 annotation#289
Merged
rmconsole7-wk merged 12 commits into3.1.0-wipfrom May 2, 2019
Merged
Conversation
# Conflicts: # build.yaml
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
# Conflicts: # lib/src/util/react_wrappers.dart # pubspec.yaml
+ And deprecate the v1 ones
+ Without the use of fully-resolved AST since we no longer have access to it for build perf reasons (see: #280)
+ Resulting from rebasing the new 3.1.0-wip branch
7641397 to
a99be36
Compare
80e6778 to
d0931c7
Compare
# Conflicts: # pubspec.yaml
# Conflicts: # build.yaml
greglittlefield-wf
approved these changes
May 2, 2019
Contributor
greglittlefield-wf
left a comment
There was a problem hiding this comment.
+10
These changes look perfect, @aaronlademann-wf; nice job!!
|
|
||
| /// Helper function that returns the single value of a [list], or null if it is empty. | ||
| static dynamic singleOrNull(List list) => list.isNotEmpty ? list.single : null; | ||
| static singleOrNull(List list) => list.isNotEmpty ? list.single : null; |
Contributor
There was a problem hiding this comment.
#nit Ooh we could make this generic (generics functions weren't supported when this method was authored):
Suggested change
| static singleOrNull(List list) => list.isNotEmpty ? list.single : null; | |
| static T singleOrNull<T>(List<T> list) => list.isNotEmpty ? list.single : null; |
Contributor
Author
|
+1 to 6856a62 @Workiva/release-management-pp |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Since #280 modified the builder to no longer utilize fully-resolved AST when parsing annotations / component declarations, we must update the builder for our React 16 / over_react 3.1.0 work to differentiate
UiComponent2instances without traversing the class hierarchy to tell if a component extends another component class that extendsComponent2.We need to know if it is a "v2" component instance so we can modify the generated boilerplate to utilize JS-backed maps instead of the Dart maps that V1 components rely on.
Changes
@Component/@AbstractComponentannotations@Component2/@AbstractComponent2annotations@Component2annotation instead of fully-resolved ASTBoy Scoutin'
UiComponent/UiStatefulComponentUiComponent2/UiStatefulComponent2dart:js_utilReview
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review: @greglittlefield-wf @joebingham-wk @kealjones-wk @evanweible-wf
QA Checklist
@Component2annotation.Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: