-
Notifications
You must be signed in to change notification settings - Fork 1.7k
analyzer should warn when using Set literals with SDK < 2.2.0 #36024
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
Are checks like these things we should roll into |
Likely, although it should be done server-side. The problem: it'll make publish slow. CC @mit-mit Either way, having it analyzer itself is a good first step. |
FYI: marked this P1 because I think it's critical to help our users "do the right thing" |
Is this something we're going to want for every experiment that gets enabled? (I think the answer it "yes", but wanted to confirm.) If so, we should make sure that it's part of the analyzer's implementation plan from now on. Is this going to hold up shipping 2.2.0? (I think that's the implication of the P1 and milestone, but again wanted to confirm.) |
I think so! As language features are introduced, it'd be amazing if we could warn people about this. (I'd love to do it for APIs, too.) sdk/sdk/lib/internal/internal.dart Lines 200 to 204 in edca616
I'd like it to block |
Given the amount of moving parts between landing a change in the sdk repo, and it making it's way into even a dev sdk, I suspect we've already missed 2.2.0. We should likely plan for a change landing in a .x patch release, and design the feature we'd ultimately like to see land. |
okay...would be good to track. |
Closed in 5fdb3c5 |
Reverted in 0f4a208 |
Fix was re-landed in 495c319 |
Just like we did for
Future
withoutdart:async
imports, we should warn package authors if they are using a feature outside of their defined SDK constraint.VERY helpful to avoid publishing packages that silently break folks.
CC @mit-mit @devoncarew @stereotype441
The text was updated successfully, but these errors were encountered: