-
Notifications
You must be signed in to change notification settings - Fork 218
Make expectAsync be usable in strong mode #436
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
Comments
I tried to do this as part of the initial strong-mode conversion, but it turns out not to be possible with the current type system. There are details in dart-lang/sdk#26420; we can properly type For what it's worth, I personally don't consider |
We've agreed on the solution – ship some number of Should also discuss deprecating |
I believe @floitschG will drive this. |
@floitschG Status here? |
Dan stated a week ago that @skybrian was working on a tool. |
I don't think we should wait for the tool to be ready, because it might be a while. I think we should go ahead and I'll use the tool if I see a way to do it. (I might be able to use pieces for a one-off migration tool just for this.) Presumably we need to add expectAsync0..N, deprecate the old function, and have both of them available during a migration? Seems like we could get started? |
I agree. We should start by updating the package and add the new methods. I'm not sure if we should deprecate the old method, since this would introduce a warning which is (inside Google) often treated as an error, thus leading to a breakage. |
What is the status on this? This is blocking many tests for being strong clean. |
Let's punt on marking it deprecated for this reason – although we should do it once we've rolled Google. |
@nex3 - can you take a look at this today? On Fri, Nov 18, 2016 at 12:09 PM, Kevin Moore [email protected]
|
Avoiding useful warnings because they might cause churn sets a very bad precedent. Warnings exist as a category precisely so that we can communicate "you probably want to change this" without actually breaking code. If downstream teams want to keep their code warning-clean, that's great, but it has to be their responsibility to do so. If fatal warnings provide a strong reason for upstream maintainers not to add useful metadata, we should strongly discourage Google3 users from making warnings fatal.
I thought @floitschG was doing this? I can do it if you want me to, but today is my 20% day, so I'd like to wait until Monday. |
On Fri, Nov 18, 2016 at 1:23 PM, Natalie Weizenbaum <
|
Deprecation warnings shouldn't break Google's build. (That used to be the case, but I'm pretty sure it's fixed now.) |
… methods. Fixes dart-lang#436. patch from issue 2515303002 at patchset 1 (http://crrev.com/2515303002#ps1)
Basically every usage of
expectAsync
makes code non strong-mode compliant, because it takes in a precisely typed function type as a parameter but returns a plainFunction
:Since I'm not super familiar with strong-mode, I don't know, but there might be a way with generic methods to avoid this kind of issue.
The text was updated successfully, but these errors were encountered: