Skip to content
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

[Wildcard Variables] Disable the no_wildcard_variable_uses lint in >=3.6 #5072

Closed
Tracked by #4969
kallentu opened this issue Aug 21, 2024 · 4 comments
Closed
Tracked by #4969

Comments

@kallentu
Copy link
Member

kallentu commented Aug 21, 2024

The wildcard variables feature will cover errors that this lint is triggering on for _.
We should disable the lint for any library in which the feature is enabled (>= 3.6, once the flag is enabled).

cc. @pq

@kallentu kallentu changed the title [Wildcard Variables] Remove the no_wildcard_variable_uses lint in 3.6 [Wildcard Variables] Remove/update the no_wildcard_variable_uses lint in 3.6 Aug 21, 2024
@bwilkerson
Copy link
Member

We can't actually remove the lint until we stop supporting any language version prior to the version in which wildcard variables is shipped. The reason is that users could still have code that opts back to 3.5 or earlier and might still want the lint enable for that code so that they don't make it harder to migrate that code to the latest version.

What we can do instead is disable the lint for any library in which the feature is enabled. When we get closer to dropping support for pre-3.6 versions we can deprecate the lint, and then after a period of time we can actually remove it. (We don't want to deprecate it in 3.6 because that would be annoying for users that still need it for not-yet-migrated code.)

@kallentu
Copy link
Member Author

disable the lint for any library in which the feature is enabled

Ah, this should be the proper action item then.

That sounds good to me.

@kallentu kallentu changed the title [Wildcard Variables] Remove/update the no_wildcard_variable_uses lint in 3.6 [Wildcard Variables] Disable the no_wildcard_variable_uses lint in >=3.6 Aug 21, 2024
@pq
Copy link
Member

pq commented Aug 22, 2024

We've got a bit of precedent here and a few other lints that get short-circuited based on the presence of a language feature so I agree that's a good way to go here.

Sorry for the late reply!

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Aug 22, 2024
Fixes: dart-lang/linter#5072

Change-Id: I926ab733df2a8caaa3574fd4284618683780b37e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
@pq
Copy link
Member

pq commented Aug 22, 2024

Fixed w/ dart-lang/sdk@5be7c56.

@pq pq closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants