Commit Graph

245 Commits

Author SHA1 Message Date
Michael Goderbauer
cd8434d931 Refactor how Artifacts are located (#8234)
Artifacts are now located in a central place.
This will enable us to downlaod artifacts when we need them (instead of
downloading them all upfront).
This also makes replacing sky_snapshot with gen_snapshot easier.
2017-02-16 23:10:11 -08:00
Michael Goderbauer
071efec271 Implements WindowsStdoutLogger (#8189)
Replaces unprintable characters with alternative symbols.
2017-02-15 13:20:17 -08:00
Devon Carew
5caeb3ff32 use the intl package (#8060) 2017-02-10 09:36:04 -08:00
Chris Bracken
5d2a460fdd Correct capitalisation of Xcode (#7796)
Ref: https://developer.apple.com/xcode/
2017-02-01 16:16:33 -08:00
Ian Hickson
96e11e1bf1 Clean up the file names of the hot and cold runners. (#7697) 2017-01-28 14:26:49 -08:00
Todd Volkert
417c2f25fc Migrate flutter_tools to use package:platform (#7642) 2017-01-25 16:06:41 -08:00
Devon Carew
a6777b2a60 remove flutter setup (#7596) 2017-01-23 15:22:16 -08:00
Todd Volkert
03d163ce88 Update tools to use package:process (#7590) 2017-01-23 09:46:38 -08:00
Ian Hickson
63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Ian Hickson
15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Todd Volkert
016b5ab0cc Force all dart:io usage to go through 'base/io.dart' (#7390)
This ensures that accidental usages of dart:io's
file API don't creep in over time.
2017-01-09 08:37:00 -08:00
Todd Volkert
8bb270342e Update flutter_tools to use package:file throughout (#7385)
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.
2017-01-06 16:51:44 -08:00
Todd Volkert
622e4396c9 Add tests for nested contexts (#7197)
This tests against the failure that was fixed in #7189
2016-12-08 09:39:32 -08:00
Todd Volkert
df675f45ee Fix Fuchsia build (#7105) 2016-11-30 10:06:48 -08:00
Todd Volkert
60b19b2035 Create abstraction layer for dart:io's Process commands (#7100)
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.
2016-11-30 08:42:42 -08:00
John McCutchan
618030e044 More AppContext cleanups (#7073) 2016-11-29 11:22:48 -08:00
John McCutchan
0b737ac57b Remove default AppContext and cleanup globals (#6999) 2016-11-29 07:54:20 -08:00
Dan Rubel
34e466f1fd Refactor flutter command exit code - part 3 of 3 (#6838)
* 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
2016-11-14 14:21:30 -05:00
Dan Rubel
e384c0d982 Refactor flutter command exit code - part 2 (#6817)
* 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
2016-11-13 22:09:03 -05:00
John McCutchan
45c95b261d Performance fixes for hot reload when using a prebuilt loader (#6821) 2016-11-11 13:28:21 -08:00
Dan Rubel
cccd917ac2 Refactor flutter command exit code - part 1 (#6803)
* convert flutter commands to use ToolExit for non-zero exit code
* add convenience method throwToolExit
* print ToolExit message iff not null
2016-11-11 10:42:09 -05:00
John McCutchan
f172f0675d Miscellaneous cleanups (#6813)
- [x] Return the reload message even when paused at a breakpoint.
- [x] Only initialize context members if they aren't already initialized.
2016-11-10 15:28:19 -08:00
John McCutchan
11ca0f1ada Support caching host filesystem symlink targets to speedup DevFS updates (#6798) 2016-11-10 08:31:11 -08:00
Dan Rubel
6331b6c8b5 revert args to 0.13.6 (#6765) 2016-11-08 17:15:11 -05:00
Dan Rubel
819ac27db3 Merge skia into screenshot (#6623)
* 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
2016-11-02 14:27:49 -04:00
Adam Barth
7e539fea01 Remove flutter run_mojo (#6584)
This command is no longer needed. Also, remove some stray references to Mojo.
2016-10-28 16:24:57 -07:00
Jason Simmons
022cb2d9dc Do not buffer logs in the verbose logger (#6465)
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.
2016-10-21 16:54:59 -07:00
Jason Simmons
1b2049eff4 Fix app refresh on Android in no-hot-reload mode (#6435)
Also remove the obsolete "flutter refresh" command
2016-10-20 12:37:04 -07:00
Todd Volkert
904d524313 Add support for --use-application-binary on iOS (#6318)
Fixes #6283
2016-10-13 16:17:50 -07:00
Dan Rubel
7745dd73c7 improve flutter tool error message for download problems (#6238) 2016-10-06 17:49:14 -04:00
Dan Rubel
aed056c64b remove flutter listen (#6198) 2016-10-05 14:11:41 -04:00
Dan Rubel
9f673ad445 flutter analyze --watch (#6093) 2016-10-04 08:20:24 -04:00
John McCutchan
8da84b1c2d Make flutter tools crash log writing fail gracefully (#6122) 2016-09-28 12:44:18 -07:00
Dan Rubel
133a9c35db extract flutter watch from flutter analyze (#6012) 2016-09-23 09:03:23 -04:00
Dan Rubel
3f68e187f3 Help verbose show hidden options (#5979)
* show hidden flags when showing verbose help
* flutter -v show verbose help
2016-09-22 05:58:45 -04:00
Phil Quitslund
2d4d171338 Roll to Dart SDK 1.20.0-dev.5.0. (#5911)
* Roll to Dart SDK `1.20.0-dev.5.0`.

* bumps to `1.20.0-dev.5.0`.
* updates `analyzer` API use.

* Add explicit types.
2016-09-16 16:30:34 -07:00
Dan Rubel
023b7de11f show device list in flutter doctor output (#5697)
* show device list in flutter doctor output
fixes https://github.com/flutter/flutter/issues/5625
2016-09-01 17:55:16 -04:00
Dan Rubel
e20ec2becb implement flutter format (#5606)
Implement flutter format, fixes https://github.com/flutter/flutter/issues/5338
2016-08-31 09:40:17 -04:00
Dan Rubel
194a9ef3c9 implement flutter packages get/upgrade command (#5603)
* implement flutter packages get/upgrade command
* alias flutter pub
* refactor findProjectRoot for use by multiple commands

fixes https://github.com/flutter/flutter/issues/4994
2016-08-25 22:37:48 -04:00
Dan Rubel
e47e937682 add flutter channel command (#5561)
* add flutter channel command
fixes https://github.com/flutter/flutter/issues/2513

* fix test

* address comments

* remove unused imports

* fix lints
2016-08-25 15:16:21 -04:00
Devon Carew
24f63e2b44 show better errors for gradle build failures (#5374) 2016-08-13 12:30:14 -07:00
Ian Hickson
94636bd206 Cleanup based on new lints (#4052) 2016-05-20 14:08:46 -07:00
pq
1a6f499bc1 Cleanup dangling comment references.
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. :)
2016-05-19 10:21:38 -07:00
Ian Hickson
f284c1a049 Fix tests (#3977)
Also, make sure that broken tests actually break the bots.

And add a test to make sure that keeps happening.
2016-05-17 12:45:37 -07:00
Devon Carew
52d0434bec create a flutter setup command (#3837) 2016-05-10 15:04:29 -07:00
Devon Carew
bd564a02af avoid sending analytics on ci systems (#3765)
* avoid sending analytics on ci systems

* review comments
2016-05-05 19:51:22 -07:00
Devon Carew
713830964c make the usage text more visible (#3693)
* make the usage text more visible

* update the look of the usage text
2016-05-03 15:17:30 -07:00
Devon Carew
adac927501 add google analytics to flutter_tools (#3523)
* 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
2016-04-26 16:25:11 -07:00
Devon Carew
1311ae6ffe add a target for android-x64 (#3224)
* add a target for android-x64

* update armeabi-v7a to x86_64
2016-04-08 14:04:46 -07:00
Adam Barth
412ce9d295 Add flutter precache (#3207)
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.
2016-04-08 08:51:44 -07:00
Jason Simmons
9d022ed26d Add a command that can capture a Skia picture of a Flutter frame and send it to a file or skiaserve debugger (#3165) 2016-04-07 12:33:11 -07:00
Devon Carew
2383d605cd add the dart vm version to flutter doctor
* add the dart vm version to flutter doctor

* drop the dart vm change
2016-04-06 15:11:54 -07:00
Devon Carew
18d29583d0 pubspec normalization; remove den 2016-04-01 08:33:22 -07:00
Devon Carew
4bdc2b872b adjust upgrade command 2016-03-29 09:41:06 -07:00
Devon Carew
4ac186811f fix an exception from flutter doctor 2016-03-28 16:37:25 -07:00
Devon Carew
15b9e1ddb0 add a screenshot command 2016-03-25 22:01:32 -07:00
Devon Carew
2fc8e9a110 create a crash report 2016-03-25 13:29:15 -07:00
Devon Carew
f8374cd966 consolidate build commands under the 'build' command 2016-03-17 07:22:41 -07:00
Devon Carew
8ba214daa2 minor update to flutter daemon 2016-03-15 09:27:58 -07:00
Devon Carew
4daee0cc0d misc tool ui cleanup 2016-03-14 09:41:00 -07:00
Hixie
6795efacab Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-12 00:37:31 -08:00
Ian Hickson
43b0104114 Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commit f41b3411da, reversing
changes made to e33d8d9621.

This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.

This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
2016-03-12 00:34:37 -08:00
Hixie
d162d98c79 Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-11 18:27:32 -08:00
Devon Carew
0fb288c575 refactor to move an ios specific class out of globals.dart 2016-03-02 21:14:11 -08:00
Adam Barth
357fbf8a42 Move update_packages.dart to flutter update-packages
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
2016-02-25 16:27:56 -08:00
Adam Barth
4aae718f85 Download sky_engine and sky_services from cloud storage
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.
2016-02-20 13:25:01 -08:00
yjbanov
a2b1bd4673 "flutter drive" command
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.
2016-02-19 18:11:53 -08:00
Devon Carew
6a6b6539c8 Merge pull request #1947 from devoncarew/less_ios
make the ios development path less mandatory
2016-02-17 00:48:00 -08:00
Devon Carew
7ae6f7f391 make the ios development path less mandatory 2016-02-17 00:38:47 -08:00
Eric Seidel
6159c67d2c Merge pull request #1932 from eseidelGoogle/hide_run_mojo
Hide flutter run_mojo
2016-02-16 16:07:32 -08:00
Eric Seidel
f784fb8ce6 Hide flutter run_mojo 2016-02-16 16:06:39 -08:00
Adam Barth
0bb8d21bd2 Remove flutter ios command
All the functionality of this command has been integrated into other commands.
2016-02-16 16:01:59 -08:00
Devon Carew
cc72bbc7ec rename list->devices, start->run 2016-02-13 23:50:20 -08:00
Devon Carew
de8d11e714 rename the apk/ directory to android/ 2016-02-11 13:28:24 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Jason Simmons
bf1246d881 Add a refresh command that rebuilds the snapshot and reloads it on the device
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
2016-02-09 13:08:19 -08:00
Devon Carew
09cca3b34c massage the help text 2016-01-29 14:32:12 -08:00
Devon Carew
c46ad29cfb test commands checks for test fir 2016-01-28 15:02:50 -08:00
Devon Carew
d7fbf5302d use status(), error(), and trace() for logging
rename to printTrace(), printStatus(), and printError()
2016-01-28 12:44:17 -08:00
Devon Carew
76d069f9c0 rename the init command to create 2016-01-27 14:37:29 -08:00
Chinmay Garde
08fdf99fea Add a 'flutter ios --init' command that fetches the Xcode project from the cloud and configures it for a given flutter project 2015-12-17 14:58:39 -08:00
Adam Barth
9662d49e12 Clean up code organization in flutter_tools
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.
2015-11-28 21:16:55 -08:00
Devon Carew
e36b07f7b5 print logging timestamps to profile app launch 2015-11-25 12:47:25 -08:00
Jason Simmons
07556429f2 Add a Flutter command that builds an APK using a local build of the engine
Example:
   cd flutter/examples/stocks
   flutter --engine-src-path /path/to/engine/src apk -o Stocks.apk -m apk/AndroidManifest.xml
2015-11-17 14:54:25 -08:00
Hixie
a0227cab15 flutter analyze command
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.
2015-11-12 12:23:29 -08:00
Adam Barth
90991854e0 Add a flutter upgrade command
This command upgrades the version of flutter that you're using and runs
`pub upgrade` to update the transitive dependencies.
2015-11-12 10:16:13 -08:00
Devon Carew
a469020983 add a flutter.yaml file to the init template 2015-11-06 20:57:35 -08:00
Adam Barth
fc8cdf4daf Add a command for running unit tests 2015-11-04 23:43:15 -08:00
Devon Carew
7d0a298b0b start a daemon command
wrap up first daemon implementation
2015-11-03 15:58:02 -08:00
Devon Carew
70e20153ab use stack_trace to create more readable exception traces 2015-11-02 00:20:22 -08:00
Devon Carew
494d1e0140 verify that we're running from the root of a project
remove an unused import

review comments

rename st --> stack
2015-10-29 11:30:44 -07:00
Devon Carew
bb1da703a6 return exit codes on failures 2015-10-17 11:50:23 -07:00
Adam Barth
80f30d9176 Don't dump a stack trace for a usage exception
Instead, just print the usage.
2015-10-13 13:37:41 -07:00
Adam Barth
bdd20661d7 Teach sky_tools about prebuilt artifacts
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.
2015-10-12 00:03:55 -07:00
Adam Barth
9148e1779f Expose main via executable.dart
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.
2015-10-10 00:15:21 -07:00