Skip to content

Settle on a process for deprecating lints #57794

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

Closed
pq opened this issue Sep 21, 2018 · 11 comments
Closed

Settle on a process for deprecating lints #57794

pq opened this issue Sep 21, 2018 · 11 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-task A well-defined stand-alone task

Comments

@pq
Copy link
Member

pq commented Sep 21, 2018

Follow-up from dart-archive/linter#1178 (comment) most recently but this has come up before as well, we should settle on a process for deprecating lints.

@pq pq added the type-task A well-defined stand-alone task label Sep 21, 2018
@bwilkerson
Copy link
Member

One possibility would be to create a new Maturity named deprecated. The doc generator could add a banner and our analysis could generate a warning for lints with that maturity. That wouldn't support telling users what to do about it (in the referenced case it's to replace the old lint with two new lints) nor give us a way to create a quick-fix. I suppose we could have a subclass of Maturity that has additional information.

@pq
Copy link
Member Author

pq commented Nov 24, 2018

The latest analyzer has a new Maturity.deprecated/ . dart-archive/linter#1276 takes advantage of it.

@pq
Copy link
Member Author

pq commented Nov 29, 2018

Closing the loop on process, are we agreed that we will use the deprecated lint maturity w/ a doc noting that deprecated lints are subject to removal in a future release?

@bwilkerson : do we have any boilerplate in analyzer (or elsewhere) we could crib?

As for documentation, I'm thinking a separate page on http://dart-lang.github.io/linter/lints/ that we can link to from deprecated lint docs. Examples of good docs like this would be welcome too btw...

@srawlins, @a14n, @MichaelRFairhurst : thoughts?

@srawlins
Copy link
Member

Is there any reason not to remove a lint immediately? (or, like, the very next release after deprecating)? I thought dartanalyzer ignored unknown lint rule names found in analyzer_options.yaml.

@pq
Copy link
Member Author

pq commented Nov 29, 2018

Is there any reason not to remove a lint immediately?

I guess I'd like to leave the door open for conversation. Dropping some immediately would have no impact (e.g., ones made redundant by default analysis) but for those that would, I guess immediate removal feels sudden and could possibly bum folks out.

@bwilkerson
Copy link
Member

are we agreed that we will use the deprecated lint maturity w/ a doc noting that deprecated lints are subject to removal in a future release?

I agree that that should be part of the process, but I think we need to do a little more. We should probably add some support to the analysis of analysis options files so that uses of deprecated lints are flagged in some way.

do we have any boilerplate in analyzer (or elsewhere) we could crib?

Not that I'm aware of. Deprecating lints is a little different than deprecating APIs.

Is there any reason not to remove a lint immediately? (or, like, the very next release after deprecating)? I thought dartanalyzer ignored unknown lint rule names found in analyzer_options.yaml.

Yes, dartanalyzer will ignore unknown lints when analyzing Dart code. It will generate a diagnostic if the analysis options file is analyzed, which might impact users that take advantage of that. Echoing Phil's comment, it seems rude to not give people time to react to the announcement that a lint is going to be removed. How long we need to wait is something I don't know.

@pq
Copy link
Member Author

pq commented Nov 29, 2018

We should probably add some support to the analysis of analysis options files so that uses of deprecated lints are flagged in some way.

👍

Opened #35291 to track.

@pq
Copy link
Member Author

pq commented Nov 30, 2018

FWIW: deprecated lint validation has landed on the analyzer branch and should be available in server in the next dev build (or as soon as the analyzer branch is folded back into master).

@pq
Copy link
Member Author

pq commented Dec 15, 2020

/fyi @csells

@srawlins srawlins added the P2 A bug or feature request we're likely to work on label Sep 22, 2022
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
@FMorschel
Copy link
Contributor

@pq I'd say this can actually be closed by now. WDYT?

@pq
Copy link
Member Author

pq commented Feb 20, 2025

Thanks!

@pq pq closed this as completed Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-task A well-defined stand-alone task
Projects
None yet
Development

No branches or pull requests

5 participants