Commit graph

1973 commits

Author SHA1 Message Date
Alexander Aprelev 52fbcefed6 Link platform.dill only into app kernel file used for build aot. (#12571)
gen_snapshot loads all packages from single app kernel file.
2017-10-17 13:30:32 -07:00
Alexander Aprelev be1467e0cd Restructure hot mode test so it runs interactively. (#12519)
* Restructure hot mode test so it runs interactively.

This allows to add a benchmark for hot reload after actual source code change.

* Add curly braces, refactory copyRecursive
2017-10-13 20:06:35 -07:00
Alexander Aprelev 6c6d08b9ee Keep incremental compiler state through full restart. (#12535)
* Keep incremental compiler state through full restart.

* Add todo

* Add todo
2017-10-13 15:18:24 -07:00
Ryan Macnak 07a4b4c426 Reapply "When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed." (#12490)
This reverts commit 5e7bcbacf8.

`flutter run --benchmark` was triggering a different quick bailout path in the VM than `flutter run`. The failure has been fixed upstream.
2017-10-12 15:58:40 -07:00
Alexander Aprelev 85e4f0526b Fix restart flow for preview-dart-2 mode. (#12496)
* Fix restart flow for preview-dart-2 mode.

Restart in preview-dart-2 needs to use kernel file and it has to be complete, rather than incremental kernel file.

* Add curly braces

* Do full compile on restart

* Roll engine to pick up changes to hot reload for preview-dart-2
2017-10-12 14:48:37 -07:00
Ryan Macnak a4b29d6414 Pass --enable_mirrors=false when building script snapshots for the debug mode. (#12472)
The initial loading happens on the host, which was building a script snapshot and allowing imports of dart:mirrors. Hot reload happens on the device, which then notices the imports and issues a compile-time error. This change causes programs with imports of dart:mirrors to be rejected during the initial load.

Fixes https://github.com/flutter/flutter/issues/12440
2017-10-12 14:46:37 -07:00
Zachary Anderson 4c23397eda Remove dead --assert_initializer flag (#12441) 2017-10-06 14:54:14 -07:00
Alexander Aprelev ac1546c794 Add hotReloadInitialDevFSSyncMilliseconds to track how long user have… (#12417)
* Add hotReloadInitialDevFSSyncMilliseconds to track how long user have to wait before being able to do first reload.

This stat is significantly different between existing and preview-dart-2 setting (for the latter, this stat is ~3x slower: 13s vs ~4s).

* Remove ws

* Cleanup timer-related code
2017-10-06 08:39:46 -07:00
Alexander Aprelev d5ba4df6af Skip over flutter sdk packages when upgrading dependencies. (#12405) 2017-10-04 17:50:10 -07:00
Ryan Macnak 5e7bcbacf8 Revert "When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed. (#12304)" (#12406)
This reverts commit 90028813a8.

This change caused a few bots to fail with 'JSON-RPC error 110: Extension error', which is odd because _getUnusedChangesInLastReload is not an extension.
2017-10-04 17:13:17 -07:00
Ryan Macnak 90028813a8 When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed. (#12304) 2017-10-04 16:32:30 -07:00
Devon Carew 02429cef84 Fix the doctor check for the flutter intellij plugin (#12389)
* update the intellij doctor check to support the m18 plugin version

* update to support multiple package names
2017-10-03 16:24:18 -07:00
stevemessick b9f20dc335 Print "package" instead of "plugin" when creating a package. (#12387) 2017-10-03 16:06:33 -07:00
Alexander Markov 7153dea296 Add hidden options --extra-front-end-options and --extra-gen-snapshot-options to flutter tool (#12219)
This CL introduces 2 hidden options to 'flutter build aot' and 'flutter run' for passing arbitrary arguments to front-end server and to gen_snapshot tool when building and running flutter app in --profile or --release modes.

The ability to pass arbitrary options simplifies various experiments, as it removes the need to change defaults and rebuild flutter engine for every tested configuration.
2017-10-03 12:55:53 -07:00
Ian Hickson 89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Michael Thomsen 3f6b28dddb Add a check for gradle failing due to missing licenses (#12318)
* Add a check for gradle failing due to missing licenses

* Review feedback Jakob
2017-09-29 13:49:38 +02:00
Ian Hickson e1fa035b69 Retry on failed download. (#12293) 2017-09-28 17:37:34 -07:00
Todd Volkert ce59412cf2 Remove hard-coded "Runner" from iOS simulator logs filtering (#12306) 2017-09-28 13:11:16 -07:00
Chris Bracken 283f27d422 Clarify libimobiledevice installation status message (#12303)
Differentiate between 'not installed' and 'not working' and emit a more
targeted message.
2017-09-28 13:04:59 -07:00
Todd Volkert 9ea1ff12d7 Add Flags class. (#12268)
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
2017-09-28 09:36:55 -07:00
Ian Hickson efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
Sarah Zakarias 3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
Todd Volkert bb0a724a1d Don't require .packages file for flutter packages command (#12258)
(it's the command that populates the .packages file)
2017-09-26 09:12:40 -07:00
Sarah Zakarias 49ba974710 Factor out flutter manifest logic (#12237) 2017-09-26 14:48:52 +02:00
Todd Volkert a08b5e00af Run command validation on all commands. (#12246)
This makes command validation happen as part of `verifyThenRunCommand()`,
using a newly introduced protected method (`validateCommand()`) rather than
a `commandValidator` property (that subclasses were responsible for manually
invoking).
2017-09-25 18:56:37 -07:00
Ian Hickson 36e7138e4f Update some places that mentioned the old update-packages --upgrade (#12218) 2017-09-23 22:23:09 -07:00
Ian Hickson 441b5c2031 Pin all dependencies ONCE AND FOR ALL (#12210)
* Pin all dependencies ONCE AND FOR ALL

This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.

* Add comments.
2017-09-22 13:35:35 -07:00
xster e28765a997 Delinting future awaits round 3 (#10791)
* round 3

* partially address comments

* merge

* review notes

* review

* review

* review
2017-09-20 17:24:43 -07:00
xster 987b205665 Delinting future awaits round 2 (#10790)
* round 2

* deal with null futures

* review

* review

* review

* review
2017-09-20 16:25:16 -07:00
Zachary Anderson 8566777dee Fix -d all hot reload (#12178) 2017-09-19 15:38:01 -07:00
Sarah Zakarias ec2d1c9116 Add support for shared fonts in packages. (#12142) 2017-09-19 14:04:51 +02:00
Zachary Anderson 2859a563ce [Fuchsia] Fix view reassemble trigger after hot reload (#12151) 2017-09-18 14:55:20 -07:00
Zachary Anderson 6be32aa757 [Fuchsia] Connect to the VM service using an ssh tunnel (#12100) 2017-09-15 10:58:27 -07:00
Chris Bracken dd7e313317 Migrate to os_log for reading iOS simulator logs (#12079)
1. Migrate simulator device log tailing to os_log toolchain
2. When the log tag (component) is available (iOS 11/Xcode 9), filter to
   the set of log lines with tag 'Flutter'.

As of iOS 11 / Xcode 9, Flutter engine logs are no longer recorded in the
simulator's syslog file, which we previously read using tail -f. Instead
they're now accessible through Apple's new macOS/iOS os_log facility,
via /usr/bin/log, which supports a relatively flexible query language.

When run in non-interactive mode, /usr/bin/log buffers its output in 4k
chunks, which is significantly smaller than what's emitted up to the
point where the observatory/diagnostics port information is logged. As a
workaround we force it to run in interactive mode via the script tool.
2017-09-14 12:28:21 -07:00
Carlo Bernaschina ba36008af6 Add --trace-skia parameter to flutter run (#12070)
* Add --trace-skia parameter to flutter run

Skia tracing is extremely useful for internal debug, but reduces the
amount of space available in the Dart Timeline buffers.
Disable skia tracing by default and expose them via the --trace-skia
flag.

* Roll Engine to 57a1445a45964d386500c39f5e8d06db060abadb
2017-09-13 12:59:05 -07:00
Alexander Aprelev 35c47611b9 Recreate outputFileName completer, handle process launch errors. (#11980)
* Recreate outputFileName completer, handle process launch errors.

* Fix formatting

* Updated comment
2017-09-13 07:33:52 -07:00
Sarah Zakarias e5aead03cc Comments to PR #12032 (#12045) 2017-09-12 12:53:03 +02:00
Sarah Zakarias 0b95e9c278 Support transitive asset dependency (#12032) 2017-09-12 09:13:41 +02:00
Mikkel Nygaard Ravn a1f03977ca Engine artifacts used for snapshots also specified as build inputs (#12014) 2017-09-12 08:35:02 +02:00
gspencergoog 267514346a Remove legacy --plugin option from flutter create (#12020)
Removed the legacy --plugin option from flutter create.  Fixes #11815.
2017-09-11 10:01:07 -07:00
Chris Bracken 8c61116c00 Eliminate iOS log blacklist (#11981)
This was introduced to suppress libMobileGestalt noise originating from
libsystem_asl.dylib. Commit 39680ebfbd
suppresses all application log messages not originating from the
app/engine iteself on iOS 10 and above. Since the log message in
question is only emitted on devices running iOS >= 10.3.0, this
blacklist no longer necessary.
2017-09-07 10:25:41 -07:00
Mikkel Nygaard Ravn 14016523ed Ensure snapshot rebuild logic takes main path into account (#11924) 2017-09-07 14:45:42 +02:00
Chris Bracken 39680ebfbd Suppress non-Flutter log messages in terminal (#11969)
On iOS 10 and above, suppress engine log messages from system components
other than Flutter. This eliminates a large amount of keyboard/plugin
related noise during edit-refresh development.
2017-09-06 19:46:40 -07:00
Mikkel Nygaard Ravn 8303fff8f9 Run pub in interactive mode in flutter packages pub (#11700) 2017-09-06 11:53:39 +02:00
Chris Bracken ce08bf9a21 Log checksum validation errors at trace level (#11944)
Checksum validation is intended only as a performance improvement.
Checksum de-serialization errors (typically framework version mismatch) are
expected on framework updates and shouldn't be user-visible except for
informational purposes when --verbose is set.
2017-09-05 17:03:56 -07:00
Chris Bracken de736f0d43 Update minimum ios-deploy version to 1.9.2 (#11936)
ios-deploy 1.9.2 includes fixes for a common source of Xcode breakage
(flutter/flutter#4326) with Xcode 8.3.3 + iOS 10.3.3, and is required to
to support Xcode 9 (flutter/flutter#11875).
2017-09-05 16:26:36 -07:00
Chris Bracken 93438245f0 Update DevToolsSecurity doctor message (#11935)
Opening Xcode is no longer sufficient to enable develop mode in Xcode 9.
Update the message to run the command-line tool. Alternatively users can
launch an app in the Xcode debugger to do this.
2017-09-05 13:28:13 -07:00
Chris Bracken c896fe2f6e Invalidate snapshot when entrypoint changes (#11913)
Adds the app entrypoint as a key in the checksum file.

This change eliminates the assumption that checksummed files change when
the main entrypoint changes. In the case where there are two
entrypoints, a.dart and b.dart and a.dart imports b.dart and b.dart
imports a.dart, building the app with entrypoint a.dart followed by a
build of the app with entrypoint b.dart would result in the same
files list and checksums, but should invalidate the build.
2017-09-05 11:19:09 -07:00
Alexander Aprelev 59bc0a0fce Move host build check until it's actually used. (#11926)
* Move host build check until it's actually used

* Elaborate diagnostic message
2017-09-05 11:12:15 -07:00
Sarah Zakarias 02c10b78d2 Bundle assets used in packages (#11751) 2017-09-05 09:42:24 +02:00
Alexandre Ardhuin 0783ec906b Enable lints (#11891)
* enable lint prefer_final_fields

* enable lint recursive_getters

* enable lint unnecessary_overrides
2017-09-01 22:18:51 +02:00
Chris Bracken eba6ceb85d Use idevice_id, ideviceinfo for iOS device listing (#11883)
This patch migrates iOS device listing from using Xcode instruments to
using the libimobiledevice tools idevice_id and ideviceinfo.

ideviceinfo was previously incompatible with iOS 11 physical devices;
this has now been fixed.

In 37bb5f1300 flutter_tools migrated from
libimobiledevice-based device listing on iOS to using Xcode instruments
to work around the lack of support for iOS 11. Using instruments entails
several downsides, including a significantly higher performance hit, and
leaking hung DTServiceHub processes in certain cases when a simulator is
running, necessitating workarounds in which we watched for, and cleaned
up leaked DTServiceHub processes. This patch returns reverts the move to
instruments now that it's no longer necessary.
2017-09-01 10:10:49 -07:00
Ian Hickson 2cbc4a0202 Make "pub get" retry once a second when it fails. (#11882) 2017-08-31 19:35:05 -07:00
Alexander Aprelev c5750cd7ea Introduce --preview-dart-2 option to run new frontend compiler in flutter tools. (#11741)
This adds --preview-dart-2 flag that enables use of Dart 2.0 Frontend in Flutter tools.
2017-08-31 13:35:55 -07:00
Zachary Anderson 067048ab64 [fuchsia_reload] Fix port filter (#11828) 2017-08-30 08:35:24 -07:00
Chris Bracken 27d3e8a41f Extract snapshotting logic to Snapshotter class (#11820)
Extract a Snapshotter class that can be shared between FLX snapshotting,
AOT snapshotting, and assembly AOT snapshotting. Allows for better
testability of snapshotting logic.

* Extracts script snapshotting used in FLX build.
* Adds tests for snapshot checksumming, build invalidation/skipping.

Remaining work: disentangle + extract AOT snapshotting and Assembly AOT
snapshotting logic from build_aot.dart.
2017-08-29 10:55:14 -07:00
Michael Goderbauer 5c5e4265a1 Fix command test (#11812) 2017-08-28 23:58:56 -07:00
Michael Goderbauer 8ecf19d8a0 Semantic hit test order for Slivers (#11792)
* Semantic hit test order for Slivers

* ++

* fix double space

* refactoring

* fix test

* comment fix

* tests

* remove accidental debugDumpSemanticsTree

* review comments

* fix button
2017-08-28 15:49:16 -07:00
Chris Bracken 1ee9400130 Avoid rebuilding snapshots if no change to source (#11551) (#11793)
This change re-introduces skipping AOT snapshot builds if input sources
and outputs have not changed since the last snapshot build, assuming a
build for the same platform in the same build mode.

This reverts commit 3d5afb5a81.
It includes the following changes relative to the original:
  1. Include the entrypoint source in the checksums
  2. include the build mode in the checksums
  3. include the target platform in the checksums
2017-08-28 11:45:17 -07:00
Chris Bracken fd54bd4caf Add version, build mode to the snapshot checksums (#11787)
This change ensures that snapshot build checksums used to avoid
duplicate builds are invalidated by a change to framework revision
(in case gen_snapshot is updated), as well as by build mode.

Currently, only FLX snapshotting uses checksums to avoid duplicate
builds. FLX snapshotting is always done with BuildMode.debug, so didn't
include build mode in the checksum file.
2017-08-25 14:32:01 -07:00
Zachary Anderson 631eaa4563 Fix Fuchsia Hot Reload (#11783) 2017-08-25 09:16:24 -07:00
Mikkel Nygaard Ravn 79747f4947 Improve Gradle error output in Flutter commands (#11703) 2017-08-24 10:44:32 +02:00
Michael Thomsen 41378e2032 Break long line in flutter create help output (#11756) 2017-08-23 13:13:26 -07:00
Chris Bracken b4f6e56720 Include main entrypoint in FLX snapshot checksum (#11762)
During FLX snapshotting, changes to (or absence of) any of the following
should trigger re-snapshot:

  1. main() entrypoint source
  2. transitive closure of sources reachable from the entrypoint source
  3. the output snapshot
2017-08-23 12:10:52 -07:00
Chris Bracken dc5d2937bb Suppress libmobilegestalt noise from iOS device logging (#11745)
This patch supports basic filtering of log lines from physical iOS
devices, similar to existing functionality for iOS simulator logging.

This patch also suppresses the following two log messages which are
emitted at app startup on iOS 10.3 devices:
  libMobileGestalt MobileGestaltSupport.m:153: pid 123 (Runner) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
  libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
2017-08-23 10:50:07 -07:00
Jakob Andersen 5d0d6126a1 Add --template=<type> option to create command. (#11105)
Allows the user to specify the kind of project to create. The default is 'app'. Other choices are 'plugin' (the old '--plugin' behavior), and 'package'.

A Flutter 'package' is a Dart package that depends on Flutter, but does not contain native code.

Fixes #10377.
2017-08-23 13:29:31 +02:00
Mikkel Nygaard Ravn 32ab3dbee0 Support Xcode projects with no schemes (#11750) 2017-08-23 11:58:21 +02:00
Mikkel Nygaard Ravn 9496e6dfa7 Support for app flavors in flutter tooling, #11676 retake (#11734) 2017-08-23 10:55:35 +02:00
Mikkel Nygaard Ravn 7c3a45dc6e Revert "Support for app flavors in flutter tooling (#11676)" (#11729)
This reverts commit 8d07d3f652.
2017-08-22 12:24:29 +02:00
Mikkel Nygaard Ravn 8d07d3f652 Support for app flavors in flutter tooling (#11676) 2017-08-22 10:38:23 +02:00
Devon Carew 4d0debd4c7 fix some call sites of printError (#11724)
* fix some call sites of printError

* review comments
2017-08-21 23:38:16 -07:00
Jacob Richman 5462ddb917 Bare bones widget inspector support. (#10332)
Bare bones widget inspector support.

Toggle the widget inspector from the flutter tool by pressing 'i'.
When the widget inspector is select mode:
Pointer down to to inspect a widget.
Pointer click to finalize selection of a widget. You can now interact
with the application as you normally would but with the inspected widget
highlighted.
Click the inspect icon in bottom left corner of screen to reactivate
select mode.
2017-08-21 16:17:54 -07:00
Ian Hickson 0799ff5b6c Revert "Revert "Rollback patch that broke microbenchmarks" (#11641)" (#11645)
This reverts commit 1705bf3c73.
2017-08-16 14:59:01 -07:00
Ian Hickson 1705bf3c73 Revert "Rollback patch that broke microbenchmarks" (#11641)
* Revert "Fix a typo in the saved certificate error message (#11640)"

This reverts commit bfda885a9d.

* Revert "Rollback patch that broke microbenchmarks (#11616)"

This reverts commit 70fe6f4c23.
2017-08-16 14:46:50 -07:00
xster bfda885a9d Fix a typo in the saved certificate error message (#11640) 2017-08-16 13:59:05 -07:00
Ian Hickson 70fe6f4c23 Rollback patch that broke microbenchmarks (#11616)
* Revert "Extract snapshotting logic to Snapshotter class (#11591)"

This reverts commit 309a2d78fb.

* Revert "Minor whitespace formatting fix (#11590)"

This reverts commit bf69c3c69b.

* Revert "Avoid rebuilding snapshots if no change to source (#11551)"

This reverts commit 74835db563.
2017-08-15 17:53:58 -07:00
Dan Rubel 3a31c35ba0 Rename .analysis_options to analysis_options.yaml (#11594) 2017-08-15 08:46:42 -04:00
Chris Bracken 309a2d78fb Extract snapshotting logic to Snapshotter class (#11591)
First step in eliminating code duplication between script snapshotting
(in FLX build) and AOT, assembly AOT snapshotting.
2017-08-11 12:58:35 -07:00
Hans Muller 680d581db7 Correct handling of assets when no main asset is present (#11564) 2017-08-09 16:04:57 -07:00
Jason Simmons 13dda7cf80 Signal an error in the dependency checker if an import URI is invalid (#11557)
Fixes https://github.com/flutter/flutter/issues/11539
2017-08-09 10:08:11 -07:00
Alexandre Ardhuin 8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Chris Bracken 74835db563 Avoid rebuilding snapshots if no change to source (#11551)
This change re-introduces skipping snapshot builds if input sources (and
outputs) have not changed since the last snapshot build, with a bugfix
to include the entry-point source in the checksum used to check whether
rebuild can be skipped. This ensures that the following sequence
invalidates the cached build, resulting in two snapshot builds:

  flutter build ios lib/foo.dart
  flutter build ios lib/bar.dart

This reverts commit 3d5afb5a81.
2017-08-08 10:52:24 -07:00
Yegor bbc15724bd roll engine ff50334587 to get async stacks (#11519) 2017-08-07 10:03:09 -07:00
Jason Simmons a5c4680e72 Reset the terminal if an exception occurs while handling terminal input in the app runner (#11516) 2017-08-04 14:27:36 -07:00
Jason Simmons ffe5851eb7 Do not throw if a hot reload is attempted when all Flutter instances on the device have been stopped (#11504)
This can happen if an Android host app has been paused but its process is still running
2017-08-03 13:09:10 -07:00
Devon Carew 8ee902c04b rev the min. recommended flutter plugin version (#11501) 2017-08-03 10:21:35 -07:00
Ian Hickson 3d5afb5a81 Revert "Skip AOT snapshot build if inputs are unchanged" (#11463)
* Revert "Support space- and backslash-escaped dependencies (#11090)"

This reverts commit e6bafd0bdb.

* Revert "Skip AOT snapshot build if inputs are unchanged (#11084)"

This reverts commit b5e522e200.
2017-08-01 16:46:24 -07:00
Devon Carew a7c3bf4849 perform the initial poll for devices quicker (#11356)
* perform the initial poll for devices quicker

* add a Poller class

* test the new Poller class
2017-08-01 15:29:54 -07:00
Alexey Shamrin cfcf6d4428 brew update is not needed any more: Homebrew/brew#679 (#11406) 2017-08-01 12:21:56 -07:00
Jason Simmons 22ccb74ef5 Check all possible output directories to find a locally built gen_snapshot (#11417)
The output location of gen_snapshot differs based on the engine's target
platform, and we don't know the target platform when building a
platform-independent FLX in JIT mode.
2017-07-27 14:22:21 -07:00
Devon Carew 990dae85eb remove the flutter view cache; fix the ability to quit the app after a full restart (#11420)
* remove the flutter view cache; fix the ability to quit the app after a full restart

* improve test

* update test
2017-07-27 11:47:33 -07:00
Devon Carew a92a62706c ignore PausePostRequest when reloading (#11340)
* ignore postpauseevents when reloading

* Update run_hot.dart

comment changes to kick the appveyor bot
2017-07-21 16:57:33 -07:00
Ian Hickson 48427cb77a Revert "Flutter analyze watch improvements (#11143)" (#11328)
This reverts commit e13e7806e3.

Turns out that with this patch, we aren't actually catching all
errors. For example, `flutter analyze --flutter-repo --watch` didn't
report errors in `dev/devicelab/test/adb_test.dart`.
2017-07-20 14:47:36 -07:00
Carlo Bernaschina e890ec5bb6 Fix 'reloadSources' service from Observatory (#11315)
Fixes https://github.com/flutter/flutter/issues/11314
2017-07-19 18:37:54 -07:00
Carlo Bernaschina 741598d848 Fix restart/reload benchmark synchronization (#11282)
Changes introduced in
8ba522eeae
has removed from the `_flutter.listViews` the thread synchronization
side effect used during benchmarks.

The thread synchronization is restored via the new
`_flutter.flushUIThreadTasks` RPC.

Fixes https://github.com/flutter/flutter/issues/11241

Related https://github.com/flutter/engine/pull/3898
2017-07-19 16:54:10 -07:00
Ian Hickson e1adc525d8 Option to enable the performance overlay from 'flutter run'. (#11288) 2017-07-19 12:57:22 -07:00
Dan Rubel e13e7806e3 Flutter analyze watch improvements (#11143)
* flutter analyze --watch auto detect if in flutter repo
* move isFlutterLibrary from AnalyzeOnce into AnalyzeBase for use by AnalyzeContinuously
* pass --flutter-repo to analysis server when analyzing the flutter repository
* enhance flutter analyze --watch to summarize public members lacking documentation
2017-07-19 07:22:38 -04:00
Devon Carew c186d0df1c pass the value of the android sdk (#11268)
* pass the value of the android sdk

* swap flag

* allow the user to set the android-sdk location
2017-07-18 18:47:20 -07:00
Carlo Bernaschina 16037e33ec Register tools as a reloadSources service (#11258)
In
df8bf384eb
a new functionality of the Dart VM Service Protocol has been introduced.

Clients connected to the Service Protocol are now able to expose
services that other clients (e.g. Observatory) can invoke through the
Service Protocol itself.

With these changes Flutter Tools register them self as a `reloadSources`
(a.k.a. HotReload) capable client.
Observatory is already listening for the clients which expose this
functionality and uses by default the service based version of
`reloadSources` when available, so requesting a HotReload from
Observatory will trigger the full Flutter HotReload.

Related https://github.com/dart-lang/sdk/issues/30023
Related https://github.com/flutter/flutter/pull/11229
Related https://github.com/flutter/flutter/pull/11256
2017-07-17 15:13:24 -07:00
Ryan Macnak 1650420db5 Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11263)
Roll engine to 03e642bc8940441bbad5c2fb7d3ca868c1fdad54.
2017-07-17 14:56:27 -07:00
Ryan Macnak fce76bcfd6 Revert "Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11251)" (#11259)
This reverts commit 3f514fcfdf.
2017-07-17 13:47:03 -07:00
Carlo Bernaschina 16ae29b56d Revert "Register tools as a reloadSources service (#11229)" (#11256)
This reverts commit 35c4989795.
2017-07-17 13:05:16 -07:00
Carlo Bernaschina 35c4989795 Register tools as a reloadSources service (#11229)
* Register tools as a reloadSources service

* Fix code style and comments

* Fix nits and Add documentation

* Format error message
2017-07-17 12:31:43 -07:00
Ryan Macnak 3f514fcfdf Update --local-engine to account for changed host architecture of 32-bit Android debug builds. (#11251)
Roll engine to 7480e32854606e554ae37f8bd241c050bdc565c4.
2017-07-17 12:20:14 -07:00
Todd Volkert b7ababe68c Remove unused DevFsProgressReporter (#11249)
Discovered dead code during review of #10791
2017-07-17 09:30:56 -07:00
Siva Chandra 28d09d1614 Fix style issues introduced by dba29aa0fc (#11203) 2017-07-14 13:51:16 -07:00
Phil Quitslund 05562d5734 Quiet debug test runner output when in machine mode. (#11228)
* Quiet debug test runner output when in machine mode.

See: https://github.com/flutter/flutter-intellij/issues/1176

* json => machine
2017-07-14 11:20:50 -07:00
Chris Bracken cf96c7db4a Clean up orphaned Instruments processes (#11189)
In some cases, we've seen interactions between Instruments and the iOS
simulator that cause hung instruments and DTServiceHub processes. If
enough instances pile up, the host machine eventually becomes
unresponsive.

Until the underlying issue is resolved, manually kill any orphaned
instances (where the parent process has died and PPID is 1) before
launching another instruments run.
2017-07-13 16:19:11 -07:00
Devon Carew bde8a5f5a6 move away froma deprecated method (#11215) 2017-07-13 16:18:40 -07:00
Jason Simmons 14648e9bae Suppress an analyzer warning about cli_util.getSdkDir deprecation (#11213) 2017-07-13 15:48:11 -07:00
xster 92750833d5 Stop sending cocoapods stats (#11120)
* Disable cocoapods stats

* Add a comment for code readers

* fix new test
2017-07-12 19:15:54 -07:00
xster 6a49419be4 Create Podfile dynamically part 1 (#11101)
* start

* with create

* refactor cocoapod code, add tests

* fix tests

* throw when cocoapod missing

* obj-c projects don’t use use_framework!
2017-07-12 18:35:08 -07:00
Chris Bracken 0adb39ae9b Avoid concurrent device polling in daemon; add timeout (#11184)
Apply a 30 second timeout to Android/iOS device polling.

If there's a device poll already in progress, skip polling for new
devices; wait for the first request to return/timeout.
2017-07-12 17:57:15 -07:00
Michael Goderbauer ae90581124 Fix build (#11186)
Was broken by dba29aa0fc, which apprently has been pushed directly to master without running through Travis?
2017-07-12 17:24:38 -07:00
Siva Chandra dba29aa0fc Select the correct conditional import when building dart dependencies.
Fixes #9413.

For more info on conditional imports, see
https://github.com/munificent/dep-interface-libraries/blob/master/Proposal.md.
2017-07-12 16:30:14 -07:00
Michael Goderbauer 561e7773c2 Fix path to flutter_tester when using local enginde on Mac OS (#11134) 2017-07-10 12:34:04 -07:00
Todd Volkert 926a096efd Minor fixes in tools: (#11009)
* Include the process' `stdout` and `stderr` when it returns a
  non-zero exit code in `runCheckedAsync()`
* Defensively catch errors in `AndroidDevice.isAppInstalled()`
  and return false
2017-07-10 10:02:11 -07:00
Devon Carew 0ac2232eda normalize the reload result messages (#11131) 2017-07-10 09:53:14 -07:00
Seth Ladd 834fbcb867 Run target analytics (#10902)
* report run target and if it is an emulator

* don't print debug

* rename parameter, remove unused variable

* fix test

* fix comment

* tweak from review, and fix analyzer error

* send custom parameters for the event, not the session

* fix mock

* use the +1 for usage
2017-07-10 06:45:41 -10:00
Devon Carew 4891506931 add a --machine mode to flutter config (#11112)
* add a --machine mode to flutter config

* review feedback
2017-07-07 16:00:45 -07:00
Devon Carew 40a65e1fe5 minor tweaks to the output for flutter_tools (#11115)
* minor tweaks to the output for flutter_tools

* update test expectations
2017-07-07 16:00:27 -07:00
Chris Bracken e6bafd0bdb Support space- and backslash-escaped dependencies (#11090)
Snapshot dependency files now backslash-escape dependency paths
containing spaces and backslashes.

See: https://codereview.chromium.org/2966903003/
2017-07-05 16:36:12 -07:00
Chris Bracken b5e522e200 Skip AOT snapshot build if inputs are unchanged (#11084)
Previously, the snapshot file was recomputed on every build. We now
record checksums for all snapshot inputs (which are catalogued in the
snapshot dependencies file output alongside the snapshot) and only
rebuild if the checksum for any input file (or the previous output file) has
changed.
2017-07-05 12:49:29 -07:00
Michael Goderbauer 678c31f14c Fail doctor check "Flutter" if sub-check fails (#11087)
See https://github.com/flutter/flutter/issues/11051
2017-07-05 12:11:02 -07:00
Ian Hickson 5f20f83415 Always run the flutter tool in checked mode. (#11069)
(Needs https://github.com/dart-lang/sdk/issues/28519)
2017-07-02 09:34:31 -07:00
Chris Bracken 1438ae85a3 Skip snapshot build if inputs are unchanged (#11047)
Previously, the snapshot file was recomputed on every build. We now
record checksums for all snapshot inputs (which are catalogued in the
snapshot dependencies file output alongside the snapshot) and only
rebuild if the checksum for any input file has changed.
2017-06-30 16:09:48 -07:00
Todd Volkert f02e9acc33 Add known physical device that would otherwise look like an emulator (#11056)
https://github.com/flutter/flutter/issues/10203
2017-06-30 13:48:24 -07:00
Chris Bracken c1c1522591 Make _createSnapshot private, depfilePath required (#11054)
* Only one call to createSnapshot exists, and it's in the same library.

* Eliminate conditional logic around the presence of depfilePath, the
  only existing call always passes a non-null depfilePath.
2017-06-30 12:48:12 -07:00
xster c1e3b75cc2 Verbose cocoapods output if error or flutter is verbose (#11048)
* Output verbose cocoapods output when pod install has an error or if flutter build/run is in -v

* remove repeated stdout
2017-06-30 11:17:48 -07:00
Brian Slesinsky 6841ab22be Add --name and --plain-name to 'flutter test' (#11020)
This adds a way to run only a subset of the tests.
(The new flags do the same thing as 'pub run test'.)
2017-06-29 17:26:19 -07:00
Devon Carew 94e14f0c5a increase the timeout for service discovery (#10965)
* increase the timeout for service discovery

* remove the timeout for discovering service ports
2017-06-29 14:35:20 -07:00
xster be228eae78 Add a dev mode doctor check (#11023) 2017-06-29 11:54:18 -07:00
Mikkel Nygaard Ravn 021a9ee2a2 Fix bug in prev commit (#11030) 2017-06-29 12:19:45 +02:00
Mikkel Nygaard Ravn 030abfd49a Provide user feedback on slow Gradle operations (#11015) 2017-06-29 11:54:03 +02:00
Mikkel Nygaard Ravn a106f504c7 Make flutter drive await app reinstall (#11029) 2017-06-29 11:23:27 +02:00
Mikkel Nygaard Ravn 1731a16d81 Make consistent use of gradle wrapper (#10993) 2017-06-29 09:48:01 +02:00
xster 57746f38c0 Guess sign iOS with the first certificate when running in machine mode (#10870)
* Guess sign with the first certificate when multiple are available in machine mode

* review
2017-06-28 13:33:14 -07:00
Chris Bracken a41e354a55 Emit CocoaPods output if pod install fails (#11018)
In the case where the CocoaPods 'pod install' step fails, emit its
stdout to provide any potentially-useful error messages to the user.
2017-06-28 11:58:06 -07:00
Chris Bracken e04907a48b Ensure Xcode major, minor version always return non-null (#10980)
Previously, xcodeMajorVersion and xcodeMinorVersion returned null unless
xcodeVersionSatisfactory had been called first. We now compute them on
demand, and cache the resultant values.
2017-06-26 13:37:59 -07:00
Mikkel Nygaard Ravn c5999c74c0 Add gradle wrapper to project template (#10928) 2017-06-26 12:47:43 +02:00
Devon Carew f946171817 update our build bot exclusions (#10964) 2017-06-25 21:17:39 -07:00
Chris Bracken 2ebb9e5dc6 Use ProcessManager for Xcode tool invocations (#10955)
1. Run all Xcode tool invocations through ProcessManager, which allows
us to mock out failures, etc. for tests.

2. Add said tests.
2017-06-23 18:50:27 -07:00
Ian Hickson d131a8df42 Fix --keep-app-running default and make devicelab verboser (#10957) 2017-06-23 18:09:37 -07:00
Chris Bracken 845c1b7f01 Re-land Lazily initialise Xcode installation status (#10952)
This reverts commit 3e265e9e42.

Rather than pre-compute Xcode install path, version, and EULA status,
compute and cache on demand.
2017-06-23 16:58:14 -07:00
Chris Bracken 3e265e9e42 Revert "Lazily initialise Xcode installation status (#10945)" (#10951)
This reverts commit bb8e2a7ccd.

Triggers a doctor failure on the Mac chromebots.
2017-06-23 16:08:36 -07:00
Chris Bracken bb8e2a7ccd Lazily initialise Xcode installation status (#10945)
Rather than pre-compute Xcode install path, version, and EULA status,
compute and cache on demand.
2017-06-23 15:56:44 -07:00
Ian Hickson 9adb4a78a6 Deep linking: automatically push the route hiearchy on load. (#10894)
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.

As part of doing that, I:

 * Changed the default for MaterialApp.initialRoute to honor the
   actual initial route.

 * Added a MaterialApp.onUnknownRoute for handling bad routes.

 * Added a feature to flutter_driver that allows the host test script
   and the device test app to communicate.

 * Added a test to make sure `flutter drive --route` works.
   (Hopefully that will also prove `flutter run --route` works, though
   this isn't testing the `flutter` tool's side of that. My main
   concern is over whether the engine side works.)

 * Fixed `flutter drive` to output the right target file name.

 * Changed how the stocks app represents its data, so that we can
   show a page for a stock before we know if it exists.

 * Made it possible to show a stock page that doesn't exist. It shows
   a progress indicator if we're loading the data, or else shows a
   message saying it doesn't exist.

 * Changed the pathing structure of routes in stocks to work more
   sanely.

 * Made search in the stocks app actually work (before it only worked
   if we happened to accidentally trigger a rebuild). Added a test.

 * Replaced some custom code in the stocks app with a BackButton.

 * Added a "color" feature to BackButton to support the stocks use case.

 * Spaced out the ErrorWidget text a bit more.

 * Added `RouteSettings.copyWith`, which I ended up not using.

 * Improved the error messages around routing.

While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
2017-06-23 14:58:29 -07:00
Todd Volkert f18083d448 Print ADB output when adb install fails (#10933)
Fixes #10929
2017-06-23 14:08:07 -07:00
Chris Bracken f4f81e9ac7 Require Xcode >= 8.0 for iOS development (#10932)
This allows us to take advantage of improved command-line tooling (e.g.,
improvements in device listing in Instruments). Now that the engine is
built with Xcode 8 and the framework is tested against Xcode 8, this
reduces the set of configurations we need to support to allow us to
focus on the supported ones: Xcode 8 and Xcode 9.
2017-06-23 14:07:01 -07:00
Chris Bracken 9a6a3e1e27 Delete unnecessary print statement (#10937)
This print statement provides no value to the user.
2017-06-23 14:06:10 -07:00
Zachary Anderson 09bdab201d [fuchsia_reload] Use ssh instead of netcp/netruncmd (#10436) 2017-06-22 22:08:20 -07:00
Hans Muller b55441a027 Do not require main asset files if variants are provided (#10901) 2017-06-22 16:45:57 -07:00
Zachary Anderson 4d490666b3 Clean up pre-existing DevFS during creation (#10843) 2017-06-22 09:48:31 -07:00
xster 02245234b6 Save development certificate choice (#10849) 2017-06-21 17:22:13 -07:00
Devon Carew 963b90edf0 send the FLUTTER_HOST env var as analytics' app installer ID (#10889) 2017-06-21 13:02:40 -07:00
Seth Ladd b231006ce7 analytics expects a format of cd<integer> for custom dimensions (#10864) 2017-06-21 10:54:37 -07:00
Brian Slesinsky f01e9418fc change --machine flag for flutter test to report test progress as JSON (#10848)
(The Flutter plugin will use this to update the UI with test progress.)
2017-06-20 14:40:42 -07:00
Jason Simmons 1be406b1b5 Move the discovered Java installation to the front of PATH when running sdkmanager (#10846)
Fixes https://github.com/flutter/flutter/issues/10703
2017-06-20 09:53:01 -07:00
Seth Ladd b471a9cffc send channel name as a custom dimension (#10814)
* send channel name as a custom dimension

* tweaks from review

* remove unused import
2017-06-20 08:20:57 -07:00
Devon Carew c14470e0c7 dont' validate against webstorm (#10828) 2017-06-20 06:46:43 -07:00
Chris Bracken 400a62d121 Eliminate use of ideviceinfo in flutter_tools (#10804)
This libimobiledevice tool is no longer used anywhere in the flutter_tools codebase.
2017-06-19 13:36:05 -07:00
Chris Bracken 1d9f009579 Re-enable use of instruments for iOS device lookup (#10838)
This reverts commit b2909a245a.

This resubmits the following patches:

1. Use Xcode instruments to list devices (#10801)
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.

2. Make device discovery asynchronous (#10803)
Migrates DeviceDiscovery.devices and all device-specific lookup to be
asynchronous.
2017-06-19 13:14:57 -07:00
Jason Simmons cfa0a2dbbd Look for APKs at the path used by Android Gradle plugin 3.0 (#10798)
Fixes https://github.com/flutter/flutter/issues/10630
2017-06-19 09:37:39 -07:00
Luke Church 4b707c194f Change for consideration: URL for plugin text (#10720) 2017-06-18 21:18:36 +02:00
Chris Bracken b2909a245a Revert use of Xcode instruments for device lookup (#10806)
* Revert "Make device discovery asynchronous (#10803)"
This reverts commit 972be9c8b4.

* Revert "Use Xcode instruments to list devices (#10801)"
This reverts commit 37bb5f1300.

This is to resolve a failure that looks related to a bad install of Xcode 8.0
on our build bots and should be reinstated when the infra issue is diagnosed
and resolved.

Instruments worked well when this was originally landed, and on the
following commit, but started failing two commits after this originally
landed. Manual invocation of instruments on the build host currently
results in:

```
dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore
  Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments
  Reason: image not found
Abort trap: 6
```

It appears the /Applications/Xcode8.0.app/Contents/Applications
directory (which contains Instruments) is missing on the host.
2017-06-16 19:00:31 -07:00
Chris Bracken 972be9c8b4 Make device discovery asynchronous (#10803)
Migrates DeviceDiscovery.devices and all device-specific lookup to be
asynchronous.
2017-06-16 17:47:06 -07:00
Chris Bracken 37bb5f1300 Use Xcode instruments to list devices (#10801)
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.
2017-06-16 16:02:28 -07:00
Chris Bracken 66502138af Extract all libimobiledevice invocations to IMobileDevice class (#10793)
Moves all remaining calls to tools that are part of the libimobiledevice
suite of tools to the IMobileDevice class. This allows for better
tracking of this dependency, and easier mocking in tests.
2017-06-16 14:33:49 -07:00
xster 03393510ba address comments (#10786) 2017-06-16 14:22:10 -07:00
Yegor 3b6d84b083 modernize iOS device lookup in driver (#10780) 2017-06-16 12:58:23 -07:00
Chris Bracken b474557ef4 Eliminate unnecessary public getters for iOS tools (#10784)
None of these is used outside of devices.dart and being public covers up
analysis warnings when they're unused.
2017-06-16 11:20:23 -07:00
Chris Bracken 73df49a0d9 Eliminate unused libimobiledevice tool refs (#10778) 2017-06-16 10:42:07 -07:00
Chris Bracken bcac3166ab Eliminate direct invocations of idevice_id for iOS (#10777)
All invocations should go via the IMobileDevice class in mac.dart.
2017-06-16 10:41:48 -07:00
Chris Bracken c04f712a23 Refactor Xcode instance lookup (#10763)
Use a top-level getter in mac.dart rather than a static instance getter
and a top-level getter in ios_workflow.dart. Makes this code consistent
with how we do context lookups elsewhere.
2017-06-15 19:24:07 -07:00
Chris Bracken d6ec71d2c0 Extract libimobiledevice tools interface (#10759)
Extract out IMobileDevice class, move class to idevice_id, ideviceinfo
(and eventually other libimobiledevice tools such as iproxy) behind this
interface.

Add tests for the case where libimobiledevice is not installed, the case
where it returns no devices, and the case where it returns device IDs.
2017-06-15 19:03:24 -07:00
xster 45446ae21b first round of future awaits (#10760) 2017-06-15 18:49:19 -07:00
xster e56c8850ce Fix simctl race (#10757)
* remove usages of booted

* fix
2017-06-15 18:31:10 -07:00
xster 432ffde52e remove usages of booted (#10741) 2017-06-15 18:25:09 -07:00
Chris Bracken 615410d2d2 Inject iOS, Android workflows via context (#10750)
Eliminates the need for the device/daemon code to get at the iOS/Android
tooling indirectly via Doctor. In tests, we now inject the workflow
objects (or mocks) directly.
2017-06-15 16:11:08 -07:00
Brian Slesinsky d1feb1ad5f Coverage: fix installHook API (#10747)
- remove unused collector parameter
- clarify a comment
- inline _currentPackageTestDir
2017-06-15 14:39:46 -07:00
Chris Bracken 1bc54e0657 Eliminate dead iOS device mock code (#10732)
This code is unused in any test. In upcoming changes that migrate to
Xcode instruments based device listing, we'll mock out the instruments
output separately.
2017-06-15 11:32:39 -07:00
Todd Volkert 747e25e891 Fix devfs directory scanning to not attempt to scan non-existent directories (#10727) 2017-06-15 10:29:42 -07:00
Dan Rubel befe019896 flutter analyze --watch --flutter-repo check package conflicts (#10641) 2017-06-13 20:50:53 -04:00
Brian Slesinsky e329356f0f Oops, fix code coverage (#10672)
And add comments explaining why.
2017-06-13 14:42:09 -07:00
Brian Slesinsky 3528cd6f2d flutter test: add --machine flag (#10520)
Currently this just prints the observatory URL as a JSON event.
Refactored the code to make this fit in.
2017-06-13 13:26:32 -07:00
Todd Volkert 37e32d5aee Switch flutter --version --json to be flutter --version --machine (#10627) 2017-06-12 12:23:13 -07:00
Ian Hickson 0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Phil Quitslund 95544383ef Bump to Dart SDK 1.24.0-dev.6.7. (#10585)
* Bump to Dart SDK 1.24.0-dev.6.7.

* nits and fixes
2017-06-08 15:15:18 -07:00
xster c2b0a30c57 Add more instructions and handling for first time iOS run (#10521)
* Before tests

* Add the part to trust the cert on the device

* flip the error checks since some are more specific and are more actionable

* add tests

* review
2017-06-07 15:56:13 -07:00
Todd Volkert e9c7f604e9 Make generated Java folder names match package names. (#10537) 2017-06-07 13:16:16 -07:00
Kevin Moore 1b56cb790c Add --version-json to flutter CLI (#10538)
closes https://github.com/flutter/flutter/issues/10534
2017-06-06 18:40:32 -07:00
Todd Volkert 078b380d51 Remove underscores from Android identifier during flutter create (#10506)
Fixes #10077
2017-06-05 11:25:46 -07:00
Chris Bracken d65b9fb6dc Update tracking bug for SDK spaces in doctor (#10504) 2017-06-05 09:42:45 -07:00
Chris Bracken fe520201b8 Emit doctor error if Flutter SDK path contains spaces (#10477)
Should be reverted when https://github.com/flutter/flutter/issues/6577
is fixed.
2017-06-02 18:49:32 -07:00
xster cb959724cb Small setup doc for the app store option (#10418)
* Small setup doc for the app store option

* review notes
2017-06-02 16:01:20 -07:00
Devon Carew 38891a2f72 IntelliJ and Flutter plugin version checks (#10454)
* add min version checks for IntelliJ

* validate the installed versions of IntelliJ and the flutter plugin

* review comments
2017-06-02 15:23:36 -07:00
Devon Carew 15928fbdf7 have app loggers log to their parent logger (#10402)
* have app loggers log to their parent logger

* rename field to parent

* add todo

* revert flutter_tools.iml change

* ping the bots
2017-06-02 15:22:46 -07:00
Gary Qian a367dcb02c Add flags to pass '--enable-software-rendering' flag to engine in run command (#10449) 2017-06-02 09:44:36 -07:00
Chris Bracken 9c502cba95 Clean up ideviceinstaller doctor messages (#10408)
Eliminates nearly-duplicate install instructions for libimobiledevice,
ideviceinstaller.

Since ideviceinstaller depends on libimobiledevice, it's almost certain
that if libimobiledevice isn't installed, or needs updating, so does
ideviceinstaller.
2017-05-31 12:08:45 -07:00
Chris Bracken 479e533b01 Clarify libimobiledevice doctor check message (#10406)
This message will be emitted both when libimobiledevice requires
updating, or when it has not yet been installed.

It's also not specifically the version of Xcode that it's incompatible
with, it's the lockdownd daemon, which is actually more closely tied to
iTunes.
2017-05-31 11:32:26 -07:00
Hans Muller f68c6fb814 Fix package_test flakiness, init ensure terminal context entry is set (#10333) 2017-05-25 16:35:38 -07:00
Mikkel Nygaard Ravn 251d83a4b5 Add org option to flutter create (#10290) 2017-05-24 16:19:16 +02:00
Mikkel Nygaard Ravn 10f6483003 Add Swift and Kotlin templates (#10259) 2017-05-24 08:22:50 +02:00
xster 04aeef84db Let iOS flutter run auto-sign default to first profile (#10181)
* Let run default to first profile

* fix

* review notes
2017-05-23 18:05:47 -07:00
Chris Bracken 49cec4593a Apply minor formatting fixes (#10261) 2017-05-22 17:08:49 -07:00
Chris Bracken dd1456ffbc Make most ios_workflow host tool calls async (#10260)
Does not yet migrate hasIdeviceId since that results in a cascade of
breaking interface changes that's significant enough for a separate
patch.
2017-05-22 16:09:48 -07:00
Michael Goderbauer 9a908f7558 Revert "Partial rollback of #10204" (#10258)
* Revert "Test installation status when ideviceid is not installed (#10254)"

This reverts commit 0e5d4a8771.

* Revert "Partial rollback of #10204 (#10256)"

This reverts commit b291bf5d6a.
2017-05-22 16:06:22 -07:00
Chris Bracken 0e5d4a8771 Test installation status when ideviceid is not installed (#10254)
Ensure that flutter doctor returns a partial installation status when
ideviceid is not installed.
2017-05-22 14:09:37 -07:00
Michael Goderbauer b291bf5d6a Partial rollback of #10204 (#10256)
This broke Fuchsia as they haven't updated to Dart 1.24 yet :(
2017-05-22 13:28:59 -07:00
Todd Volkert aa9c782693 Add initial list of known Android hardware (#10249)
Our emulator detection was based on a simple heuristic that was
failing for the Samsung Galaxy S8. Any heuristic is flawed since
Android devices can report whatever they want to adb, but this
change attempts to tighten the detection by listing known models
(by their ro.hardware property). Again, these values could be
spoofed by emulator system images, but it's less likely to be
an issue than with our previous (and fall-back) heuristic.

Fixes #10203
Related: #10248
2017-05-22 10:47:02 -07:00
Michael Goderbauer d33fd923bf Print locale in flutter doctor (#10204)
This helps to debug encoding issues that are believed to only happen for certain locales (see https://github.com/flutter/flutter/issues/10198 fo example).

DO NOT SUBMIT until Dart SDK has been bumped (https://github.com/flutter/flutter/pull/10110) as this depends on new API.
2017-05-22 10:21:10 -07:00
Alexander Aprelev 5b1e972948 Filter out '\n' from terminal input. (#10220)
* Remove '\n' from terminal input.

* Use trim instead of replaceAll

* Add unit test

* Cleanup the test

* Fixed lint

* Style adjustments

* Forgotten @override

* Revert "Forgotten @override"

Accidently added extra files.

This reverts commit 0aba24fc8e.

* Just @override change
2017-05-21 15:15:44 -07:00
Todd Volkert a88379399e Don't fail assert when we send an error to the plugin. (#10207) 2017-05-19 12:34:41 -07:00
Ian Hickson 77d67c9d30 fix flutter analyze --dartdocs (#10182) 2017-05-19 08:46:34 -07:00
Michael Goderbauer fdbb1fbbc7 Add a note about how to edit platform code in IDE to flutter create --plugin (#10189) 2017-05-18 18:18:51 -07:00
xster 9d3fb1f309 Auto provision iOS deploy 2/3 - prompt user to choose a certificate (#10025)
* first pass

* improvements

* extract terminal.dart

* rebase

* add default terminal to context

* The analyzer wants the ../ imports in front of the ./ imports

* review notes
2017-05-18 11:26:43 -07:00
Ian Hickson 73dcca65f7 Nits for protocol discovery (#10112)
Rather than complain about these in a code review I figured I'd just fix them. :-)
2017-05-16 11:38:07 -07:00
Todd Volkert 10decc7c19 Fix race condition in protocol_discovery.dart (#10092)
For some reaosn, when we discovered our URI, we were re-instantiating
the `Completer` instance variable whose future we listen to in `nextUri()`.
This led to a race between a caller calling `nextUri()` and us discovering
the URI. If we happened to discover our URI before a caller called
`nextUri()`, then they would be left waiting on a future from the newly
allocated `Completer` (which would never complete).

Fixes #10064
2017-05-16 08:25:51 -07:00
xster b232a84b0d Auto provision iOS deploy 1/3 - find and use the first valid code signing certs (#9946)
* blind wrote everything except the user prompt

* works

* Add some logical refinements

* Make certificates unique and add more instructinos

* print more info

* Add test

* use string is empty

* review notes

* some formatting around commands

* add a newline
2017-05-15 12:54:32 -07:00
Ian Hickson db84df230d Some tools to dump other trees. (#9999) 2017-05-12 15:51:58 -07:00
Ian Hickson 292abf7223 "flutter packages pub ..." to passthrough to dart pub (#10044) 2017-05-12 15:40:35 -07:00
Ian Hickson 18eac03d76 VerboseLogger should just wrap the parent Logger (#10020)
This way, you can test things even with a VerboseLogger.
2017-05-12 10:00:11 -07:00
Devon Carew 2f737cf94e change a printStatus() to a printTrace() (#9992) 2017-05-11 08:49:26 -07:00
Ian Hickson dddf572780 Minor tweaks to flutter doctor (#9963) 2017-05-10 16:28:12 -07:00
Todd Volkert ff7d9432b8 Allow for different adb server version messages in device detection (#9974) 2017-05-10 15:51:08 -07:00
Jason Simmons d1fa21166b Use runCommand to start sdkmanager and adjust the executable name for Windows (#9962)
Fixes https://github.com/flutter/flutter/issues/9954
2017-05-10 12:42:42 -07:00
Jason Simmons d780c4b205 Revert "Gracefully handle !isValid in AndroidStudio.gradleExecutable (#9893)" (#9934)
Fixes https://github.com/flutter/flutter/issues/9929
2017-05-09 13:11:29 -07:00
Todd Volkert a667bf935e Gracefully handle !isValid in AndroidStudio.gradleExecutable (#9893)
Fixes #9866
2017-05-09 10:54:54 -07:00
Jason Simmons f44ba8b9c9 Add a flutter doctor --android-licenses command that locates and runs the Android SDK license manager (#9892)
See https://github.com/flutter/flutter/issues/8438
2017-05-09 10:18:45 -07:00
Mikkel Nygaard Ravn 76dbfe9a38 Fixed android template (#9917) 2017-05-09 14:41:39 +02:00
Mikkel Nygaard Ravn c1feee93d3 iOS plugin registry (#9818) 2017-05-09 12:00:07 +02:00
Mikkel Nygaard Ravn 24a3e58cd0 Android plugin registry (#9715) 2017-05-09 11:43:19 +02:00
Michael Goderbauer ca4d7211b0 Enforce valid package names on flutter create (#9854)
* Enforce valid package names on flutter create

Fixes #9564

* refactor

* fix other tests
2017-05-08 14:08:59 -07:00
Yegor fa47c34f76 fix version stamp Map check (#9890) 2017-05-08 12:59:33 -07:00
Todd Volkert a29585298e Add level field to the "showMessage" daemon event. (#9889)
Spawned from a discussion in https://github.com/flutter/flutter-intellij/pull/1003
2017-05-08 11:49:47 -07:00
xster 31b958378a Report flutter doctor success/failure (#9664)
* record doctor failures

* fully mock out analytics dependencies
2017-05-08 11:10:36 -07:00
xster c74225e00d Report timing on failed executions too (#9661)
* handle errors

* review notes
2017-05-08 11:10:21 -07:00
Michael Goderbauer 6337a0553c Don't crash on flutter create . on Windows (#9850)
* Don't crash on `flutter create .`

Fixes #9828

* review comments
2017-05-05 15:47:13 -07:00
Todd Volkert 2841497344 Support IPv6 in coverage collection (#9841)
Builds on engine fixes to #9813

Also fixes #7366
2017-05-05 11:09:55 -07:00
Jakob Andersen 6b54137a15 Improve Android builds. (#9801)
Eagerly generate local.properties, and always update the flutter.sdk
setting in it, in case FLUTTER_ROOT has changed.

Fixes #8365.
Fixes #9716 - at least the specific issue reported. My Android Studio
still complains about Gradle versions - it ships with v3.2, but requires
v3.3...

Add a 'generate dependencies' task to the Gradle build, which checks if
the snapshot dependencies file exists, and runs an extra build before
the actual FlutterTask if it doesn't. This makes the first build slower,
but sub-sequent builds (without source changes) much faster.

Fixes #9717.
2017-05-05 14:53:51 +02:00
Jason Simmons b7ceed6b9d Handle missing directories in the flutter doctor IntelliJ check (#9812) 2017-05-04 14:48:41 -07:00
xster 837f101056 Let (almost) all flutter create CocoaPods references be dynamically generated later (#9791)
* Remove all initial cocoapod traces from flutter create except Podfile

* Make updateXcodeGeneratedProperties parameters named

* review notes
2017-05-04 12:26:58 -07:00
Ian Hickson e504dabdd2 Minor style tweaks (#9766) 2017-05-04 10:28:17 -07:00
Todd Volkert ba4bba7498 Support IPv6 in test platform (#9795) 2017-05-03 22:50:24 -07:00
Todd Volkert 6a4b08bec6 Make DeviceDomain echo a msg if doctor says it can't list anything (#9749)
This message will be picked up by IntelliJ and shown to the user in a toast.
2017-05-03 16:12:08 -07:00
xster b8b6a14d8b Make a few error messages bold (#9774) 2017-05-03 16:01:04 -07:00
Todd Volkert 3b5b46b07c Revert "Switch test platform to use IPv6 (#9775)" (#9779)
This reverts commit 9f5fa31ebd.
2017-05-03 14:46:28 -07:00
Todd Volkert 9f5fa31ebd Switch test platform to use IPv6 (#9775) 2017-05-03 14:33:38 -07:00
xster 2051669ac7 CocoaPods flow step 2 - don't pod install unless project has plugins (#9741)
* Revert "Revert "Don't try to resolve CocoaPods unless project has plugins" (#9719)"

This reverts commit f739e9e022.

* Remove channels integration test’s partial cocoapods artifacts
2017-05-03 11:19:59 -07:00
xster 87d0010adb Let printError be able to print bold also (#9714)
* Let printError print bold as well

* review notes
2017-05-02 22:20:14 -07:00
Todd Volkert 31000ef77e Remove unused code in adb.dart (#9732) 2017-05-02 21:12:28 -07:00
xster 85b2b86939 CocoaPods flow step 3 - don't automatically pod setup (#9703)
* Don’t automatically pod setup if the user never did it

* fix/add test

* rename getters
2017-05-02 16:11:37 -07:00
Devon Carew 7fb6646c96 fix an issue with reloading when paused at a breakpoint (#9733)
* fix an issues with reloading when paused at a breakpoint

* update docs
2017-05-02 16:09:57 -07:00
Michael Goderbauer c256e6d557 Populate PUB_ENVIRONMENT for initial pub get and correctly detect APPVEYOR as bot (#9725)
* Populate PUB_ENVIRONMENT for initial pub get

* review comments

* change order
2017-05-02 11:25:59 -07:00
Devon Carew 6957eabe2c tweak the doctor check for host compatibility (#9720) 2017-05-02 10:32:00 -07:00
Ian Hickson f739e9e022 Revert "Don't try to resolve CocoaPods unless project has plugins" (#9719)
* Revert "Document ScrollController (#9705)"

This reverts commit ff8609f273.

* Revert "Fix channels integration test (#9713)"

This reverts commit aace622d3f.

* Revert "Fix flutter view project's automated tests (#9712)"

This reverts commit 1a4bf9b66d.

* Revert "Update hello_world_memory_test package name (#9704)"

This reverts commit ffa8483f3b.

* Revert "Increment the flutter package version (#9699)"

This reverts commit 3b237a8c62.

* Revert "Don’t pod unless there are plugins (#9701)"

This reverts commit 732f79eed7.
2017-05-02 08:57:05 -07:00
xster 732f79eed7 Don’t pod unless there are plugins (#9701) 2017-05-01 13:37:45 -07:00
xster 9a61b8713c CocoaPods flow step 1 (#9687)
* Add cocoapods reason

* s/native/iOS
2017-05-01 12:47:25 -07:00
Todd Volkert 9c1aba2abe Skip adb server restarts during device discovery (#9693) 2017-05-01 10:10:16 -07:00
Devon Carew 6716904385 return the result from calling a service extension (#9636) 2017-04-28 07:39:14 -07:00
xster 66ed8de745 Record flutter run success/fail, build mode, platform, start time in analytics (#9597)
FlutterCommand.runCommand subclasses can optionally return a FlutterCommandResult which is used to append additional analytics. 

Fix flutter run timing report and add a bunch of dimensional data
2017-04-27 15:28:15 -07:00
Michael Goderbauer b432af51fd Don't crash when ADB exits with non-zero exit code (#9653) 2017-04-27 14:57:56 -07:00
Todd Volkert ffdca6f7e8 Fix getDevicesById() (#9646)
If the user specified a non-exact device id, it was producing
an exception whereby we were trying to listen to the
`getAllConnectedDevies()` stream twice.
2017-04-27 13:12:59 -07:00
Devon Carew 9ac2e44ee7 add a regression test for daemon device notification (#9618)
* add a regression test for daemon device notification

* revert event send simplification
2017-04-27 09:30:47 -07:00
Zachary Anderson 0770c3c14f [flutter_tools] Adds some support for '-d all' (#9585) 2017-04-26 21:49:38 -07:00
Todd Volkert e2cd78358f Fix missing await (#9617)
Fixes #9612
2017-04-26 13:14:31 -07:00
Michael Goderbauer 460561bad8 Make Flutter plugins usable from a Windows host (#9599)
Note: In a cross-platform context `Uri.path` is not a valid file path. Allways use `fs.path.fromUri` to convert.
2017-04-26 10:02:22 -07:00
Todd Volkert aaaae265ae Run async when calling adb shell getprop (#9611)
Also, add a timeout so a hung `adb` will not cause the
tools process to hang.

Fixes #9567
2017-04-26 09:58:20 -07:00
Todd Volkert 21f57a85e8 Wait for stderr in runCommandAndStreamOutput() (#9598) 2017-04-25 17:40:28 -07:00
Todd Volkert 60c5ffc1a9 Switch many Device methods to be async (#9587)
`adb` can sometimes hang, which will in turn hang the Dart isolate if
we're using `Process.runSync()`. This changes many of the `Device` methods
to return `Future<T>` in order to allow them to use the async process
methods. A future change will add timeouts to the associated calls so
that we can properly alert the user to the hung `adb` process.

This is work towards #7102, #9567
2017-04-25 17:23:00 -07:00
Michael Goderbauer ad1c497c03 Do not lower-case paths during canonicalization. (#9571)
* Do not lower-case paths during canonicalization.

This breaks hot reload on some platfroms with case insensitive file systems.

* Add unit tests
2017-04-25 10:34:43 -07:00
Alexandre Ardhuin 31828609dc add @required (#9579) 2017-04-25 08:59:43 +02:00
Zachary Anderson 9b250cb6e8 [fuchsia_reload] More information from --list (#9503) 2017-04-20 15:06:56 -07:00
John McCutchan 03d684be6d Fix a race in runFromSource. (#9495)
There is a race where we could complete a future based on a stream event
and then before we cancel the stream subscription, we get another event
and try and complete the future again.
2017-04-20 10:05:30 -07:00
Devon Carew f29dd4f921 improve progress display when running apps; speed up startup (#9475)
* improve progress display when running apps; speed up startup

* review comments
2017-04-20 07:13:35 -07:00
Adam Barth ab1aa07e8f Update engine (#9484) 2017-04-19 15:42:02 -07:00
Devon Carew a97060e095 don't pass in --no-packages-dir (#9476) 2017-04-19 15:26:24 -07:00
John McCutchan 367e11a4a8 Handle reassemble timeouts gracefully. (#9467)
- [x] Switch the reassemble timeout to 5 seconds.
- [x] Print a status message if reassemble fails:

```
Performing hot reload...
Reassembling app.flx$main took too long. Hot reload may have failed.
Reloaded 0 of 418 libraries in 5,322ms.
```

Fixes #9316
Fixes #8861
Fixes #8857
Fixes #8856
2017-04-19 09:30:14 -07:00
John McCutchan 71d80fbd3f Fix hot reload / restart after the back button dismisses the app on Android (#9455)
- [x] Refresh FlutterViews before issuing a hot reload / restart

Fixes #7248
2017-04-18 14:18:33 -07:00
Devon Carew 4631717f1b De-duplicate the dartanalyzer command output (#9441) 2017-04-18 14:02:06 -07:00
John McCutchan 2cf50ce574 Fix hot restart when application is being debugged (#9450)
- [x] Resume the isolate before performing a hot restart.

Fixes #8923
2017-04-18 13:27:53 -07:00
Michael Goderbauer 9a05e984d8 Ask users to set ANDROID_HOME if SDK is installed in a non-standard location (#9445) 2017-04-18 11:56:09 -07:00
John McCutchan acd75c0a3b Improve flutter_tools handling of the device being unplugged while syncing DevFS (#9431)
- [x] Catch SocketErrors and handle them gracefully.
- [x] Print 'Lost connection to device' when the service protocol connection is severed unexpectedly.
- [x] Print 'Application finished' when the application exits otherwise.

After this PR:

```
Launching lib/main.dart on Nexus 7 in debug mode...
Running 'gradle assembleDebug'...                     1.2s
Built build/app/outputs/apk/app-debug.apk (21.7MB).
Syncing files to device...
Application finished.
DevFS sync failed. Lost connection to device: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 53062
Could not perform initial file synchronization.
```

Fixes #6705
2017-04-17 15:35:01 -07:00
Zachary Anderson b645e4ea3c [fuchsia_reload] Fix command line argument checking (#9434) 2017-04-17 15:21:12 -07:00
John McCutchan 2c1bb355dd Do less file system crawling when we have the Dart dependency set (#9424)
- [x] Skip scanning the file system if we already have the Dart dependency set.

Fixes #9376

```
Performing hot reload...
Reloaded 1 of 418 libraries in 888ms.

Performing hot reload...
Reloaded 1 of 418 libraries in 871ms.

** UNTAR dragontail under project root **
Performing hot reload...
Reloaded 0 of 418 libraries in 443ms.

** UNTAR dragontail under lib/ **
Performing hot reload...
Reloaded 0 of 418 libraries in 385ms.
```
2017-04-17 11:20:04 -07:00
John McCutchan 5e73133797 Use a different message on the first reload. (#9418)
The first hot reload does a bunch of work that we used to hide behind the
loader screen. This PR changes the messsage printed to the user on the first
reload from:

'Performing hot reload...'

to:

'Initializing hot reload...'

Subsequent reloads say 'Performing hot reload...'
2017-04-17 11:03:43 -07:00
Brian Slesinsky cc3b91479c flutter create: don't use relative paths in IDEA config files (#9414)
When invoked from the command line, relative paths aren't typically
used, but they are when invoked from within IDEA and prevents
IDEA from reading the files.

Also, remove flutterPackagesDirectory since it's not used
2017-04-16 13:58:08 -07:00
Zachary Anderson a0369806f2 [fuchsia_reload] Give more information in the module list (#9400) 2017-04-14 21:18:48 -07:00
Zachary Anderson 9fdd4f4701 [fuchsia_reload] Reload each instance of a module. (#9379) 2017-04-14 11:33:47 -07:00
Brian Slesinsky 5cb9097965 flutter create: enable Java support in IDEA (#9335)
Generates an android.iml file and a package-level library for flutter.jar.

Does not set up an Android SDK in IDEA; this isn't possible with a
template-based approach. But IDEA shows a clear warning, so the
user can fix this by setting the SDK.

(When creating a Flutter project from within IDEA, we can fix this up
afterwards in the plugin.)
2017-04-14 10:12:48 -07:00
Jason Simmons 9455fb64d9 Allow upgrades and version checks against the alpha branch (#9387)
Fixes https://github.com/flutter/flutter/issues/9258
2017-04-14 09:58:31 -07:00
Jason Simmons 76bebeed9d Instruct users to run Android Studio so it will install Android SDK components (#9323)
Fixes https://github.com/flutter/flutter/issues/8690
2017-04-13 11:28:18 -07:00
Ian Hickson 2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
2017-04-12 13:33:02 -07:00
Devon Carew 20e83e3e58 change the reload success message to include both the elapsed time and the library count (#9328) 2017-04-11 07:57:18 -07:00
Yegor a5593b1678 fix analyzer warning: use const where possible (#9320) 2017-04-10 14:20:47 -07:00
Yegor 5efbe05f04 do not warn about out-of-date Flutter installation too often (#9271)
* do not warn about out-of-date Flutter installation too often

* style fix
2017-04-10 13:21:02 -07:00
Jakob Andersen 7ffa82aaf0 Inject plugin registration. (#9216)
Added a PluginRegistry to the new project template. The registry files will be automatically updated at build time to register the native plugins.

Fixes #7814.
2017-04-10 15:44:19 +02:00
Devon Carew 70e2acfb6c tweak the layout for the ios doctor checks (#9306) 2017-04-09 12:43:48 -07:00
Devon Carew ca5f0c9a3e fix the return type on flutterPlatformOverride (#9269) 2017-04-09 11:08:32 -07:00
Alexandre Ardhuin 610955f81d upgrade to linter-0.1.30 (#9297)
* upgrade to linter-0.1.30

* add prefer_is_empty lint
* add directives_ordering lint
* add no_adjacent_strings_in_list lint
* add no_duplicate_case_values lint
* add prefer_collection_literals lint
* add prefer_const_constructors lint
* add prefer_contains lint
* add prefer_initializing_formals lint
* add unnecessary_null_aware_assignments lint
* add unnecessary_null_in_if_null_operators lint
2017-04-08 08:43:19 +02:00