Commit Graph

267 Commits

Author SHA1 Message Date
Devon Carew
15ea399fdd add identifiers to progress messages (#6868) 2016-11-15 12:13:56 -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
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
e908655207 Remove legacy restart support (#6801) 2016-11-10 11:12:59 -08:00
Ian Hickson
04e7446b2b Make the fire red on black-and-white terminals (#6748) 2016-11-07 15:48:50 -08:00
Dan Rubel
974da47481 send app.progress events (#6744) 2016-11-07 17:55:45 -05:00
Devon Carew
fcfb2a5c55 Better progress (#6677)
* make showElapsedTime default to true

* support nested progresses

* improve hot reload message

* rethrow
2016-11-03 13:28:17 -07:00
Dan Rubel
1f1adcaa0e refactor app.* daemon events (#6679) 2016-11-03 14:29:56 -04:00
Dan Rubel
223f416199 Flutter run with machine output (#6645)
* add flutter run --machine flag
* refactor daemon stdin/out command stream/response
* extract daemon startApp method
* refactor flutter run --machine to call daemon.startApp
2016-11-02 17:15:01 -04:00
Devon Carew
55a374d46b Reload pause (#6459)
* add a pause parameter to the reload command

* encode OperationResult as json

* reverse isOk logic
2016-10-21 16:07:19 -07:00
Devon Carew
d9bbd2fb53 make app ids more unique (#6113)
* make app ids more unique

* in-line the uuid class
2016-09-28 11:18:05 -07:00
Devon Carew
cf794f42ef return info about whether a device is an emulator (#6114) 2016-09-28 01:10:40 -07:00
Devon Carew
f7d501024c share a common default for enabling hot reload (#6081) 2016-09-26 19:02:04 -07:00
Devon Carew
4c1e4a24ae allow daemon app launches to be more lenient about device ids (#6015) 2016-09-23 08:52:10 -07:00
Dan Rubel
1821238279 Refactor flutter command execution (#5892)
* refactor _run to runCmd

* replace requiresProjectRoot getter with call to commandValidator

* replace requiresDevice getter with call to findTargetDevice

* trace command requires a debug connection, not a device

* inline androidOnly getter

* rename command methods to verifyTheRunCmd and runCmd

* move common verification into BuildSubCommand

* rename deviceForCommand to device

* rename methods to verifyThenRunCommand and runCommand
2016-09-16 09:13:35 -04:00
Dan Rubel
672d04e0d0 close sinks cleanup (#5838)
part of https://github.com/flutter/flutter/issues/5789
2016-09-13 14:15:36 -04:00
Devon Carew
6b1597dc0d send the base uri back to debuggers (#5321)
* send the base uri back to debuggers

* add a fullRestart parameter to app.restart

* add await
2016-08-11 09:51:19 -07:00
Devon Carew
30505aef8b support hot mode from the daemon protocol (#5271)
* support hot mode from the daemon protocol

* move method params to constructor
2016-08-05 21:09:42 -07:00
John McCutchan
81b4e827e1 Split hot run mode into a separate file (#5233) 2016-08-05 12:04:33 -07:00
John McCutchan
0de691621b Add --hot mode for flutter run 2016-07-20 14:38:25 -07:00
Devon Carew
6cdfd86ad1 send the reload source command for ios simulators (#4731)
* send the reload source command for ios simulators

* review changes

* rewrite w/ a completer
2016-06-24 10:26:43 -07:00
Ian Hickson
f92f71feb9 Lock flutter tool while updating artifacts (#4476)
This prevents multiple simultaneous runs of the analyzer from stomping
over each other (e.g. multiple runs of 'update-packages'). Certain
long-lived commands (like analyze, run, logs) are exempted once they've
done enough work to be safe from most stomping action.

This still doesn't make us entirely safe from craziness, e.g. if you're
half way through an 'update-packages' run and you call 'git pull', who
knows what state you'll end up in. But there's only so much one can do.

Fixes https://github.com/flutter/flutter/issues/2762
2016-06-14 10:16:08 -07:00
Devon Carew
b6c3ae37f6 send supportsRestart flag when starting an app (#4513)
* send supportsRestart flag when starting an app

* remove unused imports

* review comments
2016-06-13 13:16:20 -07:00
Ian Hickson
c9bcf1074e Analyzer was confused when you deleted files (#4528)
Also, make it clear the screen between results so it's more obvious
what's going on when you have new results (especially when you have
fixed everything).
2016-06-13 12:20:03 -07:00
Devon Carew
fcd68c8a21 Support route (#4470)
* support --route in flutter run --resident

* also for the daemon app.start command
2016-06-08 13:44:54 -07:00
Devon Carew
3ba17136b7 add a restart command to the daemon protocol (#4385)
* refactor the --resident run option into a separate file

* update daemon to run --resident apps

* re-plumbing daemon start

* send app logs

* update tests

* review changes

* fix test runner

* remove PackageMap.createGlobalInstance; rely on the ctor

* review comments
2016-06-07 12:13:35 -07:00
Jason Simmons
00c7734c8b Tools daemon handlers for discovering apps and forwarding device ports (#4324) 2016-06-02 14:00:27 -07:00
Devon Carew
cc5d1adcfc handle an exit code from android n (#3914)
* handle an exit code from android n

* review comments
2016-05-13 16:47:30 -07:00
Jason Simmons
a590ee2671 Remove BuildConfigurations (#3879)
Artifacts from local engine builds will be found based on the --local-engine flag
2016-05-12 12:22:15 -07:00
Jason Simmons
0f53f7966b Remove Toolchain and extend ToolConfiguration to locate host tools such as sky_snapshot (#3870)
Host tools can be found in the artifact cache directory for the host platform.
If a developer wants to use a local engine build instead, then provide an
--engine-build flag that selects the specific engine build variant.
2016-05-11 15:47:26 -07:00
Devon Carew
c9010c91f6 fix analysis errors (#3677)
* fix analysis errors

* review comments; fix test

* re-add an export for debugPrint
2016-05-03 09:09:00 -07:00
Devon Carew
99114cd414 show more errors on missing jarsigner (#3626) 2016-04-28 22:48:01 -07:00
Devon Carew
b0dca79671 Flutter run (#3553)
* rework flutter run

* fix npe with --debug-port

* connect to obs and exit when that conneciton closes

* update todos
2016-04-27 14:43:42 -07:00
Devon Carew
12cac94cda Use arm deploy (#3374)
* download android-arm-deploy

* wire up --deploy to android-arm-deploy

* fix interpolation
2016-04-18 09:01:43 -07:00
Devon Carew
f132acaf1d use the new cache code to locate more artifacts (#3361)
* use the new cache code to locate more artifacts

* add todo

* review comments
2016-04-15 21:08:03 -07:00
Devon Carew
40598449ad add cache.dart to help manage the cache dir (#3168)
* add cache.dart to help manage the cache dir

* sp
2016-04-07 09:15:58 -07:00
Devon Carew
653566dd23 simplify toolchain setup 2016-04-04 13:10:56 -07:00
Devon Carew
f1cdf6df39 refactor; fix apk warning 2016-03-21 09:24:56 -07:00
Devon Carew
8ba214daa2 minor update to flutter daemon 2016-03-15 09:27:58 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Ian Hickson
d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Devon Carew
5ad6a57007 remove some references to DeviceStore 2016-03-11 11:25:03 -08:00
Devon Carew
8283ce87e2 fix the stop command tests 2016-03-03 13:58:49 -08:00
Devon Carew
d911aaa6d0 refactot the stop command to not use DeviceStore 2016-03-03 00:22:40 -08:00
Devon Carew
022047f5eb remove the isConnected() method from device 2016-02-26 13:23:48 -08:00
Devon Carew
67046f933d add the ability to start and stop device polling 2016-02-20 22:00:11 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Eric Seidel
f784fb8ce6 Hide flutter run_mojo 2016-02-16 16:06:39 -08:00
Devon Carew
b7b06c2a27 fixes found when running through the getting started process 2016-02-15 14:06:23 -08:00
Devon Carew
cc72bbc7ec rename list->devices, start->run 2016-02-13 23:50:20 -08:00
Devon Carew
dcf0b7bae6 allow any android sdk version 2016-02-13 14:37:41 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Devon Carew
9e6d45cb03 general refactoring around device management
remove the device factory methods as well as the device cache
2016-02-06 11:49:48 -08:00
Devon Carew
67124dc3a5 refactor to parse xcrun simctl list as json
add device notifications for the simulator
2016-02-05 19:04:47 -08:00
Matt Perry
5d2281b69b 'flutter start' calls 'flutter apk' if necessary.
flutter start no longer depends on a pre-built SkyShell.apk. It builds a
new one, as long as an AndroidManifest.xml exists.

We rebuild the .apk every time either AndroidManifest.xml or
flutter.yaml changes.
2016-02-03 12:21:20 -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
7ac4e6248f refactor the list command 2016-01-27 14:03:41 -08:00
Devon Carew
080896a305 improve device notification support 2016-01-25 13:50:59 -08:00
Devon Carew
5bce2fbdec refactor platform specific code out of device.dart
remove device type specific checks
2016-01-22 10:51:49 -08:00
Devon Carew
5daf58ce1e refactor commands to move out re-usable functionality 2016-01-21 09:38:46 -08:00
Devon Carew
8bb8e1d9e7 add device notifications to the daemon command 2016-01-19 21:29:20 -08:00
Devon Carew
0f55ebe503 fixes to flutter analyze for the latest dev sdk 2016-01-12 19:04:19 -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
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
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Devon Carew
7d0a298b0b start a daemon command
wrap up first daemon implementation
2015-11-03 15:58:02 -08:00