This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.
This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
With this change, they're run via instance methods on an object
obtained through the context. This will allow us to substitute
that object in tests with replay/record versions to allow us to
mock out the os-layer in tests.
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
* convert pubGet to throw ToolExit on non-zero exit code
* convert commandValidator to throw ToolExit for non-zero exit code
* convert flutter commands to throw ToolExit for non-zero exit code
* use convenience method throwToolExit
* only show "if this problem persists" for unusual exceptions
* merge `flutter skia` into `flutter screenshot`
* improve skia failed error message
* update help text - how to find diagnostic port for skia
* improve error message if skia capture fails
With the old policy the most recent log would not be printed until the next
log is produced (which may be indefinitely). This change prints logs
immediately along with a time delta since the previous log.
Quick pass at fixing a few dangling references as revealed by the new `comment_references` lint (https://github.com/dart-lang/linter/issues/240).
There's a bunch more to do here before we can turn it on by default (~430 lints as of now). Many of them are a simple matter of adding an import (e.g., `dart:async` for library docs that reference `Future`) but others will require a bit of thought. Probably best done by the folks writing the code. :)
* add google analytics
* send in the run target type
* track device type targets
* use the real GA code
* review comments
* rev to usage 2.0
* rev to 2.2.0 of usage; add tests
* review comments
This command explicitly populates the flutter tool's cache of binary artifacts.
Also, teach `flutter create` to update the cache in case its the first command
that a user runs.