Commit Graph

2596 Commits

Author SHA1 Message Date
Jonah Williams
2c1d12d4f7
Revert "Add a detach command to detach without terminating" (#21464) 2018-09-05 18:03:43 -07:00
Danny Tuppeny
409baff3ac
Revert "Allow FlutterTester to be provided with the working directory for execution (#21119)" (#21453)
This reverts commit 857bdc7a9a.
2018-09-05 21:31:29 +01:00
Danny Tuppeny
857bdc7a9a
Allow FlutterTester to be provided with the working directory for execution (#21119)
* Allow FlutterTester to be provided with the working directory for execution

Previously this test set fs.currentDirectory which prevents running tests concurrently. This allows setting the working directory for a FlutterTester in the cosntructor (optionally) and passes it through from the test (without setting fs.currentDirectory).

* Remove trailing whitespace
2018-09-05 19:37:04 +01:00
Danny Tuppeny
eb9c975eb0
Add a detach command to detach without terminating (#21376)
* Add a detach command to detach without terminating

Fixes #21154.

* Bump protocol version for app.detach

* Tweak to detach/quit text

* Change logPrefix to named param
2018-09-05 19:31:21 +01:00
Chris Bracken
05edc00a6f
Eliminate Dart 1 support from Flutter test (#21408) 2018-09-05 10:41:44 -07:00
Matteo Crippa
5907a7264d Fix/ios run simulator (#20262) 2018-09-05 09:03:08 -07:00
Danny Tuppeny
6e64cb0ad8
Fix windows crash running flutter run which tries to find Xcode (#21423)
* Add a failing test for #21418

* Filter workflows to only those applicable to the current platform

Fixes #21418.
2018-09-05 16:22:12 +01:00
tonyzhao1
58d98ce31e Create categories for doctor validators (#20758)
* First step in Flutter Doctor refactor. Assigns categories to all validators.

* Revert "Roll engine e54bc4ea1832..a84b210b3d26 (6 commits) (#20453)"

This reverts commit 05c2880a17.

* Split iOS and Android workflows into workflow and validator classes.

* Change ValidatorCategory to handle standalone validators that share a
category (e.g. IntelliJ).

Also make Android Studio and Android toolchain use separate categories.

At this stage, flutter doctor output matches what it was previously.
(The summary() method itself has not yet been changed )

* Change doctor summary code to support validator categories.

Output is still unchanged.

* Handle small formatting issues.

* Flip Flutter category's isGroup field to false until it's actually
needed.

* Revert auto-generated formatting changes to keep those lines from
muddying the pull.

* Small fixes pointed out by analyzer.

* Properly fix analyzer issues around const constructors.

* Small changes to address comments.

* Add tests to verify grouped validator behavior and validationtype
merging.

* Update doctor.dart

* Add comments for clarification.
2018-09-04 19:36:47 -07:00
Chris Bracken
2ab4ed748e
Eliminate Dart 1 support from DevFS (#21404)
Dart 1 is no longer supported in Flutter. Hot reload now always occurs
via kernel file updates (plus any asset bundle changes).
2018-09-04 16:47:57 -07:00
Chris Bracken
70eefd1e9c
Eliminate Dart 1 support from FlutterDevice class (#21402) 2018-09-04 15:42:05 -07:00
Chris Bracken
63fde92adc
Eliminate Dart 1 support from Xcode xcconfig files (#21400) 2018-09-04 14:33:49 -07:00
Chris Bracken
d04a057efd
Eliminate BuildInfo.previewDart2 (now always true) (#21392)
Dart 1 is no longer supported in Flutter.
2018-09-04 13:38:17 -07:00
Chris Bracken
ac8b906cb4
Eliminate support for Dart 1 in AOT snapshotter (#21388) 2018-09-04 10:17:12 -07:00
Chris Bracken
ed0b8be041
Eliminate script snapshot support (#21387)
Script snapshots were only every used in Dart 1 mode, which is no longer
supported.
2018-09-04 10:05:26 -07:00
Chris Bracken
041ff621a7
Eliminate --preview-dart-2 flag (#21304)
This patch eliminates the --preview-dart-2/--no-preview-dart-2 flag,
hardcoding all uses to true. It also defaults all previewDart2 method
parameters to true, where they hadn't yet been.

A series of subsequent patches will eliminate all previewDart2
parameters and the associated code from within the codebase.
2018-09-04 08:50:05 -07:00
jensjoha
cd65903f56
Initialize from dill on tests (#20414) 2018-09-04 11:17:10 +02:00
Chris Bracken
4a0106658f
Migrate hot reload tests to Dart 2 (#21290) 2018-08-31 15:40:00 -07:00
Chris Bracken
251e82d211
Migrate devfs tests to Dart 2 (#21285)
DevFS.update only runs in Dart 2 mode when the generator parameter is
supplied. In Dart 2 mode, both mainPath and pathToReload are required
parameters; this patch marks them as such.

generator is required for running in Dart 2. All call sites other than tests already explicitly set this value.

Note the statements on line 510 and line 516 for why mainPath and pathToReload are required.
2018-08-31 13:31:56 -07:00
Chris Bracken
9d0084ff57
Restrict compilationQueue to library-visibility (#21280)
Its type uses a generic type which is limited to library-visibility.
Eliminating compilationQueue from ResidentCompiler's public interface
makes it possible to mock in tests.
2018-08-31 12:22:50 -07:00
Mikkel Nygaard Ravn
6cc8008283
Fix extraction of product bundle ID for iOS projects (#21252) 2018-08-31 11:07:15 +02:00
xster
cda2c223f5
Turn on unawaited_futures in flutter_tools (#21048) 2018-08-30 20:57:44 -07:00
Alexander Aprelev
e4b7e87bdd
Pass uri instead of filepaths when hot-reloading. (#21201)
* Pass uri instead of filepaths when hot-reloading.

Bug: https://github.com/flutter/flutter/issues/21168

* Remove imports. Enable another test

* Restore skipping of test on mac
2018-08-30 12:08:23 -07:00
Suvorov Daniil
7598050fff Add VS Code path to user install (#21070) 2018-08-30 18:42:25 +01:00
Jonah Williams
d1417c72a3
'fix' build (#21225) 2018-08-30 09:51:01 -07:00
Mikkel Nygaard Ravn
22832d3634
Support for flutter run/build module on iOS (#21216) 2018-08-30 16:18:44 +02:00
Greg Spencer
7cebaac985
Makes switching channels remove version freshness stamp. (#21182)
When switching between channels, we were leaving around the version freshness stamp file (bin/cache/flutter_version_check.stamp), which meant that the flutter tool would read from that file to see what the cached date of the most recent commit to the current channel (branch) was. The problem was that since the file was created while on the previous channel, the cached date was for the wrong channel, so if you switch from master to beta, flutter would think that the channel was out of date, and a new version was available, at least for three days after the first time it checked (after three days since the last time the freshness was checked, the cached date would get updated).

This PR modifies the channel command to remove that stamp file whenever the user switches channels, so that the cached date will be from the right channel when it is recreated.

Fixes #21134
2018-08-29 21:53:39 -07:00
Alexander Aprelev
1e5cb2d87f
Remove workaround for compiler dill-initialization. (#20541)
Workaround is not needed since real fix has landed in dart sdk: https://dart-review.googlesource.com/c/sdk/+/62729.
2018-08-29 08:56:19 -07:00
Alexander Aprelev
cf764e3012
Use differrent name for initial flutter tester kernel file. (#21137)
Bug: https://github.com/flutter/flutter/issues/17833
2018-08-28 22:16:38 -07:00
Ian Hickson
10aa41f00f
Fix coverage collection crash (#21015)
* Fix coverage collection crash

Based on Jason's patch in https://github.com/flutter/flutter/pull/19546/

This is more or less the same but I tried to avoid using `dynamic`.

* Improve argument and variable names in flutter_platform

* Don't bother with reduce, since the order is guaranteed.
2018-08-28 14:36:06 -07:00
David Shuckerow
77095356e9
Attach command: add Bazel filesystem support (#21082) 2018-08-28 14:50:03 -06:00
Danny Tuppeny
dc5a5c18a9
Start logger in startProgress to avoid assertion failure (#20814)
* Start logger in startProgress to avoid assertion failure

There are lots of places that create a Status() and all but two of them call ..start() immediately. This is one of the places that doesn't, which causes an assertion failure when running with --enable-asserts and the other is in the same file (I suspect it's also incorrect, but possibly it's never used - I'll look at that separately when I can trace some code that calls it).

Fixes #20812.

* Enable asserts for tools tests

* Fix lint

* Rename enableAsserts -> enableFlutterToolAsserts

To make it clearer that it only enables asserts for flutter_tools when set.
2018-08-23 20:49:59 +01:00
Ian Hickson
b7261586e5
Audit TODO syntax (#20837)
Fixes the pattern for some TODOs to match our style guide.

(Also, a couple of minor code order fixes.)
2018-08-21 14:02:11 -07:00
Devon Carew
392a178169
add a --use-cfe option to flutter analyze (#20742)
* add a --use-cfe option to flutter analyze

* useCFE ==> useCfe
2018-08-21 10:45:37 -07:00
JustWe
58b8460c45 release lock (#19671) 2018-08-21 10:19:11 -07:00
Amir Hardon
09fec4c51b Canonicalize path depdendencies in flutter update-packages
The tool was failing if we had 2 separate non-canonical paths to the
same canonical paths.
2018-08-20 14:29:26 -07:00
Amir Hardon
592731f220 Clone goldens as part of flutter update-packages.
flutter_tools cannot depend on flutter_goldens (as flutter_goldens
depdends on the Flutter sdk), so this commit splits client.dart from
flutter_goldens to a pure-dart flutter_goldens_client package.
2018-08-20 14:29:26 -07:00
Ian Hickson
ad1eaff45a
flutter analyze cleanup (#20490)
* `flutter analyze` cleanup

* Make `--dartdocs` work in all modes.
* Make `analyze-sample-code.dart` more resilient.
* Add a test for `analyze-sample-code.dart`.
* Minor cleanup in related code and files.

* Apply review comments

* Fix tests
2018-08-20 12:51:07 -07:00
Ian Hickson
f688b0d56b
Delete all temporary files in flutter test. (#20679)
Turns out we weren't deleting the dill directory or the fonts directory.
2018-08-18 16:45:41 -07:00
Ian Hickson
8c79f40d71
Fixes resulting from audit of issues links (#20772)
* Fixes resulting from audit of issues links

I looked at every link to GitHub in our repo. For cases where we had a TODO that was waiting for a bug to be fixed, and the bug has now been fixed, I applied the pending change. For cases where the link was out of date, I updated the link.

* Update run_test.dart

skip this test again since it failed on linux and macos bots
2018-08-18 16:44:39 -07:00
TL Lee
e2f3b3d6f2 Feature pesto new recipes (#19415)
<img width="273" alt="pesto_before" src="https://user-images.githubusercontent.com/13839358/43009716-64b6d726-8c0c-11e8-989a-13eaff72ccee.png">
<img width="273" alt="pesto_after" src="https://user-images.githubusercontent.com/13839358/43009717-66074a34-8c0c-11e8-92ae-f5fb4074f43a.png">
2018-08-17 17:58:25 -04:00
Ian Hickson
3dec6a6930
Clean up usage of temporary directories (#20682)
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.

I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.

While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.

Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
2018-08-17 13:17:23 -07:00
Ian Hickson
d581208557
Try to resolve an intermitted crash during coverage collection (#20506)
* Try to resolve an intermitted crash during coverage collection

The only theory I can come up with is that maybe the test completes
before we finish processing the standard input, so I made the test
harness wait for the observatory URL before considering whether the
test has finished or not.

Also, some code cleanup while I'm at it, e.g. avoiding using "onFoo"
for the names of methods, avoiding back-to-back switch statements with
the same values, avoiding `_` argument names, and using `?.` instead
of `if (foo != null) foo.`.

* Revert back the signature of _pipeStandardStreamsToConsole

* Also remove the other additions to this method.
2018-08-17 13:16:50 -07:00
Alexander Aprelev
e1534b8ecb
Add '-t' option to 'attach' command. (#20539)
* Add '-t' option to 'attach' command.

* Add test

* Make analyzer happy

* Fix tests so they use memory file system and can find lib/main.dart
2018-08-16 13:11:44 -07:00
Stanislav Baranov
b5b55447a4
Remove unused snapshot.d depfile parameter (#20584) 2018-08-16 08:47:20 -07:00
Stanislav Baranov
2c0329a103
Replace flutter --build-snapshot with --precompile that takes input (#20574) 2018-08-16 08:46:57 -07:00
Stanislav Baranov
393f9276ca
Reland Flutter tool support for dynamic code #20543 (#20646) 2018-08-16 08:43:41 -07:00
Mikkel Nygaard Ravn
d4e5e1e11e
Materialize Flutter module, Android (#20520) 2018-08-16 13:21:55 +02:00
Chinmay Garde
f62e6d9e43
Fix type mismatch while taking a screenshot using the resident runner. (#20555) 2018-08-15 17:27:57 -07:00
Martin Kustermann
9299c02cf7 Reland "Roll engine to version e3687f70c7ece72000b32ee1b3c02755ba5361ac (#20427)" (#20633)
* Reland "Roll engine to version b148e628ec86b3a9a0382e0bcfae73f0390a8232 (#20427)"

This is a re-land with downgraded `package:flutter_gallery_assets`
version.

* Downgrade package:flutter_gallery_assets to 0.1.4

* Change engine.version to 81baff97c29bb08cbf8453a3f9042c5813f84ad3 (which contains an additional fix)

* Change engine.version to e3687f70c7ece72000b32ee1b3c02755ba5361ac (since mac tarballs are corrupted on earlier commit)
2018-08-15 15:35:12 -07:00
Jonah Williams
58e52cc177
Revert "Flutter tool support for dynamic code" (#20644)
* Revert "iOS Dialog blur, brightness, and layout (#18381)"

This reverts commit 21bc9f1b02.

* Revert "Flutter tool support for dynamic code. (#20543)"

This reverts commit 25ba90aafa.
2018-08-15 13:32:22 -07:00
Stanislav Baranov
25ba90aafa
Flutter tool support for dynamic code. (#20543) 2018-08-15 12:27:35 -07:00
Ian Hickson
98c117bb38
Implement flutter test -j (#20493) 2018-08-15 12:22:30 -07:00
Martin Kustermann
515909ecb6
Revert "Roll engine to version b148e628ec86b3a9a0382e0bcfae73f0390a8232 (#20427)" (#20631)
Reason for revert: The package:flutter_gallery_assets has removed some images which are required for the examples/flutter_gallery, so the gallery build is failing (only discovered after landing, since gallery doesn't seem to get built during github PR presubmit checks)
2018-08-15 16:25:51 +02:00
Martin Kustermann
c7c493ea5d
Roll engine to version b148e628ec86b3a9a0382e0bcfae73f0390a8232 (#20427)
This CL

  * rolls `engine.version` to flutter/engine@b148e628 (which includes dart sdk 2.1.0-dev)
  * rolls `goldens.version` to flutter/goldens@6c45fafdf (which includes updates due to skia changes in engine)
  * changes `platform.dill` to `platform_strong.dill` in various places due to flutter/engine@a84b210b
  * adds explicit `environment: sdk: ">=2.0.0-dev.68 < 3.0.0"` constraints to `pubspec.yaml` and `pubspec.yaml.tmpl` files (since pub defaults to `<2.0.0` if omitted) 
  * upgrades to newer versions of various 3rd party packages (to ensure transitive dependencies have `<3.0.0` sdk constraint)
2018-08-15 15:22:05 +02:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Greg Spencer
7bdd31f7aa
Fix access of null compiler in flutter tests that fail before creating the compiler. (#20553)
In certain cases, the test would fail before creating the (lazily created) compiler object, and then we'd
try to call shutdown() on null in those cases.

Fixes #18610
2018-08-14 10:04:44 -07:00
Mikkel Nygaard Ravn
e69b434602
Fix broken Flutter module with plugins (#20496) 2018-08-13 10:35:59 +02:00
Todd Volkert
5d8771d18d
Update fuchsia_tester to work in (and require) Dart 2 mode (#20460) 2018-08-10 21:18:10 -07:00
Mikkel Nygaard Ravn
a737c86a19
Avoid null manifests in FlutterProject (#20332) 2018-08-10 21:49:24 +02:00
Mikkel Nygaard Ravn
3c83c52697
FlutterProject refactoring and test coverage (#20296) 2018-08-07 23:43:15 +02:00
Greg Spencer
e60087a1a7
Remove Travis configuration from flutter/flutter (#20288)
This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
2018-08-07 13:41:33 -07:00
Ian Hickson
872e88cec7
Reduce noise on the memory benchmarks (#19630) (#20163)
- Check memory usage in release builds, not profile.
- Use multiple runs and average the results.
2018-08-06 12:46:51 -07:00
Matteo Crippa
8c02b8f889 Fix issue for iOS to build any app and run on simulator #19618 (#19863)
A different approach to get the url from the string and avoid any interference by extra chars not allowed in url

Fixes #19618
2018-08-04 12:06:56 -07:00
Mikkel Nygaard Ravn
d1f446e559
Support flutter run/build of module on Android (#20197) 2018-08-04 13:52:09 +02:00
Mikkel Nygaard Ravn
8dd06a1190
Revert " Support flutter run on Android module project (#19600)" (#20182)
This reverts commit cacd291c5c.
2018-08-03 17:10:17 +02:00
Sarah Zakarias
cacd291c5c Support flutter run on Android module project (#19600) 2018-08-03 15:13:28 +02:00
Ian Hickson
a2ca14d71e
Revert "Reduce noise on the memory benchmarks" (#20158)
* Revert "Add pub cache, artifacts, pkgs to Cirrus cache (#20080)"

This reverts commit 07e93b385c.

* Revert "Reduce noise on the memory benchmarks (#19630)"

This reverts commit 8eb5cb7dc0.
2018-08-02 13:56:44 -07:00
Ian Hickson
8eb5cb7dc0
Reduce noise on the memory benchmarks (#19630)
- Check memory usage in release builds, not profile.
- Use multiple runs and average the results.
2018-08-02 12:22:15 -07:00
Mikkel Nygaard Ravn
651c5ab374
Fix latent type error in Flutter manifest (#20143) 2018-08-02 19:16:32 +02:00
asiva
35d50a0e16 Fix issues found running tests
//mobile/flutter/tests/app:basic_runner_test_*
during a google3 roll.

The following exception was being thrown

_TypeError: type 'String' is not a subtype of type 'File'

```
8)
<asynchronous suspension>
utter_command.dart:347:18)
<asynchronous suspension>
/flutter_command.dart:282:33)
<asynchronous suspension>
xt.dart:142:29)
<asynchronous suspension>
2018-08-02 08:03:03 -07:00
Mikkel Nygaard Ravn
b280074815
Move async from member access to construction (#20035) 2018-08-02 14:12:25 +02:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
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