Commit Graph

2524 Commits

Author SHA1 Message Date
Devon Carew
e816f64bf2
remove the option to pass in the --no-preview-dart-2 flag to analysis (#20041)
remove the option to pass in the --no-preview-dart-2 flag to analysis
2018-07-31 19:15:11 -07:00
Ian Hickson
acf4b6c1aa
Clean up startProgress logic. (#19695) (#20009)
Disallow calling stop() or cancel() multiple times. This means that
when you use startProgress you have to more carefully think about what
exactly is going on.

Properly cancel startProgress in non-ANSI situations, so that
back-to-back startProgress calls all render to the console.
2018-07-30 16:58:07 -07:00
Stanislav Baranov
51d3daadfb
Change 'flutter ide-config' to optionally create root Intellij module (#19920) 2018-07-30 10:15:26 -07:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Jonah Williams
9c159638bc
Revert "Clean up startProgress logic. (#19695)" (#19842)
This reverts commit 0636c6fe60.
2018-07-26 16:44:27 -07:00
Ian Hickson
0636c6fe60
Clean up startProgress logic. (#19695)
Disallow calling stop() or cancel() multiple times. This means that
when you use startProgress you have to more carefully think about what
exactly is going on.

Properly cancel startProgress in non-ANSI situations, so that
back-to-back startProgress calls all render to the console.
2018-07-26 14:02:25 -07:00
Leaf Petersen
70791c3087
Roll pubspec forward to new json_schema, matcher and vector_math (#19802)
Pull in new versions of packages with fixes for SCREAMING CAPS CONSTANTS.
2018-07-26 12:23:24 -07:00
Paweł Polański
da0e898da9 Added SM-G960F to the list of known physical devices (#18966)
Samsung Galaxy S9 is not an emulator and installation of
the release packages with 'flutter run --release' should be possible.
2018-07-24 16:39:23 -07:00
moznion
46da8536b6 Add some options to format subcommand (#18360)
* Add `--dry-run` option to `flutter format` sub command

* Add `--set-exit-if-changed` option to `format` sub command

* Add `--machine` option to `format` sub command

* Make variable names to be not shorthand: cmd -> command

Fix https://github.com/flutter/flutter/pull/18360#discussion_r199656120
2018-07-24 16:37:00 -07:00
Todd Volkert
6258f322d4
Make Fuchsia tools Dart 2 clean (#19727) 2018-07-24 16:33:49 -07:00
Ian Hickson
b4d3808a15
Fix the checksum verification to be more sensitive (#19290)
* Fix the checksum verification to be more sensitive

* update packages
2018-07-23 13:01:22 -07:00
Gary Miguel
a7b59b51b8 Remove redundant check for platform.isLinux. (#19441)
We don't actually care if we're on linux, we care only if the lcov
tool is available. We check for that explicitly just below.
Additionally there is code below which indicates that lcov is available
for macOS. Before this change that code would never execute.
2018-07-23 08:38:20 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Leaf Petersen
32f94443cc
Remove uses of deprecated constants and change int.parse to int.tryParse (#19575)
* Remove uses of deprecated constants
* Change int.parse to int.tryParse where appropriate
2018-07-20 15:07:24 -07:00
Sarah Zakarias
f0639bb022
add more uses of FlutterProject to locate files (#19403) 2018-07-20 09:21:41 +02:00
Greg Spencer
1cc036519c
Removes trailing whitespace from source files. (#19329) 2018-07-19 23:03:58 -07:00
Sigurd Meldgaard
2d3a5c744d
Revert "Revert "Use FlutterProject to locate files (#18913)" (#19409)" (#19456)
With a fix of a path being printed relative instead of absolute.
2018-07-20 08:00:30 +02:00
Danny Tuppeny
ed9afbbc72
Add --machine support for flutter attach (#19077)
* Extract some of startApp into a reusable method

* Get basic attach --machine working

* Attach --machine tweaks

Move validation to validate method and create daemon early so we get the startup event before trying to get a connection.

* Bump daemon version so we know whether it's valid to flutter attach

* Tweak output text

* Swap package imports for relative

* Review tweaks (naming, formatting, typedefs)

* Separate arguments from process spawning

This will make calling attach easier

* Add a basic test for flutter attach --machine

* Fix crash if port unforward modifies the list of forwarded ports

* Add a no-op port forwarder for flutter-tester

* Switch to using BasicProject instead of our own inline code

* Fix expectation in test now we have a portForwarder

* Remove stale TODO (this is done)

* Tweak formatting

* Change some Completers to void to fix Dart 2 issues
2018-07-19 13:38:29 +01:00
Danny Tuppeny
442fc3cf06
Make cleanup of flutter processes in tests more reliable (#19307)
* Make cleanup of flutter processes in tests more reliable

* Fix quit signals

I confused SigInt&SigTerm for SigTerm&SigKill when I first did this. SigTerm can be blocked and doesn't guarantee the process will be terminated.

* Don't use deprecated constants

* Fix typo

* Add some additional info to debug buffer

* Fix return types on Futures
2018-07-19 11:37:40 +01:00
Danny Tuppeny
d3f6128c21
Flutter emulator launch crash running in dart-2-mode (#19454)
* Only printError on our simple messages

Any other type is a real error that should be a normal crash (to get a proper error log).

See #19453.

* Add toList() to convert Iterable<String> -> List<String>

This code previously throw in Dart-2 mode.

Fixes #19453.

* Move getSimulatorPath into Xcode

* Add a test that we tried to launch the simulator

* Remove unused import
2018-07-19 10:32:44 +01:00
Ryan Macnak
b8b6d4166c
Build snapshots with --sync-async to match the engine. (#19495)
Bug: https://github.com/flutter/flutter/issues/19494
2018-07-17 18:07:54 -07:00
Jason Simmons
ccdf078f98
Fix return types of commands that override verifyThenRunCommand (#19483)
Fixes https://github.com/flutter/flutter/issues/19465
2018-07-17 15:24:36 -07:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Sigurd Meldgaard
6a8f904104
Revert "Use FlutterProject to locate files (#18913)" (#19409)
This reverts commit 57d78cc739.
2018-07-16 16:21:20 +02:00
Sigurd Meldgaard
57d78cc739
Use FlutterProject to locate files (#18913) 2018-07-16 09:39:37 +02:00
Greg Spencer
5d0d1b038f
Add Bash and Zsh command-line completion for flutter (#19243)
This uses @kevmoo's completion package to do command line completion for flutter, and a new command "bash-completion" (with alias "zsh-completion") that will output the necessary shell script setup code, and adds the hidden command "completion" that does the actual completion.

Because it adds a dependency, I also had to do flutter update-packages --force-upgrade.

Fixes #18988.
2018-07-13 21:24:36 -07:00
Alexander Aprelev
7ebf2728dc
Revert "Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)" (#19295)" (#19322)
This reverts commit cc122f1672.
2018-07-12 14:59:22 -07:00
Alexander Aprelev
b075229d85
Preserve original kernel file for isolate spawn requests. (#18127)
* Preserve original kernel file for isolate spawn requests.

This change gives incremental kernel files ".incremental.dill" extension thereby preserving original kernel file.

Bug: https://github.com/flutter/flutter/issues/16084
Bug: https://github.com/flutter/flutter/issues/17012
Bug: https://github.com/flutter/flutter/issues/17983

* Factor out naming logic into separate function

* Fix string vs uri
2018-07-12 13:41:15 -07:00
Alexander Aprelev
cc122f1672
Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)" (#19295)
This reverts commit 700cb767c9 as it
breaks Windows tests.
2018-07-11 19:52:28 -07:00
Alexander Aprelev
700cb767c9
Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) again (#19277)
* Revert "Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)" (#19276)"

This reverts commit cf932490b7 as it also
includes fix for type error that broke tests.

* Add type cast for dart2 type checks.

* Move up to latest goldens

* Make inDirectory() type-parameterized.

* Add typecasting to transitions_perf_test.dart and microbenchmarks.

* Add boolean flag initialization in save_catalog_screenshots.dart

* Add type conversion to gallery transition test
2018-07-11 19:26:33 -07:00
Chris Bracken
379a2d5654
Push /usr/bin to front of PATH for ios-deploy runs (#19281)
ios-deploy relies on LLDB.framework, which relies on /usr/bin/python and
the 'six' module that's installed on the system. However, it appears to
use the first version of Python on PATH, rather than explicitly
specifying the system install.  If a user has a custom install of Python
(e.g., via Homebrew or MacPorts) ahead of the system Python on their
PATH, LLDB.framework will pick up that version instead. If the user
hasn't installed the 'six' module, ios-deploy will fail with a
relatively cryptic error message.

This patch pushes /usr/bin to the front of PATH for the duration of the
ios-deploy run to avoid this scenario.

This patch also removes checks for package six.

Neither Flutter nor any of its direct dependencies/tooling relies on
package six. ios-deploy depends on LLDB.framework (included with Xcode),
which relies on a Python script that imports this package but uses
whichever Python is at the front of the path. Flutter now invokes
ios-deploy with a PATH with /usr/bin forced to the front in order to
avoid this problem.

We could have retained the check out of paranoia, but this seems
unnecessary since it's entirely possible LLDB.framework may one day drop
this dependency, in which case I'd expect the base system install of
Python would likely drop it as well.
2018-07-11 17:33:06 -07:00
jslavitz
94959a340c Fixed code sign error message width (#19026)
* Fixed codesign error message width

* Fixed mac_test

* Removed snackbar code
2018-07-11 16:51:25 -07:00
Alexander Aprelev
cf932490b7
Revert "Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)" (#19276)
This reverts commit f4a038da63 as it breaks microbenchmark tests.
2018-07-11 12:48:55 -07:00
Alexander Aprelev
f4a038da63
Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717 (includes dart roll) (#19044)
* Roll engine to rolled dart
Add connectionTimeout property to class that extends HttpOverrides.
Upgrade packages.
Add more type fixes.
Update goldens hash.
Add more type fixes.
Upgrade packages.
Fix tests.
Remove strong-mode from analysis options yaml file.
Increase dev/devicelab timeout from 2 to 10 seconds.
Added getVM to waitForViews. Fix type errors in compileExpression.

* Pick up engine revision with fix for microbenchmarks regression.
Increase default timeout from 20/30 to 60s.
2018-07-11 12:13:28 -07:00
shrike69
2c070363c2
Use binary name to locate .packages file on Fuchsia (#19217) 2018-07-11 08:49:57 -07:00
Greg Spencer
2d76b465ef
Make HotRunner call pub get automatically if the pubspec is out of date. (#19183)
This adds a call to 'pub get' if the pubspec.yaml is out of date wrt the .packages file when a hot reload is requested.

Fixes #15879
2018-07-10 18:14:52 -07:00
Alexander Aprelev
acf3f3d839
Fix 'are there any views available' check (#19231) 2018-07-10 17:58:36 -07:00
Ian Hickson
b3a6eda2d1
Remove hacks that make macOs, Linux, and Windows not fail. (#19187)
They should fail, because we don't have real support yet.

Also, make the debug override work in release builds, so that people
on those platforms have a workaround.
2018-07-10 16:33:40 -07:00
Leaf Petersen
3397338cdd
Fix use of Future<void> as a Future<bool> (#18843)
* Fix use of Future<void> as a Future<bool>
2018-07-10 11:10:48 -07:00
Gary Miguel
66091f9696 Move collectCoverageData into CoverageCollector so it can be re-used. (#19055)
This will let us re-use that code from fuchsia_tester.dart.
Tested by running the stocks example tests with coverage collection before and after.
.lcov files are identical.
2018-07-09 12:52:41 -07:00
Devon Carew
9d9836f080
adjust declared types to work with dart 2 typing at runtime (#19007)
* adjust declared types to work with dart 2 typing at runtime

* review comments

* update packages/flutter_tools/lib/src/ios/simulators.dart
2018-07-09 12:22:46 -07:00
Sigurd Meldgaard
5cbbd2831c
Fix path of ios module template files (#19037)
* Fix path of ios module template files

* Fix more paths
2018-07-09 11:56:39 +02:00
abykov2
e5d9feb59d Adding a setup function for hot restart (#18921)
* Adding a setup function for hot restart that can be overwritten to perform any necessary initialization before a restart is started.

* Adding a test for setupHotRestart

* Removing local pubspec change

* Fixing some type annotation errors

* Responding to comments
2018-07-06 15:18:57 -07:00
Mikkel Nygaard Ravn
9b3f50b7bc
Fix typos (#19067) 2018-07-04 11:07:14 +02:00
Mikkel Nygaard Ravn
b1c6224590
flutter attach should handle non-singular device gracefully (#19036) 2018-07-03 16:18:06 +02:00
Danny Tuppeny
9cb3cd4cb0
Fix type for Dart 2 (#18998)
Fixes #18995.
2018-07-03 07:37:00 +01:00
Mark Fielbig
af5d4c6882 Fix type errors in iOS simulator discovery. (#18960) 2018-06-30 17:17:35 -07:00
sjindel-google
698e1016bb Let the Kernel FE know whether it's building for a release VM. (#18876)
Fixes #18829
2018-06-29 17:01:34 +02:00
Danny Tuppeny
44924e5cf0
Set FLUTTER_TEST when spawning flutter_tester (#18907)
Otherwise on Windows these will fail as an unsupported platform when things try to read defaultTargetPlatform in flutter apps.
2018-06-29 09:43:25 +01:00
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