Skip to content

[flutter_tools] The UserMessages class should be deprecated #125155

@andrewkolos

Description

@andrewkolos

The tool has a UserMessages class that houses some user messages displayed to the user by the flutter tool. However, many messages are not stored in this class (example).

Going back to the PR that introduced it, it's still unclear what the original intent was. See this comment from @Hixie on the PR.

The class does allow partial reimplementations of the flutter tool to override messages, and it sees very light use in g3. However, it is unclear if this is worth the confusion this class can cause.

Some possible ways to address this:

  • Delete the class entirely, either removing the g3 message overrides entirely or finding some other way to enable g3 specific messages.
  • Rename and document the class to better describe it's specific purpose. Perhaps the class should only contain messages that need to be overridden in g3.
  • Be consistent and have all user messages stored in this class. This would probably result in more trouble than it's worth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: tech-debtTechnical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions