-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart commands and Flutter commands are inconsistent #52747
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
Comments
Thanks for the issue @rrousselGit! I agree, we could definitely be more consistent between our CLIs and that is something we'd like to do. I'll be sure to bring this up at our next CLI sync. We've got lots of different teams working on the various commands, particularly for the Dart CLI, so if you (or anyone else) is aware of any other inconsistencies, please document them here so we can be made aware of them. |
Great! I'll do my best listing those inconsistencies as they come back to mind. Another one is: |
Thanks Remi! It's greatly appreciated! :) |
Related issue |
There is also another inconsistency I found: # automatically name the project as name_with_dash
dart create name-with-dash
# this isn't allowed
flutter create name-with-dash
# what you have to do
flutter create name-with-dash --project-name name_with_dash $ flutter create name-with-dash
"name-with-dash" is not a valid Dart package name.
See https://dart.dev/tools/pub/pubspec#name for more information. I usually name my repository with dashes instead of underscores |
Hello!
This is an issue about how as a whole, while many commands are shared between
dart cmd
andflutter cmd
, there are lots of inconsistencies.This causes quite a bit of confusion because the tools are not strictly interchangeable. Someone used to one command with either
dart
orflutter
will likely expect the variant in the other command to behave the same, when it doesn't.Here's a non-exhaustive list of problems I found:
flutter analyze
exits with 1 if infos are found, butdart analyze
doesn't. So the former uses --no-fatal-infos, while the latter uses --fatal-infos.flutter test --coverage
generates a lcov file, yetdart test --coverage=dir
expects a directory name and generates unintuitive JSON outputs (which doesn't work with VScode extensions such as Coverage Gutters)Considering how both are maintained by Google, I think it would be valuable if the commands could be aligned to behave similarly.
The text was updated successfully, but these errors were encountered: