-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
Flutter developers see many suprious warnings from the Dart compilers both when they run and compile their Dart applications.
Users see warnings from outside their package and see warnings from their own package even when using the comment syntax to suppress the warnings. These warnings are distracting and not actionable.
See dart-lang/sdk#46264 for more context.
Proposal
Add the --verbosity=error flag to all commands running Dart compilers
This eliminates showing all warnings in compiler output for Flutter eliminating the problem.
Most Dart warnings for dependencies are not actionable as users should not take any action to resolve the warning and the warnings are harmless. Users who want to see warnings and lints can use the flutter analyze command or use the functionality embedded in their IDE. This isn't the perfect solution but is the most practical short term step to resolve a pain point for users.
Alternative solutions would be significantly more costly to implement with limited benefit. Alternatives include making the Dart compilers support the same rules for filtering warning as the analyzer (including only showing warnings for the local project), enabling automatically running dart fix to resolve warnings from dependencies, and integrating the analyzer with the compiler to emit warnings consistently.
Fyi @christopherfujino.