-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
New "Function" syntax and current release status #30761
Comments
I fixed analyzer resolution & DDC recently, FYI. I haven't had a chance to go through and close out old bugs though. So it's worth retesting any older ones. |
Thanks! I think engineering effort here (and responsiveness!) has been awesome, my main issue has been with release management and verification :) |
Yeah, agreed. I thought it worked already, so I used it in a test case and was really surprised by crashes. That's how I ended up implementing Analyzer and DDC support :). It's definitely in a confusing state still (I'm not sure how well it works in other implementations, for example the Dart Formatter seems to crash on the syntax). EDIT: also, fwiw, #30180 and #30379 are not specific to the new syntax. |
@anders-sandholm @kevmoo - what's the right way to track this? |
#30146 is specific to the new syntax. |
@matanlurey Use of the new function syntax outside of a typedef was not handled properly in dartdoc and I didn't notice until something broke our dartdoc asserts in dart-lang/dartdoc#1505. That something was 38bf70d, specifically, the use of the Function syntax here: Since our asserts would have started firing sooner otherwise, I can say with some confidence that we haven't used the Function syntax in this manner inside the SDK until that CL. |
Another issues with this – caused by rolling out support in pkg/http2 - dart-lang/http#1349 |
Added two other bugs that seem to belong here |
I closed Also looks like I should not have added #30147 |
#30858 is still open because the "fix" caused a secondary issue. It's a pretty deep issue related to synthetic generic element types which I've not had much luck with. Latest solution involved turning off an assertion and is up for review: https://dart-review.googlesource.com/c/sdk/+/20481 |
Added a few more bugs here. Some maybe shouldn't be here based on being maybe more general and/or low priority, but, I wanted to err on the side of tracking too much. |
Closed out two more. Most of the remaining are low priority, #30858 remains the most important but also most difficult. |
I haven't run into any problems here for a while. Thanks! |
It might make sense to document somewhere that in stable it is almost completely unusable (due to analyzer crashes, and due to it not being implemented in the VM), and even in dev there are a lot of quality-of-life issues that make using it over the old typedef unsuitable:
EDIT: Re-organized the list of issues as-of 2017/10/15.
Still broken:
(VM: New typedef doesn't support annotations on parameters)
(Analyzer: no analyzer syntax error when using the old function type syntax inside a function
type using the new syntax)
(Analyzer: Implement missing methods and new functions quick fix)on a class type argument)
(Analyzer: Inheriting nested function-typed parameters)
Not specific to the new syntax:
(Analyzer function type parameters are not correctly scoped)
(Analyzer does not fail on invalid generics use)
Fixed or otherwise closed:
Analyzer crashes with new typedef + named arguments #30729(Analyzer: crashes with new typedef + named arguments)Analyzer: New functions types and inference failures #30758[crash] Analyzer Feedback from IntelliJ #30595DDC does not understand the syntax for generic function types #30375Analyzer: Non-recoverable state with new Function #30760Analyzer: More crashes on new "Function" syntax #31107(Analyzer: Using function types inside of named initializing formals)Analysis Server crash: UnimplementedError: GenericFunctionTypeImpl #29665(Analyzer crash using a function type as a bound)Analyzer: Function type in for-loops crashes/can't parse #31708(Analyzer crash/parse error in foreach types)Analyzer: Still crashing on GenericFunctionType #30858(Analyzer: Using function types inside of<...>
)Some of these are admittedly P2, others have workarounds, and some are P1.
Did we use this feature at all in our libraries or SDK before releasing?
/cc @anders-sandholm @mit-mit @kevmoo
The text was updated successfully, but these errors were encountered: