How to make pub build show warnings / hints from all packages
I have an application that has about 10 packages that I developed myself. I only run pub build on one of them and it depends on other packages. When I run the pub build, I get an output like:
[Dart2JS on myapp_client|web/index.html_bootstrap.dart]:
3 warning(s) suppressed in package:myapp_shared.
[Warning from Dart2JS on myapp_client|web/index.html_bootstrap.dart]:
4 hint(s) suppressed in package:myapp_infra.
[Dart2JS on myapp_client|web/index.html_bootstrap.dart]:
8 warning(s) suppressed in package:myapp_client.
Since these warnings all come from my code, I'm interested in seeing the full warnings, I don't want them suppressed. How can i do this? I saw that dart2js has a -show-package-warnings option, but pub build doesn't have that. Also this parameter is not configurable in pubspec.yaml on dart2js transformer.
+3
Jonas Kello
source
to share
2 answers
It seems that this option is not available.
As of http://dartbug.com/9512, the generation of warnings for dependencies was suppressed, but there were no exceptions for path dependencies (see the codereview link in the linked issue).
+1
Günter Zöchbauer
source
to share
Gunther and Jonas answered the question. As it took me a few minutes to figure out the actual syntax I would like to clarify. Your
should contain the following lines:
pubspec.yaml
should contain the following lines:
- $dart2js:
commandLineOptions: [--show-package-warnings]
+2
Leukipp
source
to share