Commit Graph

2524 Commits

Author SHA1 Message Date
Alexander Aprelev
183ed461c1
Provide workaround for expression compilation frontend issue (#18657) 2018-06-28 11:17:27 -07:00
Danny Tuppeny
108da01310
Remove the 'app' domain from flutter daemon (#18873)
* Remove the 'app' domain from flutter daemon

By default the daemon won't register the "app" domain, you need to opt-in (which the 'run' command does, as well as the tests for the app functionality).

Fixes #6658.

* Tweak text

* Put restart/callServiceExtension/stop back into daemon mode

* Add a comment about removing discoverApps
2018-06-28 16:22:02 +01:00
Danny Tuppeny
7e4038fe27
Expose emulator creation to daemon API (#18905)
* Fix typo

* Add emulator.create to Daemon API

* Swap order of daemon changelog entries
2018-06-28 14:10:26 +01:00
Sigurd Meldgaard
1e8ef602c3
Add iOS module template (#18830) (#18903)
Add iOS module template

This will enable integration of flutter-views into existing iOS project.
2018-06-28 14:35:00 +02:00
Danny Tuppeny
266a720209
Ensure we have the Java binary on PATH when invoking avdmanager (#18908)
See https://github.com/flutter/flutter/issues/13379#issuecomment-400984667.
2018-06-28 12:09:04 +01:00
Sigurd Meldgaard
4a6558f88f
Revert "Add iOS module template (#18830)" (#18902)
This reverts commit 8be198d8a0 that broke the build.
2018-06-28 11:16:08 +02:00
Sigurd Meldgaard
8be198d8a0
Add iOS module template (#18830)
Add iOS module template

This will enable integration of flutter-views into existing iOS project.
2018-06-28 10:03:16 +02:00
Danny Tuppeny
cdb01187f8
Add --create option to flutter emulators command (#18235)
* Add --create option to flutter emulators

* Tweaks to error message

* Simplify emulator search logic

* Make name optional

* Add a note about this option being used with --create

* Tweaks to help information

* Switch to processManager for easier testing

* Don't crash on missing files or missing properties in Android Emulator

* Move name suffixing into emulator manager

This allows it to be tested in the EmulatorManager tests and also used by daemon later if desired.

* Pass the context's android SDK through so it can be mocked by tests

* Misc fixes

* Add tests around emulator creation

Process calls are mocked to avoid needing a real SDK (and to be fast). Full integration tests may be useful, but may require ensuring all build environments etc. are set up correctly.

* Simplify avdManagerPath

Previous changes were to emulatorPath!

* Fix lint errors

* Fix incorrect file exgtension for Windows

* Fix an issue where no system images would crash

reduce throws on an empty collection.

* Fix "null" appearing in error messages

The name we attempted to use will now always be returned, even in the case of failure.

* Add additional info to missing-system-image failure message

On Windows after installing Andriod Studio I didn't have any of these and got this message. Installing with sdkmanager fixed the issue.

* Fix thrown errors

runResult had a toString() but we moved to ProcessResult when switching to ProcessManager to this ended up throwing "Instance of ProcessResult".

* Fix package import

* Fix more package imports

* Move mock implementation into Mock class

There seemed to be issues using Lists in args with Mockito that I couldn't figure out (docs say to use typed() but I couldn't make this compile with these lists still)..

* Rename method that's ambigious now we have create

* Handle where there's no avd path

* Add another toList() :(

* Remove comment that was rewritten

* Fix forbidden import

* Make optional arg more obviously optional

* Reformat doc

* Note that we create a pixel device in help text

* Make this a named arg
2018-06-28 08:07:40 +01:00
Jason Simmons
c9c1068ce4
Filter invalid characters in the terminal input stream (#18892)
Fixes https://github.com/flutter/flutter/issues/18007
2018-06-27 18:41:32 -07:00
Ian Hickson
35ad2a786d
Remove race conditions involving finding available ports (#18698)
This is an attempt to reland #18488 with less breakage on macOS.
2018-06-27 16:44:28 -07:00
Alexander Aprelev
ed2376a7fc
Fix library-scope expression evaluation. (#18851)
This also improves diagnostic in case of internal compiler errors.
2018-06-27 15:51:23 -07:00
Danny Tuppeny
e616c6cef2
Improve update checking (#18193)
* Improve update checking

This change emables pinging the server to check for updates regardless of whether the local version is "out of date". The server code already has a 7-day cache so the result is that we can now ping the server once every 7 days instead of waiting for the local install to be 4 weeks out of date before pinging.

The original 4 week period is still used for when we'll start warning the user they're out of date if we could not confirm with the server whether there's a new version.

* Improve message when we know there's a new version available

* Fix bnullable bool checks

* Switch nullable bool to enum

* Fix casing of enum values

* Remove stale comment

The names are now descriptive so doesn't need additional explanation.

* Improve name of function

* Remove note:

* Rename kPauseToLetUserReadTheMessage -> timeToPauseToLetUserReadTheMessage

* Change kVersionAgeConsideredUpToDate to 5 weeks from 4

* Inline the isNewerFrameworkVersionAvailable check

* Fix indenting (?)

* Fix more indenting

* Rename function to be clearer it's getting the commit date

* Formating tweaks

* Update stamp when connection failed, and reduce time before we'll try again

Previously we would hit the server on every command if we thought we might be out of date and we never successfully connected (eg. if you're offline). This makes the stamp update even when there's a conneciton failure so that this won't happen, but reduces the time till we check again from 7 days to 3 days to compensate a little in case it was a one-off.

https://github.com/flutter/flutter/pull/18193#issuecomment-399222269

* Fix comment

* Don't perform update checks if not on an official channel
2018-06-27 12:50:40 +01:00
Alexander Aprelev
75b737ff69
Fail flutter build invocation on compilation errors. (#18800)
Fixes https://github.com/flutter/flutter/issues/18200.
2018-06-25 12:42:24 -07:00
Florian Loitsch
d248725e15
Flutter attach (#18677)
Add `flutter attach` command.

This command allows Flutter to connect to applications that haven't been launched using `flutter run`.
2018-06-25 15:33:42 +02:00
Sarah Zakarias
def7634ba0
Support running apk with more than one activity (#18716) 2018-06-25 13:38:08 +02:00
David Shuckerow
1a372afb37
Revert changes to core SDK members that haven't been propagated to the g3 SDK yet (#18654)
* Revert changes to core SDK members that haven't been propagated to the g3 Dart SDK yet.

* Respond to comments.

* Remove retype

* Temporarily un-remove VMService.retype to unblock g3 roll

* Checkout back to master, we need fewer changes to reach compat with dev.61 than dev.60
2018-06-22 14:16:34 -07:00
Mikkel Nygaard Ravn
d89a6b544e
Add module template for Android (#18697) 2018-06-22 18:19:37 +02:00
Alexander Aprelev
9a51588d54
Suppress stdout compile diagnostic when compile expressions. (#18703)
* Suppress stdout compile diagnostic when compile expressions.

This fixes https://github.com/flutter/flutter/issues/18574.

* Use equal sign for default values
2018-06-21 20:55:04 -07:00
Sam Rawlins
9f8a70be4c Bump mockito to 3.0.0-beta (#18462)
* Bump mockito to 3.0.0-beta

* Few fixes

* fix test

* Bump image

* Fix

* New packages update

* With matcher pinned

* No more typed
2018-06-21 16:23:47 -07:00
Alexander Aprelev
2828a459f6
Serialize expression compilation requests (#18618)
* Serialize compilation requests.
2018-06-21 11:13:21 -07:00
Yegor
9da80217fc
make crash server URL customizable from environment (#18649) 2018-06-20 15:43:43 -07:00
Alexander Aprelev
fb8cbf216b
Roll engine to 549c855e89341b97436b3417542fc8f997492df7 (#18591)
* Roll to 549c855e89341b97436b3417542fc8f997492df7

* Clean up return void - see https://github.com/dart-lang/sdk/issues/33218
2018-06-20 12:36:10 -07:00
Florian Loitsch
0a3179fbab
Make ensureVersionFile a Future<void> function. (#18631) 2018-06-20 15:34:17 +02:00
Ian Hickson
6599271bf5
Revert matcher package (#18614)
The new matcher package deprecates isInstanceOf which seems eggregious.
2018-06-19 17:22:56 -07:00
Greg Spencer
08d1ec36de Roll engine to 0c119932c0d6cb30dafd75ec717d1eda76fd7651 (#18575) 2018-06-19 09:58:20 +02:00
Danny Tuppeny
592c5ba91a
Don't be case-sensitive when checking for extension (#18515)
Seems like VS Code may have started using lowercase extension folders recently (our identifier is `Dart-Code.flutter` but now the folder is named `dart-code.flutter`), so this makes the check not sensitive to casing.

Also reuse extension identifier for download link
2018-06-18 06:37:01 +01:00
Ian Hickson
0fa5ba43a1
Revert "Remove race conditions involving finding available ports (#18488)" (#18521)
This reverts commit 7750872251.
2018-06-15 15:37:20 -07:00
Ian Hickson
7750872251
Remove race conditions involving finding available ports (#18488) 2018-06-15 14:16:18 -07:00
Stanislav Baranov
bcaf026c08
Add flutter tool support for creating app-specific VM snapshots. (#18417)
Add flutter tool support for creating app-specific VM snapshots.
2018-06-15 11:53:30 -07:00
Sarah Zakarias
8f9aca8558
Enable running with prebuilt test-only apk (#18453) 2018-06-15 13:25:19 +02:00
Ian Hickson
d1cc8b6de8
Clean up output of "flutter run --release" (#18380)
(second attempt)
2018-06-14 12:30:20 -07:00
Danny Tuppeny
48f4ff6dda
Ensure errors launching emulators are exposed to the daemon (#18446) 2018-06-14 07:59:50 +01:00
Ben Konyi
ab6df25103 Fixed concurrent list modification in vmservice.dart 2018-06-13 19:25:07 -07:00
Michael Thomsen
87351bd958
Fix outdated link for how to edit plugin code (#18069)
* Fix readme link to plugin edit instructions

* Fix flutter tools link
2018-06-13 13:40:55 -07:00
Chris Bracken
2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Keerti Parthasarathy
aecb7d9607
Fixes for Dart 2 failures in tests (#18371) 2018-06-12 09:30:10 -07:00
Danny Tuppeny
b8b34def39
Fix misplaced quote (#18354) 2018-06-12 15:25:38 +01:00
Greg Spencer
6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Stanislav Baranov
581a343b34
Fix gradle dependency for gen_snapshot in AOT builds. (#18322) 2018-06-08 18:45:07 -07:00
Chris Bracken
4db7daf751
Handle malformed depfiles in Fingerprinter (#18321)
Fingerprinter.doesFingerprintMatch() now returns false rather than
throwing if a depfile is malformed.
2018-06-08 17:56:14 -07:00
Chris Bracken
3daebd059c
It's time to #deleteDart1 (again) (#18316)
* It's time to #deleteDart1 (#18293)

Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.

* Fix indentation, remove no longer necessary .toList()

* Only push udpated kernel if >0 invalidated srcs
2018-06-08 15:49:24 -07:00
Chris Bracken
9495df4bc3
Revert "It's time to #deleteDart1 (#18293)" (#18313)
Several benchmarks started failing during kernel compile:
1. Timeouts:
   * commands_test
   * hot_mode_dev_cycle__benchmark
   * run_machine_concurrent_hot_reload
   * service_extensions_test

2. Kernel compiler crash:
   * hot_mode_dev_cycle_linux__benchmark
   * routing_test

3. Unexpected termination:
   * hot_mode_dev_cycle_win__benchmark

This reverts commit ed63e7082a.
2018-06-08 12:43:11 -07:00
Chris Bracken
ed63e7082a
It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.
2018-06-08 11:04:57 -07:00
Chris Bracken
0e4770e809
Count kernel bytes in bytes synced by DevFS.update (#18288)
DevFS.update() returns the number of bytes synced from the host to the
target device. When running in Dart 2 mode, ensure that the size of the
kernel file is included in the count of bytes synced.
2018-06-07 18:27:08 -07:00
Chris Bracken
0628a1fb24
Eliminiate concurrent map key set modification (#18284)
Iterates over a copy of the dirty entries list rather than the original,
in order to avoid the potential for a concurrent modification exception
when fileUris are removed/added later in the loop.

This occurs when non-asset URIs (Dart sources) are listed in the dirty
set when --preview-dart-2 is enabled (the default).
2018-06-07 16:45:09 -07:00
Chris Bracken
3c25817bc7
Make kernel compiler stdoutHandler private (#18283)
Thie field is never used outside of the class and has a private type,
making it impossible to subclass/mock.
2018-06-07 16:44:25 -07:00
Stanislav Baranov
4a2ed22b0e
Propagate flutter tool verbose flag through gradle to flutter build bundle. (#18246) 2018-06-06 13:43:32 -07:00
Alexander Aprelev
f11c8d967c
Add compile-expression service. (#16161)
This registers compile-expression service that is used by dart vm to evaluate expressions when debugging flutter applications.
2018-06-05 13:22:13 -07:00
Keerti Parthasarathy
da7670c2ee
Fixes for test failures in Dart 2 mode (#18122) 2018-06-05 12:38:30 -07:00
Alexandre Ardhuin
09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Ian Hickson
6be81ebf9b
Be more resilient to bad data from VM (#18132)
Fixes https://github.com/flutter/flutter/issues/14517
Or at least, fixes the crash part of that.
2018-06-04 19:12:55 -07:00
Ian Hickson
944f0a4cc1
Revert "Clean up output of "flutter run --release" (#18049)" (#18184)
This reverts commit 4f1b66044c.
2018-06-04 16:17:08 -07:00
Ian Hickson
4f1b66044c
Clean up output of "flutter run --release" (#18049) 2018-06-04 15:22:51 -07:00
Ian Hickson
e3427550e9
Be less verbose in the logs. (#17401)
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
2018-06-04 15:22:19 -07:00
Danny Tuppeny
43da9d5ef9
Use isDirectory instead of existsSync to avoid crash (#18167)
Fixes #15198.
2018-06-04 17:59:07 +01:00
Martin Kustermann
ec6c4aba89
Rename --prefer-shared-library to --build-shared library consistently (#18164)
The change in 8b8d368d2 has only renamed the flag in a subset of the
places.
2018-06-04 17:44:37 +02:00
Danny Tuppeny
f833c43e6e
Skip version checks when running flutter upgrade (#18031)
We were already skipping the check in `flutter upgrade` but this also spawns `flutter precache` and `flutter doctor` which would still check and potentially output the message.
2018-06-04 12:04:45 +01:00
Mikkel Nygaard Ravn
e49a9661ad
Await writing local props to complete (#18110) 2018-06-01 12:15:30 +02:00
Danny Tuppeny
3d7d96806a
Use correct branch for version checks on beta/dev (#18016) 2018-06-01 10:59:20 +01:00
Sigurd Meldgaard
758711c85d
Allow --use-application-binary using app-bundles on ios (#17691)
This makes it easier to run ios add2app apps with Flutter run.
2018-05-31 10:33:15 +02:00
Jacob Richman
62febaa140
Add support for --track-widget-creation back to ios build rules. (#18046) 2018-05-30 14:53:35 -07:00
Greg Spencer
b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer
3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Ralph Bergmann
c65e9d19a4 add version to pubspec.yaml (#16857)
Uses the `version` property from the `pubspec.yaml` file to set the corresponding fields in the `local.properties` file respectively in the `Generated.xcconfig` file.

The `--build-name` and `--build-number` options have changed. Now they trump the `version` property from the `pubspec.yaml` file.

If the `version` property is not set and the  `--build-name` and `--build-number` options are not provided, the build command will not change the `local.properties` / `Generated.xcconfig` file.
2018-05-30 07:51:25 -07:00
Mikkel Nygaard Ravn
0d1574c313
Refactor flutter create logic in prep for add2app (#17992) 2018-05-30 11:25:21 +02:00
Mikkel Nygaard Ravn
c7ea3ca377
Revert sync async (#18002) 2018-05-29 21:07:33 +02:00
Danny Tuppeny
42c9719ff0
Change doctor to point at Flutter extension (#17987) 2018-05-29 17:11:34 +01:00
Danny Tuppeny
24e2b238d4
Send an event at startup with the protocol version and pid (#17873)
* Send an event at startup with the protocol version and pid

The pid will help with some of the issues of terminate the process when launched through a shell script and the version will allow clients to make decisions about supported features.

I've also bumped the protocol version number for two reasons:

1. This change
2. We didn't increase it when we added the previous emulator commands
2018-05-28 22:02:53 +01:00
Florian Loitsch
3ced55a7dc
Sync async2 (#17964)
Enable --sync-async in Flutter.
Fixes #16801
2018-05-28 16:21:05 +02:00
Chris Bracken
7587f54b20
Build single-architecture for local iOS engines (#17919)
When running with --local-engine, build single-architecture apps, rather
than what's declared in the Xcode project.

By default, Flutter creates Xcode projects that generate universal
binaries supporting both armv7 and arm64 processors. Since local engine builds
are all single-architecture, override the Xcode project's ARCHS setting
with the appropriate value for the specific engine.

NOTE: this assumes engine paths consistent with those used in the engine
repo: 32-bit iOS engine builds end in _arm, 64-bit builds do not.
2018-05-25 14:53:10 -07:00
Michael Thomsen
07081a1d2c
Fix flutter run output (#17920) 2018-05-25 23:22:53 +02:00
Michael Thomsen
fb95fcbae5
Fully rename to hot restart (#17897)
* Fully rename to hot restart

Follow-up change to f48dec570c

* Review feedback
2018-05-25 23:10:16 +02:00
Devon Carew
1c6078cefc
make sure we init flutter_tools with a fallback locale (#17877) 2018-05-24 13:42:46 -07:00
Mikkel Nygaard Ravn
d875ebe2e4
Revert "Enable --sync-async in Flutter. (#17866)" (#17878)
This reverts commit 39d7f22a96.
2018-05-24 20:09:27 +02:00
Florian Loitsch
39d7f22a96 Enable --sync-async in Flutter. (#17866) 2018-05-24 19:26:44 +02:00
Tim Neumann
54899c7638 Support multi-line log messages on iOS devices (#17327) 2018-05-23 19:03:05 -07:00
Ryan Macnak
d27cd520de
Don't link the core snapshot in the Android engine. (#17855)
Allows one to use a different core snapshot without a custom engine build by just packaging a different one in the APK.
2018-05-23 18:32:01 -07:00
Danny Tuppeny
dfc0244e19
Add emulator.getEmulators and emulator.launch to daemon (#17466)
Related to:

#14822
Dart-Code/Dart-Code#490
#13379
2018-05-22 07:39:08 +01:00
Danny Tuppeny
e2181a6ad9
First run simulator with -n to ensure it always opens a device (#17460) 2018-05-22 07:35:42 +01:00
Simon Lightfoot
be6501a91c Patch to fix builds with custom targets on iOS simulator. (#17734)
* Patch to fix builds with custom targets on iOS simulator. #16787

* Fix for unused import.

* Code review changes applied.
2018-05-21 03:54:38 -07:00
Devon Carew
bb2f63f2cd
remove an unused flutter run flag (#17667) 2018-05-20 20:59:10 -07:00
fmatosqg
197d4315a9 Scan assets from disk (#16413)
Scan folders when asset specified finishes with `/`
2018-05-20 17:52:33 -07:00
Greg Spencer
3c5a7a3005
Make non-global constants have consistent naming (with just _ instead of _k) (#17584)
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.

Only naming changes to private vars: no logic changes.
2018-05-17 23:04:41 -07:00
Alexander Aprelev
89d99f6d01
Add --no-preview-dart-2 when in dart1 mode. (#17708)
This is follow-up to https://github.com/flutter/flutter/pull/17682 to fix dart1 tests.
2018-05-17 21:13:01 -07:00
Alexander Aprelev
89cb5d268d
Provide isolate id for rpc request to ensure they are run on correct (UI) thread. (#17616) 2018-05-17 11:37:36 -07:00
liyuqian
ae8586cfa1
Show help info instead of crashing if Android SDK is not found (#17610)
Fixes #16832
2018-05-15 14:42:12 -07:00
Alexander Markov
4fb7c91ee3
Plumb --extra-front-end-options in flutter build bundle (#17404) 2018-05-14 09:41:58 -07:00
Vyacheslav Egorov
4931b46772
Make --build-shared-library more robust. (#17420)
* Search for a suitable ARM sysroot instead of hardcoding it;
* Add facility to explain why NDK was not found;
2018-05-14 16:36:54 +02:00
Sam Rawlins
5fafface34 Bump mockito to 3.0.0-alpha+5 (#17487) 2018-05-11 15:27:15 -07:00
Chris Bracken
f685568d90
Update a TODO with issue number (#17494)
Further digging revealed that the reason --no-sim-use-hardfp was
required to be specified explicitly was that Android engine gen_snapshot
binaries are built on Windows with target_os=win.
2018-05-10 17:45:35 -07:00
Todd Volkert
106231c0de
Use deprecated I/O constants (#17491)
The non-deprecated variants aren't widely available yet
2018-05-10 16:27:57 -07:00
Todd Volkert
aab47f0794
Augment flutter screenshot with all supported screenshot types (#17478)
Previously, the only hook into the rasterizer schreenshot code path
was via FlutterDriver.screenshot.  This adds the ability for the
Flutter tool to hook into all three types of screenshots:

1. device (e.g. `adb shell screencap`)
2. Skia (capture spk)
3. Rasterizer (capture PNG via the engine)
2018-05-10 16:09:38 -07:00
Zachary Anderson
bb4afb0472 Roll engine to 37e20af6a324cd4cfa1324b8c644712ef8224359 (#17481) 2018-05-10 14:36:54 -07:00
Devon Carew
d427d26d1b
Unpin analyzer - no longer use the version from the sdk (#17479)
* no longer use the analyzer version shipped in the sdk

* update all package versions to the latest
2018-05-10 13:31:54 -07:00
Chris Bracken
28e644e87a
Explicitly specify softfp ABI for armv7 builds (#17453)
This reverts #17147, which was safe under the assumption that
getArtifactPath() returns a platform-specific gen_snapshot instance
(which have the correct default set for this flag) -- it turns out that
though we pass the platform to getArtifactPath(), we always return the
host gen_snapshot for Android.

A followup patch will update getArtifactPath and revert this patch.
2018-05-10 12:45:15 -07:00
Devon Carew
09dec7f508
re-write flutter analyze to use the analysis server (#16979)
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server
2018-05-10 09:48:40 -07:00
Devon Carew
f48dec570c
rename 'full restart' to 'hot restart' (#17408) 2018-05-09 17:43:13 -07:00
Chris Bracken
5d8d14b781
Add caching for kernel compiles during AOT builds (#17439)
We've always cached kernel compiles during bundle builds. This adds
caching for kernel compiles during AOT builds by moving caching into the
KernelCompiler.compile() method rather than around each invocation of it.

This also filters buildbot paths included by the kernel compile that are
not present on the local machine at paths /b/build/slave/Linux_Engine/...
The kernel compiler should probably include an option to not emit these
paths in the depfile, since these are used both by Gradle and the
Fingerprinter class.
2018-05-09 13:34:58 -07:00
Chris Bracken
a751678563
Allow 32-bit iOS device simulators (#17443)
Previously, Flutter did not support iOS devices with armv7 or armv7s
CPUs. We now support these devices. This eliminates the previous
hardcoded checks that prevented running on simulators of older devices.

We maintain the existing restriction on running on watchOS or tvOS
simulators.
2018-05-09 13:34:39 -07:00
Chris Bracken
1c27a458a8
Correct profile-mode AOT snapshot flags (#17435)
Previously, in non-release (i.e. profile) AOT builds, we were setting
--no-checked and --conditional_directives flags. --no-checked is the
default, and we don't make use of conditional directives in Flutter.
2018-05-09 12:31:36 -07:00
Chris Bracken
e4f553324a
Add pathFilter to Fingerprinter (#17412)
Allows users of Fingerprinter to filter the set of paths collected from
the explicitly-specified paths and those collected from depfiles.

In some cases, depfiles are emitted with files that are not present on
the local disk (e.g. the frontend compiler currently emits buildbot
paths for the dart core libraries and dart:ui). These files will not
materially affect whether we need to re-run a build action for which
they are inputs, since they're not present in the filesystem and
therefore cannot change.
2018-05-09 10:55:23 -07:00
Danny Tuppeny
768fca8be9 Trim all space/dots from end
Depending on whether can read the AVD (or it even has all fields populated) we might get extra "empty" columns, so this trims all blank cells from the end.
2018-05-09 16:03:59 +01:00
Danny Tuppeny
6cd22d01aa Use correct path for Simulator 2018-05-09 16:03:59 +01:00
Danny Tuppeny
9eb3bf5ed5 Don't show last bullet if there's no label 2018-05-09 16:03:59 +01:00
Danny Tuppeny
e9281c4ac0 Fix formatting 2018-05-09 16:03:59 +01:00
Danny Tuppeny
72d0e0b41a Add text explaining how to run an emulator 2018-05-09 16:03:59 +01:00
Danny Tuppeny
20a2a202ee Add 'emulator' as an alias for 'emulators'
It feels more nautral to type when doing `--launch x` or `--create x`.
2018-05-09 16:03:59 +01:00
Danny Tuppeny
7a810261fa Only wait up to 3 seconds for emulator
Emaultor keeps running on a seuccessful launch, so this automatically returns after 3 seconds if the process hasn't quit (we have to wait for some period to get stderr in the case of a failure).
2018-05-09 16:03:59 +01:00
Danny Tuppeny
11076bfb43 Add missing awaits 2018-05-09 16:03:59 +01:00
Danny Tuppeny
f850d04ef4 Add missing await 2018-05-09 16:03:59 +01:00
Danny Tuppeny
3cb539fdb5 Switch streams to Future<Lists> 2018-05-09 16:03:59 +01:00
Danny Tuppeny
3bb6b5e660 Remove TODO
I can't come up with a better name; anything with Simulator or Device in it will be confused with the existing IOSSimulator/Device classes (which represent the running devices).
2018-05-09 16:03:59 +01:00
Danny Tuppeny
a43dfe2000 Change start->launch when refering to emulators 2018-05-09 16:03:59 +01:00
Danny Tuppeny
16dc94ef93 Update "no devices" text to suggest "flutter emulators" 2018-05-09 16:03:59 +01:00
Danny Tuppeny
b4c967abee Re-order columns 2018-05-09 16:03:59 +01:00
Danny Tuppeny
ed3807d0e3 Use null instead of empty 2018-05-09 16:03:59 +01:00
Danny Tuppeny
76815faeac Flatten descriptions from Stream to List 2018-05-09 16:03:59 +01:00
Danny Tuppeny
b5a3d26f75 Fix typo 2018-05-09 16:03:59 +01:00
Danny Tuppeny
445273f7d5 Fix filtering of emulator list
`flutter emulators nexus` will now return only those that'd match (eg. same things that `flutter emulators --start nexus` would match).
2018-05-09 16:03:59 +01:00
Danny Tuppeny
3626556d21 Remove unused code 2018-05-09 16:03:59 +01:00
Danny Tuppeny
b7497d558f Remove unused emulator diagnostics 2018-05-09 16:03:59 +01:00
Danny Tuppeny
e2b8c86b96 Add dantup to TODO comments 2018-05-09 16:03:59 +01:00
Danny Tuppeny
259dd571a2 Remove newline 2018-05-09 16:03:59 +01:00
Danny Tuppeny
2144c7a6d3 Tweak text because we check IDs and names
And it's not obvious to the use what the ID is.
2018-05-09 16:03:59 +01:00
Danny Tuppeny
1c7dce3406 Improve text 2018-05-09 16:03:59 +01:00
Danny Tuppeny
90bdcef9f9 Remove redundant lines from errors 2018-05-09 16:03:59 +01:00
Danny Tuppeny
da5a64ec7f More Windows fixes
Added an exists check to ensure we don't try to run if emulator is missing, but that requires the file extension for Windows.
2018-05-09 16:03:59 +01:00
Danny Tuppeny
03b5fe3d94 Handle nulls caused by missing information 2018-05-09 16:03:59 +01:00
Danny Tuppeny
1037586dd7 Don't try to build emulators from empty output 2018-05-09 16:03:59 +01:00
Danny Tuppeny
fe762666a2 Improve error message when no AVD path 2018-05-09 16:03:59 +01:00
Danny Tuppeny
7a33888693 Tidy up 2018-05-09 16:03:59 +01:00
Danny Tuppeny
5793a3c372 Fix crash on Windows caused by no HOME var
Windows sets HOMEDRIVE/HOMEPATH.
2018-05-09 16:03:59 +01:00
Danny Tuppeny
b096c57bbd Remove launch status
It's too fast and leaves weird output on the screen
2018-05-09 16:03:59 +01:00
Danny Tuppeny
cec37ab46a Fix typo 2018-05-09 16:03:59 +01:00
Danny Tuppeny
6ff84d084b Improve formatting 2018-05-09 16:03:59 +01:00
Danny Tuppeny
c0b2e78391 Add support for iOS Simulator in flutter emulators 2018-05-09 16:03:59 +01:00
Danny Tuppeny
799678f0a7 Add some tests around device+ini parsing 2018-05-09 16:03:59 +01:00
Danny Tuppeny
4c67885b8e Add support for launching emulators 2018-05-09 16:03:59 +01:00
Danny Tuppeny
4d7c3c775f Read information about AVDs from config.ini 2018-05-09 16:03:59 +01:00
Danny Tuppeny
486e9534bf Add some emulator tests 2018-05-09 16:03:59 +01:00
Danny Tuppeny
2bdb3bbe0e Fix references to Devices and remove unused properties 2018-05-09 16:03:59 +01:00
Danny Tuppeny
53840fb0ce Add basic support for listing Android AVDs
Very basic support for "flutter emulators" which just lists the available Android AVDs.

Relates to:

https://github.com/flutter/flutter/issues/14822
https://github.com/Dart-Code/Dart-Code/issues/490
https://github.com/flutter/flutter/issues/13379
2018-05-09 16:03:59 +01:00
Chris Bracken
8b8d368d2b
Replace --prefer-shared-library with --build-shared-library (#17394)
This replaces the --prefer-shared-library flag, which falls back to
regular (non-shared-lib) compile if the NDK is not found, with the
--build-shared-library flag, which exits with an error message if the
NDK is not found.

This simplifies the set of allowed code paths through AOT compile,
resulting in better testability and easier-to-follow logic. It also
results in more predictable behaviour for continuous integration and
other scenarios.
2018-05-08 17:28:53 -07:00
Chris Bracken
231b9425d6
Block debug AOT snapshot builds (#17393)
We previously blocked iOS AOT builds, but Android debug builds are
always JIT builds.
2018-05-08 11:06:58 -07:00
Chris Bracken
671489ff44
Update kernel compile log message (#17390)
Updates the message emitted when a kernel compile is skipped in the
build bundle action. Since we now use fingerprinting to enable
performance of script snapshots, AOT snapshots, and kernel compiles,
this helps a bit with debugging.

Also switches to trace level logging.
2018-05-08 11:06:40 -07:00
Danny Tuppeny
83296e74a1 Pass --run-forever to flutter-tester to ensure it doesn't prematurely quit
Without this, flutter-tester quits immediately after executing main().
2018-05-08 10:23:40 +01:00
Mikkel Nygaard Ravn
61c7171872
Recommend using Cocoapods 1.5.0 (#17308) 2018-05-08 08:02:39 +02:00
Todd Volkert
30abc54bdd
Enable deterministic rendering on flutter_tester tests (#17373) 2018-05-07 19:53:34 -07:00
Chris Bracken
849676fc7f
Support multi-arch iOS binaries (#17312)
This change adds support for armv7, arm64, and universal iOS apps.

This change eliminates iOS target architecture hardcoding (previously
arm64 only) and uses the target architecture(s) specified in Xcode's
ARCHS setting ('Architectures' in Xcode Build Settings).

For universal binaries, set ARCHS to its default value, $(ARCHS_STANDARD).

Note that after changing the architecture in Xcode, developers should
run 'pod install' from the ios subdirectory of their project. A separate
change (that will land before this one) will add support for
automatically detecting project file and Podfile changes and re-running
pod install if necessary.

This change also adds an --ios-arch option to flutter build aot. In iOS
AOT builds (in profile and release mode), this dictates which
architectures are built into App.framework. This flag should generally
be unnecessary to set manually since flutter build aot is typically only
invoked internally by flutter itself.
2018-05-06 18:43:07 -07:00
Mikkel Nygaard Ravn
43c74341b2
Revert "Recommend upgrading to Cocoapods 1.5.0 (#17210)" (#17300)
This reverts commit c64ace84d5.
2018-05-04 20:50:01 +02:00
Mikkel Nygaard Ravn
c64ace84d5
Recommend upgrading to Cocoapods 1.5.0 (#17210) 2018-05-04 20:31:09 +02:00
Todd Volkert
be09a200ee
Expose generateTestBootstrap() as public API in test harness (#17290)
This will allow external tools that wrap our test harness to share the
code that generates the test bootstrap.

This change exposed an issue whereby the LocalGoldenFileComparator
was being too strict in its URI handling, so this changes relaxes
that constraint as well (and adds associated tests).
2018-05-04 10:31:53 -07:00
Todd Volkert
d820e5f3b1
Use deprecated io constants (#17278)
The new values are not ready for use yet inside Google
2018-05-03 22:27:29 -07:00
Chris Bracken
cdbdafa8f3
Rerun pod install on changed Xcode project, Podfile (#17274)
If the developer changes their Xcode build settings and their project
has plugins, pod install is required, (e.g. to pick up changes to the
target architecture).

Similarly, manual edits to the Podfile should trigger a pod install.
2018-05-03 19:40:16 -07:00
Yegor
b2c98f9a4e
Roll engine to e976be13c51448f89107d082ec81e2b6731671fa (#17266)
* Roll engine to e976be13c51448f89107d082ec81e2b6731671fa

* move away from deprecated constants
2018-05-03 19:24:48 -07:00
Chris Bracken
66c7b6a935
Add Fingerprinter class (#17255)
Adds a Fingerprinter utility class that can be used to compute unique
fingerprints for a set of input paths and build options, compare to the
output of a previous run, and skip the build action if no inputs or
options have changed. The existing Fingerprint class still does all the
heavy lifting. Fingerprinter adds common operations such as
reading/writing/comparing fingerprints and parsing depfiles.

This migrates existing uses of Fingerprint over to Fingerprinter.

This also adds better fingerprinting to AOT snapshotting, which
previously failed to include several options in its fingerprint
(--preview-dart-2, --prefer-shared-library).
2018-05-03 17:31:37 -07:00
Todd Volkert
65079ad5f2
Add Flutter-repo-specific golden comparator (#17205)
In order to avoid checking binaries into flutter/flutter,
this comparator can be used to retrieve golden files from
a sibling flutter/goldens repository.

https://github.com/flutter/flutter/issues/16859
2018-05-03 07:39:41 -07:00
Todd Volkert
29775f74fb
Handle pubspec.yaml files with no dependencies (#17195)
Currently, `flutter update-packages --force-upgrade` will
crash if it encounters a pubspec.yaml file with no dependencies
(either regular or dev). The assumption that we'd never see
such pubspec files is no longer valid, as we have such a file
in one of our tests.
2018-05-02 21:03:37 -07:00
Vyacheslav Egorov
f6fb982d5c
Fix strong mode issue in _PosixUtils._which. (#17192)
ProcessResult.stdout has static type dynamic so for
inference to infer proper type argument for the map
invocation we need to cast stdout to String explicitly.

Fixes #17163
2018-05-02 17:49:30 +02:00
Chris Bracken
802301e16f
Extract shared library build from AOT snapshotting (#17166) 2018-05-01 15:14:20 -07:00
Chris Bracken
c77ceb01be
Eliminate unnecessary params in assembly AOT (#17164)
Previously, we were incorrectly passing --vm_snapshot_data and
--isolate_snapshot_data options to gen_snapshot in assembly AOT builds.
These only make sense in AOT blob snapshot mode (alongside
--vm_snapshot_instructions and --isolate_snapshot_instructions).
2018-05-01 13:20:02 -07:00
Chris Bracken
42ed01522d
Split Snapshotter into AOT and Script classes (#17159)
There's very little code-sharing between the two, and what little there
is is concentrated in the GenSnapshotClass and the fingerprint
reading/writing utility methods.
2018-05-01 12:42:05 -07:00
Todd Volkert
28c1973340
Add support for flutter_test_config.dart (#17141)
This enables support for a `flutter_test_config.dart` configuration file,
which will be discovered and handed the responsibility of running the
test file (thus allowing it to run pre-test setup on a project level).

https://github.com/flutter/flutter/issues/16859
2018-05-01 12:36:22 -07:00
Chris Bracken
064d2f4281
Simplify split between assembly/blob AOT compile (#17157)
This de-duplicates assembly AOT configuration between Android and iOS,
and makes it easier to adjust parameters for 32-bit iOS (which, like
32-bit Android, requires --no-integer-division) in an upcoming patch.
2018-05-01 10:50:35 -07:00
Chris Bracken
23adf0085b
Eliminate hardcoding of no-sim-use-hardfp (#17147)
This is now derived automatically from the target platform by
gen_snapshot.
2018-05-01 09:55:23 -07:00
Chris Bracken
68a1e2f7aa
Simplify iOS debug build (#17145)
iOS debug builds always run in interpreted mode whether on device or on
simulator. In both cases, we can skip snapshotting and link against an
empty App.framework. Previously, we did this for iOS simulator builds.
This does the same for device builds.

Previously, debug iOS builds used gen_snapshot to generate a core
snapshot, then used 'xxd' to generate C files containing the snapshot
data in buffers named kDartVmSnapshotData and kDartIsolateSnapshotData,
which are then compiled/linked into App.framework. This is unnecessary
since the VM compiled into Flutter.framework already contains this data.
2018-04-30 19:51:30 -07:00
Chris Bracken
c3d43ef4a7
Improve AOT snapshot input verification + cleanup (#17144)
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.

Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
  narrower scope where possible.

This relands #17136, which was reverted in #17142 due to breakage in
on-device iOS debug builds.
2018-04-30 19:15:09 -07:00
Chris Bracken
d19bdc4339
Revert "Improve AOT snapshot input verification + cleanup (#17136)" (#17142)
This reverts commit 100be23a34.
2018-04-30 17:34:36 -07:00
Chris Bracken
100be23a34
Improve AOT snapshot input verification + cleanup (#17136)
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.

Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
  narrower scope where possible.
2018-04-30 16:47:03 -07:00
Chris Bracken
98ec321ad6
Merge two large switch blocks in AOT snapshotting (#17123)
No functional changes. Merges two platform switch statements and
eliminates an iOS-specific local.
2018-04-30 13:37:45 -07:00
Todd Volkert
e19db89a0e
Add basic support for golden image file testing (#17094)
* Add a `matchesGoldenFile()` async matcher that will match
  a finder's widget's rasterized image against a golden file.
* Add support for pluggable image comparison backends
* Add a default backend that does simplistic PNG byte
  comparison on locally stored golden files.
* Add support for `flutter test --update-goldens`, which will
  treat the rasterized image bytes produced during the test
  as the new golden bytes and update the golden file accordingly

Still TODO:

* Add support for the `flutter_test_config.dart` test config hook
* Utilize `flutter_test_config.dart` in `packages/flutter/test`
  to install a backend that retrieves golden files from a dedicated
  `flutter/goldens` repo

https://github.com/flutter/flutter/issues/16859
2018-04-30 10:35:56 -07:00
Mikkel Nygaard Ravn
7a0ebad092
Revert "Flutter tools recommend using Cocoapods 1.5.0 (#16971)" (#17110)
This reverts commit 6e26cc28ba.
2018-04-30 11:45:58 +02:00
Mikkel Nygaard Ravn
6e26cc28ba
Flutter tools recommend using Cocoapods 1.5.0 (#16971) 2018-04-30 11:24:09 +02:00
Chris Bracken
cdbb2385f1
Extract kernel compile from buildAotSnapshot (#17062)
Moves the kernel compile step to the beginning of the AOT build in a
separate method. This is pre-factoring for iOS universal builds where
the kernel build happens once, but we then snapshot twice: once for
armv7 and once for arm64.

This also writes dependencies to build/kernel_compile.d rather than
build/aot/snapshot.d, since that is immediately overwritten by
gen_snapshot.
2018-04-29 10:47:34 -07:00
Chris Bracken
fe0de001d9
Eliminate unnecessary buildAotSnapshot parameter (#17056)
This isn't user-specifiable through a flag, so no need to pass it as a
parameter.
2018-04-27 15:51:07 -07:00
Chris Bracken
549acac655
Improve AOT build fingerprinting (#17053)
This is a simple refactoring with no functional changes. We now reuse
the existing _isBuildRequired() and _writeFingerprint() functions and
share them with script snapshotting rather than reimplementing their
logic.

Changes the signatures of both to support multiple output files (as
required for AOT snapshotting).
2018-04-27 13:03:40 -07:00
Chris Bracken
972a9e915a
Fix AOT snapshotting depfile path (#17050)
Fixes a bug introduced in 82f969ff05 where
the depfile used for AOT snapshotting, useful in particular for skipping
gen_snapshot when inputs/outputs haven't changed since the last build.
2018-04-27 13:03:26 -07:00
Konstantin Scheglov
31156aed43
We can launch if the flutter-tester device is enabled. (#17019) 2018-04-27 09:33:42 -07:00
Chris Bracken
c38ac4480c
Eliminate unnecessary AOT build wrapper function (#17027)
Inlines the buildAotSnapshot function, which simply passes through its
arguments to Snapshotter.buildAotSnapshot.
2018-04-26 19:03:33 -07:00
Chris Bracken
ebcd08c6ef
Eliminate build aot --interpreter flag (#17025) (#17033)
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.

This re-lands 8c4f0c0d21 with a fix to
xcode_backend.sh to eliminate the use of --interpreter.
2018-04-26 17:25:23 -07:00
Chris Bracken
e3247a3629
Revert "Eliminate build aot --interpreter flag (#17025)" (#17032)
Requires a fix to xcode_backend.sh. Will followup momentarily with that
fix.

This reverts commit 8c4f0c0d21.
2018-04-26 16:30:16 -07:00
Chris Bracken
8c4f0c0d21
Eliminate build aot --interpreter flag (#17025)
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
2018-04-26 16:07:10 -07:00
Chris Bracken
82f969ff05
Move AOT snapshotting to Snapshotter class (#17015)
This moves AOT snapshotting out of build_aot.dart and into the
Snapshotter class. It also adds unit tests for iOS debug, profile, and
release builds.
2018-04-26 14:37:39 -07:00
Chris Bracken
9765f0af00
Extract Xxd class for iOS AOT snapshotting (#17006)
This fixes and re-lands 4bb7496b62, which
was reverted in ceade39c83 due to test
failures caused by a bad rebase.
2018-04-26 08:32:51 -07:00
Todd Volkert
ceade39c83
Revert "Extract Xxd class for iOS AOT snapshotting (#16986)" (#17003)
This reverts commit 4bb7496b62.
2018-04-26 07:11:06 -07:00
Chris Bracken
4bb7496b62
Extract Xxd class for iOS AOT snapshotting (#16986)
Allows for better mockability when tests are added.
2018-04-25 22:16:59 -07:00
Todd Volkert
dcf05afca1
Add some trace statements to flutter_tools (#16990) 2018-04-25 21:33:25 -07:00
Chris Bracken
cd90a1ed73
Use File.rename instead of mv to move AOT outputs (#16985)
This allows for testing with MemoryFileSystem, when tests are added.
2018-04-25 20:50:53 -07:00
Chris Bracken
2689560b72
Add Xcode.cc, Xcode.clang methods for iOS builds (#16974)
Makes for easier mocking, particularly for testing AOT snapshot build.
2018-04-25 20:50:16 -07:00
Devon Carew
647c57dabd
update the build complete message to not include APK sizes for debug builds (#16931) 2018-04-25 20:38:33 -07:00
Michael Goderbauer
1d915bacc0
Roll engine to 9859af123eb383ade52208a9db58ac39db84bfc2 (#16947)
flutter/engine@9859af1 Roll dart to 29d6e963702fcbb0ed0d5ca67d6b5f977ac0c328
2018-04-25 10:25:03 -07:00
josephmr
7f9bf5ade9 Introduce DoctorValidatorsProvider to improve extensibility of flutter_tools (#16918)
DoctorValidatorsProvider is injected into Doctor to allow
overriding of DoctorValidators without needing to override
the whole Doctor instance.
2018-04-24 19:01:53 -07:00
xster
00221820df
Remove the initial xcodebuild clean step which seems unnecessary (#16475) 2018-04-24 18:17:24 -07:00
Chris Bracken
4ad190e74f
Make CompilerOutput immutable (#16942)
CompilerOutput values should never be mutated. Also includes minor
formatting change to the compile() method signature in line with the
style guide.

Minor housekeeping while I'm touching other bits of nearby code.
2018-04-24 16:48:04 -07:00
Chris Bracken
7ffcd3d22d
Extract KernelCompiler class (#16937)
Wraps the compile function in a class injected via the global context,
which makes it easier to mock in unit tests -- specifically tests for
AOT snapshotting, which already require pretty significant amounts of
mock inputs.
2018-04-24 14:03:41 -07:00
Alexander Aprelev
a21c93dd70
Fix boolean flag parsing in gradle. Track 'trackWidgetCreation' as property of the build. (#16901) 2018-04-24 09:51:25 -07:00
Zachary Anderson
c7ee37a0d8
[fuchsia] Pass a dummy command to the ssh tunnel setup (#16906)
* [fuchsia] Pass a dummy command to the ssh tunnel setup

* Address analyzer lint

* Update fuchsia_remote_debug_protocol
2018-04-23 21:26:51 -07:00
Alexander Aprelev
b1330eff5f
Fail test execution if compiler reported errors. (#16895)
Fixes https://github.com/flutter/flutter/issues/16496
2018-04-23 17:08:11 -07:00
Yegor
d354096299
a11y traversal: sort locally; use new sorting algorithm (#16253)
New a11y traversal:

- sort direct sibling SemanticsNodes only
- use new sorting algorithm
- implement RTL
- test semantics in traversal order by default
- add AppBar traversal test
- breaking: remove nextNodeId/previousNodeId from the framework
- breaking: remove DebugSemanticsDumpOrder.geometricOrder
2018-04-23 14:23:49 -07:00
Chris Bracken
b5af0a9114
Use GenSnapshot class for AOT snapshotting (#16891)
This replaces the existing manual invocation with the GenSnapshot class,
which allows for better configuration and testability.
2018-04-23 11:21:19 -07:00
PJ Essien
fd7222eea8 Fix error with 'flutter packages get' in package projects (#16861)
Package projects were erroneously being treated as apps
2018-04-22 18:03:46 -07:00
Todd Volkert
fb18ac650e
Notify test timeouts differently than test completions. (#16842)
This avoids notifying the coverage collector that we
completed the test when in fact we timed out, which in
turn avoids a downstream exception caused by the fact
that coverage collector assumes it has a valid observatory
port by which it can gather coverage data.

Fixes https://github.com/flutter/flutter/issues/16839
2018-04-21 19:52:46 -07:00
Devon Carew
f544f4d1c7
have flutter flormat use the sdkBinaryName method (#16752) 2018-04-21 08:29:07 -07:00
Devon Carew
36cf1158ec
add the full path to a flutter command (#16720)
* add the full path to a flutter command

* remove an unused import

* review comments
2018-04-20 17:39:32 -07:00
Michael Goderbauer
4f31a3f518
Revert "Enable sync-async" (#16825) 2018-04-20 16:33:07 -07:00
Yegor
ee735c4f25
Be specific about which exceptions are retried (#16818) 2018-04-20 14:45:50 -07:00
Mikkel Nygaard Ravn
315993efb3
Enable sync-async (#16790) 2018-04-20 14:49:33 +02:00
Todd Volkert
12bbaba9ae
Do exponential backoff for all exceptions in VMService::defaultOpenChannel. (#16785)
We were trying to only catch WebSocketException, but in fact
SocketException can be thrown as well.
2018-04-19 23:36:15 -07:00
Devon Carew
6a82b1044a
use the --dart-sdk parameter to flutter analyze if passed in (#16751) 2018-04-19 18:44:46 -07:00
Yegor
85473d0941 retry VMService connection; expect missing PRODUCT_BUNDLE_IDENTIFIER (#16770)
Fixes #13655
2018-04-19 18:29:49 -07:00
Chris Bracken
cf5778810b
Move script snapshot argumtents to Snapshotter (#16722)
This moves --vm_snapshot_data and --isolate_snapshot_data argument
hardcoding from GenSnapshot (a minimal wrapper around gen_snapshot
invocations) to Snapshotter.buildScriptSnapshot(). These arguments are
present in both AOT and script snapshots, but differ semantically: for
script snapshots they're inputs from the host engine artifacts
directory, for AOT snapshots they're outputs to the build directory.
2018-04-19 16:03:07 -07:00
Chinmay Garde
48ab8648bf
On simulators, don't pass file paths to the engine that done exist. (#16756) 2018-04-19 12:42:56 -07:00
Todd Volkert
ec7b46e30b
Add stack trace to exception logs in flutter_platform (#16715) 2018-04-18 12:09:16 -07:00
Todd Volkert
3a0aabc37b
Add docs to VMService.onEvent() (#16711) 2018-04-18 09:24:52 -07:00
Mikkel Nygaard Ravn
1080c29832
Roll engine to c73be7ada2e1066e2a6f04f0541406409c2bfa6b (#16707) 2018-04-18 13:51:58 +02:00
Alexander Aprelev
09ca3c187d Fix the way how stream event subscription is handled. (#16698) 2018-04-18 10:21:33 +02:00
Todd Volkert
c7df2619d7
Run test harness finalizers in reverse order. (#16664)
Finalizers handle the restoration of state. In order to restore
the state correctly, they shouyld be run in LIFO order.

Fixes #16657
2018-04-17 07:38:30 -07:00
Mikkel Nygaard Ravn
10cf0cedad
Revert "Roll engine to 1bc0e1bb9a8db882a21086096cc2b1e0854312b7 (#16643)" (#16661) 2018-04-17 12:40:02 +02:00
Todd Volkert
dd32d1b179 Roll engine to 1bc0e1bb9a8db882a21086096cc2b1e0854312b7 (#16643)
* Roll engine to d6d4eec24c38bb06a9b1aef4e70c321d447ba762

Contains the following engine commits:

flutter/engine@1bc0e1b On windows, refer to Dart snapshot directly executable.
flutter/engine@cf6ca32 Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79"
flutter/engine@4b45a53 Only make ERROR and FATAL log levels visible by default.
flutter/engine@98f6c2d Fix shell launcher test (dart2 compliant and stop polling)
flutter/engine@75851f0 Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79
flutter/engine@9495a52 On iOS, try to use ES3, then fall back to ES2.
flutter/engine@d6d4eec Fix broken Linux build
flutter/engine@d15dc76 Fix broken Chromebot build
flutter/engine@c17a629 Breadcrumbs to the wiki
flutter/engine@4eaf2c2 Return raw (unencoded) bytes in Image.toByteData()
flutter/engine@d812a61 Roll src/third_party/skia/ e669bdfad..276886160 (9 commits)
flutter/engine@62aeab7 Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain.
flutter/engine@f4ebb18 Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits)
flutter/engine@0b7d6be Re-land "do not pause rendering when android view loses focus"
flutter/engine@91dee59 If the rasterizer has a valid surface context, use that to create a snapshotting render target.
flutter/engine@570231b Specify the packages file path when running engine dart tests.
flutter/engine@0b9cef5 Minor update to README
flutter/engine@c386418 Promote line height in text style created from paragraph style
flutter/engine@4e0fbb6 If the test specifies a .dill file, dont make the engine interpret is as source.
flutter/engine@58e84c8 Re-land "Support multiple shells in a single process.
flutter/engine@37e5df0 Remove only use of SkPaint::kGenA8FromLCD
flutter/engine@b7358b3 libtxt: cache font families that are remapped to the default font family
flutter/engine@a530035 libtxt: fix leaks in Skia object reference counting
flutter/engine@0c74fc9 [fuchsia] Fix use-after-free
flutter/engine@b6d2dde [fuchsia] Fix build
flutter/engine@1dd1264 [async] Adapt to libasync API changes.

* Run test platform finalizers in reverse order to ensure that shell is shutdown before trying to delete any temporary files or directories. This fixes "Access Denied" error on Windows (see #16657).
2018-04-17 11:52:00 +02:00
Todd Volkert
c83d24d547
Always add a DevFS asset entry for the font manifest (#16650)
The engine expects it to always be there.
2018-04-16 21:48:21 -07:00
Alexander Aprelev
9e0a6107fa
Support local-engine option for flutter_tester on Windows. (#16648) 2018-04-16 20:40:52 -07:00
jcollins-g
85be28d36b
Add catch for SocketException and tests for exception handling on fetchUrl. (#16569) 2018-04-16 14:02:07 -07:00
Jacob Richman
ab9ba3f909
Support exposing the InspectorService over the Flutterservice extension protocol as well as the observatory protocol. (#15876)
* Support exposing the InspectorService over the Flutter
service extension protocol as well as the observatory protocol.

We will probably remove most of the observatory protocol support once a
couple versions of the Flutter IntelliJ plugin have shipped that use the
Flutter service extension protocol. The only reason to continue supporting
the observatory protocol is it will allow using the inspector when paused
at a breakpoint.
2018-04-16 10:04:40 -07:00
Siva
7dd166fac5
Revert "Turn support for sync-async on in Flutter. (#16543)" (#16626)
This reverts commit b0b2c0077a.
2018-04-16 09:54:47 -07:00
Siva
b0b2c0077a
Turn support for sync-async on in Flutter. (#16543)
* Turn support for sync-async on in Flutter. With this feature
execution of async functions starts immediately instead of it
being delayed by one microtask tick.

* Address review comments.

* Adjust some stack trace expectations which are slightly different with
--sync-async turned on.
2018-04-16 08:44:38 -07:00
Alexander Aprelev
ea30c95dc9
Report RpcException error thrown by _reloadSource vmservice rpc. (#16417)
* Don't return null, just rethrow RpcException error when vmservice responds with error.
2018-04-13 17:02:14 -07:00
Hans Muller
fb0ab99d6f
Remove Number.tryParse() straggler (#16570) 2018-04-13 11:15:33 -07:00
Hans Muller
e7154bee1a
Remove the rest of the uses of Number.tryParse() (#16568) 2018-04-13 09:39:01 -07:00
Hans Muller
0260642fc5
Revert some uses of Number.tryParse() (#16546)
Revert some uses of Number.tryParse(), ignore deprecation warnings for Number.parse()
2018-04-12 19:16:44 -07:00
Konstantin Scheglov
2c183f235f
Build once in FlutterTesterDevice. (#16457) 2018-04-12 19:01:55 -07:00
Alexander Aprelev
e0cd42e4ad Roll engine to 76cb311d9c33720dcd19274228b39ecdbad8d9af (with rolled dart) (#16518)
* Handle error count reported by frontend.

Extend compilation result from single string to a structure(string filename and integer error count).

* Use ?.

* Include engine roll with dart sdk roll.

* parse(onError) -> tryParse

* Make '?? throw' more readable and avoid issue with analyzer

* Fix test so it mocks compiler output including errors count
2018-04-12 16:28:01 -07:00
Siva
dbddcf26b5
Turn off unused changes report during hot reload (#16520)
* A new UI is being designed to make the unused reload messaging clearer,
the UI will use the coverage data to highlight lines in the UI that were not executed during a reload.

In lieu of that we are turning off the unused reload messages experiment.

There were some issues in Dart2 also with this functionality
- source fingerprinting is not implemented in Dart2
- some additional synthetic functions are generated for invocation argument checking that are not appropriately filtered out.
2018-04-12 14:24:10 -07:00
Sarah Zakarias
4443e4d4cf
Cleanup FLX related code (#16416) 2018-04-12 10:12:26 +02:00
Mikkel Nygaard Ravn
1ba4336494
Require Cocoapods 1.5.0 (#16443) 2018-04-12 06:23:14 +02:00
Alexander Aprelev
da9e1a4aca
Introduce fingerprint check for preview-dart-2 build flx. (#16484)
* Introduce fingerprint check for preview-dart-2 build flx.

* Don't count outputs into fingerpint. Refactor compilation code.
2018-04-11 20:50:25 -07:00
Chris Bracken
b4d57553c8
Simplify script snapshotting code (#16478)
Inlines the very small amount of work being done in _build() into
buildScriptSnapshot(). Eliminates a duplicate (and un-awaited) call to
_writeFingerprint.
2018-04-11 16:53:32 -07:00
Devon Carew
071485258f
Revert "re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server (#16281)" (#16482)
This reverts commit 2f41ea546f.
2018-04-11 16:49:38 -07:00
Devon Carew
2f41ea546f
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server (#16281)
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server
2018-04-11 14:50:36 -07:00
Alexander Aprelev
4c221231c9
Sync .packages file as a normal input file. (#16467)
* Sync .packages file as regular file.

Currently .packages file is treated specially as DevFSStringContent to accommodate package-file rewrite when it is sent to the device for dart1 compilation. In dart2 we need to treat .packages as regular file because from frontend perspective it's just a normal input file.
2018-04-11 14:48:14 -07:00
Xiao Yu
3923ccf655 Revert 9749bea7b9. Accidentally pushed to flutter instead of fork repo for PR.
This reverts commit 9749bea7b9.
2018-04-11 13:54:06 -07:00
Xiao Yu
9749bea7b9 Remove the initial xcodebuild clean step which seems unnecessary 2018-04-11 13:52:04 -07:00
Konstantin Scheglov
cf500bf6cd
Integration test for FlutterTesterDevice. (#16424) 2018-04-11 08:52:17 -07:00
Konstantin Scheglov
38970f5f75
Add a new Device backed by flutter_tester. (#16405) 2018-04-10 09:37:16 -07:00
Chris Bracken
4576f56624
Run iOS gen_snapshot as x86_64 arch (#16323)
We are about to begin building gen_snapshot as a multi-arch binary,
which when run as x86_64 will generate arm64 AOT output, and when run as
i386 will generate armv7 AOT output.

Currently, gen_snapshot is an x86_64 binary, so this change is
effectively preventative in nature, and is a no-op with the current
snapshotter.
2018-04-09 19:12:05 -07:00
Ian Hickson
44fbf7463b
Minor code cleanup (#16237) 2018-04-09 16:33:47 -07:00
Sam Rawlins
2329cb7ec8 Bump mockito to 3.0.0-alpha+3 (#16306)
* Bump mockito to 3.0.0-alpha+3

* Type annotation
2018-04-09 12:43:31 -07:00
Todd Volkert
d9a3ced9db
Check whether we can run sdkmanager in AndroidWorkflow.licensesAccepted (#16343)
Fixes https://github.com/flutter/flutter/issues/16332
2018-04-09 08:57:11 -07:00
xster
bdc06194fb
Prompt a solution message when flutter tools network fail in China (#16244) 2018-04-06 18:44:05 -07:00
Zachary Anderson
d6d874474b
[fuchsia] Fixes for Fuchsia hot reload (#16317) 2018-04-06 13:23:16 -07:00
Jason Simmons
24bfbeb246
Handle whitespace in entry values in the AAPT badging parser (#16245)
Fixes https://github.com/flutter/flutter/issues/16200
2018-04-05 10:24:05 -07:00
Jonah Williams
5125c43247
re-enable verify only test failure and update deps. (#16090)
* re-enable verify-only failing test for out of sync deps and update deps to latest version
2018-04-04 10:52:46 -07:00
Konstantin Scheglov
4658ec0f9c
Extract checking IntelliJ packages into a helper and use for Android Studio. (#16198) 2018-04-04 10:48:46 -07:00
xster
48478b5952
Remove DevToolsSecurity check from initial flutter doctor (#16007) 2018-04-04 10:35:38 -07:00
Todd Volkert
d4084cde7d
Revert "Adds Java EE module to SDK manager calls" (#16227)
This reverts https://github.com/flutter/flutter/pull/16035
2018-04-04 09:46:26 -07:00
Devon Carew
13bafba994
add a period after xcode build done (#16209) 2018-04-04 07:22:58 -07:00
Luke
0c18d29643 Adds Java EE module to SDK manager environment to stop missing xml library exception when checking for licenses. (#16035) 2018-04-02 23:06:28 -07:00
Jonah Williams
0c89920069
Update logic for parsing sdk version number (#15918)
* add logic to parse 11.3 sim runtime major version

* add null aware and bump group number

* add comment describing version
2018-04-01 17:35:05 -07:00
Todd Volkert
8d6673dcf0
Revert "Make sure flutter update-packages --verify-only has a non-zero exit code (#15962)" (#16089)
This reverts commit cfda7a6548.
2018-03-29 21:34:31 -07:00
Jonah Williams
cfda7a6548
Make sure flutter update-packages --verify-only has a non-zero exit code (#15962)
* make sure --verify-only logs error messages and fix typo

* ensure non zero exit code

* undo random pubspec change
2018-03-29 20:34:49 -07:00
Jason Simmons
b4274ef685
URL encode asset paths to support reserved characters in paths (#16046)
Fixes https://github.com/flutter/flutter/issues/14864
2018-03-29 13:47:35 -07:00
Todd Volkert
f69d125954
Move Cache.flutterRoot initialization up sooner (#16057)
It's required to be set before we detect local engine.

Was broken by #15984
2018-03-29 09:16:34 -07:00
Ralph Bergmann
895707324d improve Flutter build commands (#15788)
add --buildNumber and --buildName to flutter build like
flutter build apk --buildNumber=42 --buildName=1.0.42
2018-03-29 05:58:31 -07:00
Todd Volkert
2c898f6813
Remove writelnStderr (#16058)
Paying off technical debt...
2018-03-29 05:55:32 -07:00
xster
4565395693
Let iOS auto-signing tool handle Googler scenario (#16010)
* Let iOS auto-signing tool handle Googler scenario

* Forgot to update tests
2018-03-28 18:58:06 -07:00
Todd Volkert
f8058d7fb2
Make AppContext API not be prone to Future oddities (#16034)
Follow-up comments to #15984
2018-03-28 15:17:29 -07:00
Alexander Aprelev
bffae21571
Again move mockito to 300plus2 (#15981)
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"

This reverts commit e59651f925.

* More thenReturn to thenAnswer when mocking Futures

* Revert "More thenReturn to thenAnswer when mocking Futures"

This reverts commit 194d2cf417 as we are reverting engine roll.

* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""

This reverts commit 52c9e96b30.

* Add dependency override

* Fix issue
2018-03-28 12:07:12 -07:00
Todd Volkert
8d11f5c763
Make AppContext immutable and race-free (#15984)
This updates AppContext per the recommendations in #15352

Fixes #15352
2018-03-28 10:58:28 -07:00
Alexander Aprelev
af74a7253b
Send relative uri when target physical file path is specified. (#15887) 2018-03-23 19:18:39 -07:00
Alexandre Ardhuin
217b2bdaa1
add new lints of linter-0.1.44 and enable unnecessary_parenthesis (#15585) 2018-03-21 07:10:14 +01:00
Jonah Williams
ad9506d25a
Traverse dependencies and dev dependencies separately (#15581)
* traverse dependencies and dev dependencies separately

* separate dev and reg deps

* update pubspecs

* add checksum string and update transitive dep string.  Add additional verify command to check checksum

* cleanup comments

* add missing space, quote, run verify-onlu from bot script

* rerun tool with fixed string

* ensure correct working directory and bump versions

* flutter not flutterRoot
2018-03-20 20:03:32 -07:00
Mikkel Nygaard Ravn
8b25d4eadb
Add missing awaits (#15595) 2018-03-21 00:44:19 +01:00
Vyacheslav Egorov
3352a3fb48 Report an error if compilation during testing times out. (#15745)
* Report an error if compilation times out instead of waiting forever.

* Remove braces
2018-03-20 11:30:06 -07:00
Siva
821c9b35a1
Roll engine to version 6280adbfb1f9f63cdc6179b9b78634add1e4f2e3 (#15729)
* roll engine version to 6280adbfb1f9f63cdc6179b9b78634add1e4f2e3

* Correctly handle previewDart : false setting in AnalysisServer and
AnalyzeOnce classes.
2018-03-20 11:15:05 -07:00
Alexandre Ardhuin
cc1cf9e12a
apply upcomming lint avoid_renaming_method_parameters (#15526) 2018-03-20 12:53:41 +01:00
Vilk
568ce697b4 add Samsung SM-J730F to isLocalEmulator (#15517)
Add another rel device to isLocalEmulator to make working flutter run --release
2018-03-19 21:40:34 -07:00
Jason Simmons
1c04f951c8
Warn about missing host build binaries when compiling with a local engine (#15626)
Fixes https://github.com/flutter/flutter/issues/15361
2018-03-19 11:29:20 -07:00
Alexander Aprelev
6acf76f7be
Use uris for hot reload invalidation. (#15698)
* Use uris for hot reload invalidation.

* Clean up unneccessary conversions

* add final.

* Revert sample change
2018-03-19 11:17:16 -07:00
Jonah Williams
91dcfc5dd2
stderr can be null or empty string (#15701) 2018-03-19 10:53:04 -07:00
Alexander Aprelev
43284d70d9
Reland filesystem options support with fix for Windows test. (#15655)
* Revert "Revert "Reland pass filesystem options (#15622)" (#15651)"

This reverts commit 0f3eada066.

* Fix for windows failing test

* !isEmpty -> isNotEmpty
2018-03-17 12:47:40 -07:00
Jonah Williams
298f4efc54
Fail ios workflow when simctl does not work (#15628)
* fail ios workflow when simctl does not work

* missed rename commit

* address comments
2018-03-17 10:57:51 -07:00
Alexander Aprelev
0f3eada066
Revert "Reland pass filesystem options (#15622)" (#15651)
This reverts commit bbcf55a5b0 as it breaks hot reload on Windows.
2018-03-17 08:11:52 -07:00
Alexander Aprelev
bbcf55a5b0
Reland pass filesystem options (#15622)
* Revert "Revert "Pass filesystem-root, filesystem-scheme options through `flutter run, build` and gradle. (#15592)" (#15621)"

This reverts commit c663e3367d.

* Check whether filesystem-root is emtpy.

* Restore broken merge

* Fix windows test

* Adjust regex in test. Invalidate files by file path.
2018-03-17 06:49:15 -07:00
Vyacheslav Egorov
71b2cfb2a0
Turn Dart 2 mode by default. (#15565) 2018-03-16 20:29:38 +01:00
Alexander Aprelev
c663e3367d
Revert "Pass filesystem-root, filesystem-scheme options through flutter run, build and gradle. (#15592)" (#15621)
This reverts commit 0f659fb10b as it
breaks bin/tasks/gradle_plugin_test.dart.
2018-03-16 12:28:30 -07:00
Alexander Aprelev
0f659fb10b
Pass filesystem-root, filesystem-scheme options through flutter run, build and gradle. (#15592)
* Pass filesystem-root, filesystem-scheme options through flutter run/build/gradle.
2018-03-16 11:16:54 -07:00
Keerti Parthasarathy
50190d2810
Do not encode the server port in the test file (#15535)
* Do not encode the server port in the test file

* revert formatting

* add back ignore

* add a default value to serverPort

* address comments
2018-03-15 10:56:10 -07:00
Alexandre Ardhuin
7667db6362
apply upcomming prefer_const_declarations (#15498) 2018-03-14 06:24:49 +01:00
Jonah Williams
d682259eab
Use a set to remove duplicate channel names (#15392)
* Use a set to remove duplicate channel names

* Add test for git command
2018-03-12 17:04:02 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Alexandre Ardhuin
3961306bad enable lints prefer_const_declarations and prefer_const_literals_to_create_immutables (#14848) 2018-03-09 14:37:06 -08:00
Jason Simmons
96ce9d64ac
Add more package names to the flutter create conflict list (#15350)
Fixes https://github.com/flutter/flutter/issues/12445
2018-03-09 13:11:33 -08:00
Todd Volkert
2e970008ad
Pass --verbose to pub instead of --trace when in verbose mode (#15314) 2018-03-09 12:55:06 -08:00
Yegor
2e429bfbdd
[tools] add Stdio to AppContext created by daemon AppInstance (#15268) 2018-03-09 12:25:30 -08:00
Alexander Aprelev
ded538a1bb
Update dependencies with forced upgrade. (#15344)
* Update dependencies with forced upgrade.

Now that https://github.com/flutter/flutter/issues/15261 is fixed, do the update with upgrade.

* Update test package use following upgrade

* Replace addOption(allowMultiple) with addMultiOption
2018-03-09 10:38:54 -08:00
Jonah Williams
4ace88bfc0
fix spacing issue and add test for supportsHardwareRendering (#15305)
* fix spacing issue and add test for supportsHardwareRendering

* remove extra async tag

* move spacing to prev line
2018-03-09 09:30:13 -08:00
Jacob Richman
046c6d5f7f
Track which Widget objects were created by the local project. (#15041)
Make flutter test support the --track-widget-creation flag.
Add widget creation location tests. Tests are skipped when
--track-widget-creation flag is not passed.
2018-03-09 08:09:49 -08:00
Alexander Aprelev
2890e18bcb
Return copied kernel filename for flutter test execution. (#15298)
* Return copied kernel filename.

This fixes 'flutter test --preview-dart-2' crash.
2018-03-08 16:02:21 -08:00
Alexander Aprelev
1087279a4d
Create frontend compiler in flutter test lazily. (#15251)
* Create frontend compiler in `flutter test` lazily.

This is needed to avoid unwarranted runtime dependencies on Artifacts,
for example when in non-preview-dart-2 mode.
Refactor the compilation-related code into _Compiler class.
2018-03-08 11:21:40 -08:00
Jonah Williams
afabdfecf9
Display a message if hardware rendering is supported (#15266)
* add device.supportsHardwareRendering and display a message if true

* Address some comments
2018-03-08 10:41:29 -08:00
Alexander Aprelev
69c33a321a
Fix path to uri conversion. (#15264) 2018-03-08 10:25:27 -08:00