-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Flutter doctor error message lookup #23889
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or perhaps UserMessages (as opposed to bus messages, for instance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit
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.