Flutter doctor error message lookup#23889
Conversation
Copied back progress after resetting local repository.
Fix whitespace in android_workflow.dart
# Conflicts: # packages/flutter_tools/test/android/android_workflow_test.dart # packages/flutter_tools/test/src/context.dart
# Conflicts: # packages/flutter_tools/lib/src/android/android_workflow.dart
# Conflicts: # packages/flutter_tools/lib/src/context_runner.dart # packages/flutter_tools/lib/src/doctor.dart
| /// Class containing the messages that can be produced by the doctor validators. | ||
| /// Members are split by validator and are given in the order they appear in the | ||
| /// validator code. | ||
| class ErrorMessages { |
There was a problem hiding this comment.
These are all the messages so let's just call them Messages or Strings since messages seems to conflict in some files.
There was a problem hiding this comment.
Or perhaps UserMessages (as opposed to bus messages, for instance)
There was a problem hiding this comment.
Named to UserMessages.
|
|
||
| ErrorMessages get errorMessages => context[ErrorMessages]; | ||
|
|
||
| /// Class containing the messages that can be produced by the doctor validators. |
There was a problem hiding this comment.
I think this class can be more general than just for validators - we could grow it to use it for thrown exceptions as well.
There was a problem hiding this comment.
That seems likely. Changed the doc comment to be more general.
# Conflicts: # packages/flutter_tools/lib/src/ios/ios_workflow.dart
| @@ -0,0 +1,175 @@ | |||
| import '../ios/cocoapods.dart'; | |||
There was a problem hiding this comment.
For this and vscode_validator.dart, let's factor out anything that causes these dependencies into parameters for the message (e.g. VsCodeValidator.extensionMarketplaceUrl). That way, we won't have dependencies on these files.
the class and take them as arguments instead.
|
@tvolkert Comments addressed, ready for merging (I don't have write access) |
|
@tonyzhao1 as discussed offline, I'm putting this in the bucket12 milestone for later merging. |
|
Ok @tonyzhao1 now that we're past 1.0 and the tree is unfrozen, I'm game to merge this, but there are now merge conflicts. Can you rebase and resolve conflicts? |
# Conflicts: # packages/flutter_tools/lib/src/context_runner.dart # packages/flutter_tools/lib/src/ios/ios_workflow.dart # packages/flutter_tools/lib/src/vscode/vscode_validator.dart
|
There's lots of strings that aren't covered by this, what's the long term plan here? What problem does this solve? |
Moves the error messages produced by validators to a single central class that they all reference.