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.
Now that we don't require the Dart SDK to be in your path, it's hard to run
./dev/update_packages.dart. Instead, you can now run `flutter update-packages`.
Fixes#1906
Downloading these packages from cloud storage simplifies our deployment
story because we can upload to cloud storage automatically from the
buildbot.
This patch also switches the responsibility for downloading the engine
artifacts to update_engine.sh. Centralizing this responsibility ensures
that the packages and the binaries are always in sync.
Runs a test app and a driver test simultaneously, then stops the app.
Usage:
```
flutter drive --target=/path/to/test/app.dart
```
This command will look for `/path/to/test/app_test.dart` by
convention. We will expand into other ways of discovering tests in the
future.
This provides a fast way to iterate on changes to a Flutter app that only
involve updates to Dart code and do not require a full build and install
of the FLX and APK
1) Moved basic utility code into base/ directory to make it clear which code
doesn't depend on Flutter-specific knowldge.
2) Move the CommandRunner subclasses into a runner/ directory because these
aren't commands themselves.
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
upon further reflexion it was determined it didn't work anyway.
We'll probably have to add better diagnostics here and say to run the
updater script.
- Remove the native velocity tracker script, since it was testing code
that has since been removed.
Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
strong mode because even though it's not really relevant to our needs,
it does (more or less accidentally) catch a few things that are
helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
identifiers using lowerCamelCase.' lint, to allow one-letter variables
that use capital letters (e.g. for physics expressions) and to allow
multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
incantation and a "#" character:
// analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
// analyzer says "..."
...then we ignore any errors that have that "..." string in them.
This patch makes `flutter start` work without a clone of the engine git
repository. Making this work pulled a relatively large refactor of how the
commands interact with application packages and devices. Now commands that want
to interact with application packages or devices inherit from a common base
class that holds stores of those objects as members.
In production, the commands download and connect to devices based on the build
configuration stored on the FlutterCommandRunner. In testing, these fields are
used to mock out the real application package and devices.
Expose the main entry point for the tools via the library lets us run the tools
from the Flutter package, which simplifies the setup for end developers because
they don't need to declare a dependency on sky_tools directly.