-
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
AF-392: Add workaround to NSM for Dart 2 #207
AF-392: Add workaround to NSM for Dart 2 #207
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
@@ -54,7 +54,7 @@ class DomProps extends component_base.UiProps | |||
String get propKeyNamespace => ''; | |||
|
|||
@override | |||
ReactElement call([children, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40]); | |||
ReactElement call([c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40]); |
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.
These can actually just get removed now, since they were put in as a workaround to not having NSM! a5c1820#diff-f41fd818c60cfc37d947e71aa885a019
🎉
* Naming adjustment * actually test paths for call() on UiProps * Remove unneeded call() instances
if (factory is ReactComponentFactoryProxy) { | ||
// Use `build` instead of using emulated function behavior to work around DDC issue | ||
// https://github.com/dart-lang/sdk/issues/29904 | ||
// Should have the benefit of better performance; TODO optimize type check? |
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 TODO was already in the noSuchMethod
implementation. Not sure if it should stay 🤷♂️
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.
Hm, looking at this again, this type-check should be quite cheap, so I say we can remove this TODO
Codecov Report
@@ Coverage Diff @@
## master #207 +/- ##
==========================================
+ Coverage 90.3% 90.31% +0.02%
==========================================
Files 35 35
Lines 1772 1775 +3
==========================================
+ Hits 1600 1603 +3
Misses 172 172 |
…hildren_dart2_workaround
This is blocked until https://github.com/Workiva/graph_ui/pull/399 is merged. |
…riadic_children_dart2_workaround
Consumed this in the following repos with no issues:
There were two errors found with this consumed in graph_app. The following PR fixes these errors and will need to be merged/released before this can move forward: https://github.com/Workiva/graph_app/pull/6723 |
Consumption PRs (checkmark indicates passing CI):
|
@corwinsheahan-wf @evanweible-wf web_skin_dart Skynet run is failing, but I don't think it's related to the consumption of this work. I think we're ready to move forward with this. |
QA +1
@Workiva/release-management-p |
Ultimate problem:
In Dart 2, calls to noSuchMethod include the default values for positional parameters, and it is no longer possible to tell how many arguments have been specified: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#200-dev560
This breaks our variadic children implementation, which uses
noSuchMethod
and the positional parameter length to know how many children were passed in.This is a blocker for Dart 2.
How it was fixed:
Testing suggestions:
Potential areas of regression: