Skip to content

Add support for an allow list of deprecated API usage #51984

Open
@natebosch

Description

@natebosch

Flutter CI fails for any diagnostics, including usage of deprecated APIs. In practice this means that APIs from packages used by any flutter code, and APIs in the SDK cannot be marked deprecated until after flutter usage has been cleaned up. This holds us back from sending a valuable signal about the deprecation to the ecosystem, and extends the critical path for making changes. Adding // ignore comments is noisy in the diff, and high in toil. It's also not easy to find the set of usage that needs to be cleaned up before the deprecated API is deleted.

If we can find some way to refer to the usage of an API in a way that is safe against changes to the surrounding code (we can't refer by line and column because unrelated changes could shift the code around) then we could generate an allow list during a package or SDK roll. The allow list would serve as a list of tech debt issues to be cleaned up.

Plausibly the flutter auto roller could use the analyzer to generate this list, and potentially file an issue when it needs to add new entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.area-sdkUse area-sdk for general purpose SDK issues (packaging, distribution, …).devexp-warningIssues with the analyzer's Warning codestype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions