-
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
Meta issue for Dart 1.5 generic methods, non-strong mode. #27501
Comments
We have an informal specification for this here: |
@eernstg My understanding is that the dart2js implementation is up to date, is that correct? If not I'll file an implementation bug. |
The dart2js implementation currently needs the '--generic-method-syntax' option in order to enable this feature, and it emits a warning ( |
I believe that support is now at a point where we can start the process of moving this out from under a flag in all implementations and testing it out, probably starting with the SDK. |
Is there an order in which the flags should be removed, or should I go ahead and remove the flag from analyzer? |
@eernstg is managing the flag removal, but I believe the plan is to do this as soon as possible. From my perspective, the only constraint is that all of the flags should be removed atomically with respect to the next roll into google3 (that is, I don't think we should do a roll in which the analyzer supports them without a flag but the VM or dart2js doesn't). I'd also like to see us do this soon, so we can start converting over the comment syntax and get some more confidence that there aren't bugs. |
We will now get ready to enable this feature in all tools: Every tool team can go ahead and create a CL to enable syntax-only generic methods by default, but keep that CL un-landed for now. We will land this feature at the same time, and put a bullet into Here's some information about the considerations behind this approach: It is in fact a breaking change to enable syntax-only generic methods by default: for instance, the argument list in It should be noted that there is no way the introduction of this feature could silently change the meaning of a working program: If The disruption amounts to programs that used to work but now have compile-time errors, or warnings and run-time errors. The diagnostic messages might not be very helpful (because the old code was never intended to call generic methods), so we will need to make sure that the developers will have a chance to discover what is going on, if it hits them. Hence the entry in |
VM changelist: https://codereview.chromium.org/2486943003 |
Analyzer CL: https://codereview.chromium.org/2488043002/ |
status: Implementation is almost done, I believe there were some issues with the presubmit. @eernstg can you update? |
Analyzer being debugged (some issues arose in the global pre-submit in google3). |
One update in google3 requested, and then we should have a clean global pre-submit run with the analyzer. |
Current status: The VM and dart2js CLs went through the global pre-submit with 14 new errors, all of which were unlikely to be caused by this change (for instance, almost all of them had a "recently flaky" flag, and the remaining ones were network errors like 'recycling port still in use', and similar things). Consequently, last week I asked to get these CLs (2486943003 and 2476423005) landed, and that should happen within days (2476423005 was landed last week and reverted because of some status file issues, an update is expected to land tomorrow; I just sent a reminder about landing 2486943003). The analyzer was a bit more complex to handle; the global pre-submit had 144 new test failures; they turned out to be concerned with generic tear-offs ( One issue remains: The analyzer performs a large number of checks on generic methods, and we haven't clarified the relationship between the checks performed by the analyzer and the checks specified in the informal spec of this feature. Apparently, it is not simple to make the analyzer perform just those (few) checks, and it is not simple to make the analyzer ignore the comment syntax when in standard (non-strong) mode. |
It appears that I haven't been very clear in our conversations, for which I apologize.
That's not accurate. If we know of an error that is being produced when it shouldn't be it's fairly trivial to find where that's happening and either stop reporting it or report a hint instead of an error. Hence my question about tests, because the tests will tell us when we're incorrectly generating an error so that we can fix it. What isn't trivial is to ensure that we have caught all of the places where an existing error is being generated when it shouldn't be. Basically we'll only be as complete as the test suite used to find such places.
As far as I know, analyzer does ignore the comment syntax when in standard mode. (I think we were mis-communicating because we were discussing both a general principle and a specific case at the same time.) If you have evidence to the contrary, please let me know. |
I just landed the flag change in the VM. |
Fixed some status entries since the first land-revert of this CL. This addresses #27501. [email protected] Review URL: https://codereview.chromium.org/2520293002 .
The language group discussed the situation and agreed that it is OK to proceed to land the analyzer CL and then handle the error-to-hint adjustments afterwards. |
@bwilkerson can we go ahead and land the cl so that we can get this complete in 1.21? |
@munificent I see in dart-lang/dart_style#556 that formatter support landed in that repo. Do we need something to bring that over to 1.21 in the SDK? |
FYI: The analyzer CL was already landed yesterday (and a comment on this action was added to #27641 when it was closed). |
I just published a new version of dart_style with that fix (and the other half of generic method syntax that I overlooked—parameters), and pulled that version into the master branch of the SDK's DEPS file. As far as I know, we should be good after that. |
Cool! Closing. |
This is a tracking bug for generic methods in non-strong mode Dart 1.5 .
The text was updated successfully, but these errors were encountered: