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

[flutter_tools] The UserMessages class should be deprecated #125155

Open
andrewkolos opened this issue Apr 19, 2023 · 3 comments
Open

[flutter_tools] The UserMessages class should be deprecated #125155

andrewkolos opened this issue Apr 19, 2023 · 3 comments
Labels
c: tech-debt Technical debt, code quality, testing, etc. P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@andrewkolos
Copy link
Contributor

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.
@andrewkolos andrewkolos added tool Affects the "flutter" command-line tool. See also t: labels. passed first triage c: tech-debt Technical debt, code quality, testing, etc. labels Apr 19, 2023
auto-submit bot pushed a commit that referenced this issue Apr 19, 2023
@andoriyaprashant
Copy link

hey @andrewkolos can you please review my pr #125192

@TzviPM
Copy link
Contributor

TzviPM commented Apr 25, 2023

I think the right way forward here, if we want to support building tooling on top of flutter_tools, may be to externalize all the strings. This could provide a path to i18n in the way GNU tools like ls support multiple languages.

@christopherfujino
Copy link
Member

christopherfujino commented Apr 27, 2023

I think the right way forward here, if we want to support building tooling on top of flutter_tools, may be to externalize all the strings. This could provide a path to i18n in the way GNU tools like ls support multiple languages.

Do we want to support building additional tooling on top of flutter_tools? Or do you mean continuing to support the internal flutter tool?

@andrewkolos andrewkolos added the P3 Issues that are less important to the Flutter project label Jun 7, 2023
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
@christopherfujino christopherfujino changed the title [flutter_tools] Use of UserMessages is sporadic [flutter_tools] The UserMessages class should be deprecated Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: tech-debt Technical debt, code quality, testing, etc. P3 Issues that are less important to the Flutter project team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants