Commit graph

1048 commits

Author SHA1 Message Date
Jonah Williams a871d59164
Apply basic log filtering and formatting to fuchsia logs. (#24143) 2018-11-10 17:02:32 -08:00
Jonah Williams c11633e84e
Separate hot reload and hot restart capabilities. (#24122) 2018-11-09 10:33:22 -08:00
Ian Hickson 6bfd9bb996 Fix a race condition in vmservice_test.dart (#23835)
Fixes https://github.com/flutter/flutter/issues/19273
2018-11-08 20:54:06 -08:00
Danny Tuppeny 2d5ed986e1
Update integration tests to use vm_service_lib (#23937)
* Move integration tests to use vm_service_lib
* Turn off debug logging that was accidentally committed
* Run update-packages --force to fix checksum for new dev dependency
* Trim trailing whitespace
2018-11-08 07:55:54 +00:00
jslavitz 5dac7a2347
Removes check for Homebrew if all necessary packages are present. (#23844)
* Removes need for homebrew installation if all other packages are installed. Modifies test to work with this new functionality.
2018-11-07 15:21:05 -08:00
Ryan Macnak d92d175bcb Opt into deterministic snapshots.
Also, remove old flags.
2018-11-07 14:44:20 -08:00
jslavitz 50fb729609
Includes frameworkVersion in JSON version output (#23891)
* Include framework version in JSON output and adds test
2018-11-07 12:28:22 -08:00
jslavitz 34fa90b062
Improves SDK Search Error Messages (#23884)
* Improves error message and adds test.
2018-11-06 15:13:35 -08:00
Jonah Williams 81c7af342d
Add fuchsia specific entrypoint (#23916) 2018-11-06 14:36:35 -08:00
Jonah Williams a43e3a4a2f
Retry remove package:test from flutter (#24007) 2018-11-06 10:48:34 -08:00
Jonah Williams 23a7535a39
Revert "Remove package:test dependency from flutter_test (#23755)" (#24004)
This reverts commit 71e9bd6f25.
2018-11-06 09:12:48 -08:00
Jonah Williams 71e9bd6f25
Remove package:test dependency from flutter_test (#23755) 2018-11-06 08:39:27 -08:00
mattijsf 54becbf3bf Ignore unreachable iOS devices in IOSDevice.getAttachedDevices (#23776) 2018-11-05 15:09:39 -08:00
Dan Field 212374f0b7
Fix tests for ANSI terminals (#23906) 2018-11-05 07:56:30 -08:00
Alexandre Ardhuin 344ebe02ff
avoid returning null for Future (#23784) 2018-11-05 16:38:23 +01:00
Jonah Williams d80999d6b8
Support attach on fuchsia devices (#23436) 2018-11-01 20:04:52 -07:00
Alexander Aprelev 47f62109d2
Specify UDID for idevicelistener. (#23854)
This is needed to run flutter app on multiple iOS devices at a time.
2018-11-01 20:04:42 -07:00
Dan Field fd6b2e198c
Re-reland Xcode backend refactor (#23762)
* Use Xcode build configurations to drive Flutter build mode

* Proper check wrt local_engine, print error if profile mode misisng

* Remove unused code, update tests, fix template problem, update warning

* fix up warning

* add explanatory dev comment

* fix whitespace

* missing words, change lambda arrow to function body

* error indentation

* Test early exits for xcode_backend.sh

* only on macOS, use right test

* Update error messages

* case insensitive compare for build config

* Update gallery podfile

* update projects to add profile configuration

* make compatible with flavors

* add missing plist files

* add FLUTTER_FRAMEWORK_DIR back, set swift version for profile, tell Podfile about profile
2018-10-31 16:37:53 -07:00
Greg Spencer 1b9cba4b42
Make sure we refer to 'stable', and not 'release' branch. (#23745) 2018-10-30 16:57:54 -07:00
Greg Spencer f9c6f30576
Allow users to create samples using flutter create. (#23584)
This adds flutter create --sample which allows users to execute a command which will create a working sample app from samples embedded in the API docs.

The command looks something like this:

flutter create --sample=chip.DeletableChipAttributes.onDeleted mysample
2018-10-30 16:01:14 -07:00
Greg Spencer 4559ae1a6b
Stop wrapping adb, gradle and ios logger output, and update terminal wrapping column dynamically. (#23592)
Subcommand output (gradle, adb, etc) is no longer wrapped, and wrapping notices when the terminal column width changes dynamically now.

Fixes #23267.
Fixes #23266.
2018-10-30 16:00:50 -07:00
Danny Tuppeny a2c9dd8180
Add a hot reload test that modifies code and verifies it executes (#23725) 2018-10-30 16:59:49 +00:00
Dan Field 7217999a9a
Revert "Reland Xcode backend refactor" (#23737)
* Revert "Update templates (#23698)"

This reverts commit 5b0de6d679.

* Revert "Verify that date/number translations exist for all supported languages (#23692)"

This reverts commit 3449edf256.

* Revert "Reland Xcode backend refactor (#23574)"

This reverts commit 7270f2845d.
2018-10-30 09:36:31 -07:00
Dan Field 7270f2845d
Reland Xcode backend refactor (#23574)
* Use Xcode build configurations to drive Flutter build mode

* Proper check wrt local_engine, print error if profile mode misisng

* Remove unused code, update tests, fix template problem, update warning

* fix up warning

* add explanatory dev comment

* fix whitespace

* missing words, change lambda arrow to function body

* error indentation

* Test early exits for xcode_backend.sh

* only on macOS, use right test

* Update error messages

* case insensitive compare for build config

* Update gallery podfile

* update projects to add profile configuration

* make compatible with flavors

* add missing plist files
2018-10-30 07:23:19 -07:00
Devon Carew e30f9a9447
add explicit const keywords (#23652) 2018-10-29 22:39:40 -07:00
Ian Hickson 4a094de290
[H] Cleanup (#23632)
* Avoid abbreviations

* Sample code for AppBar.leading

* Add a test for OverflowBox/FractionallySizedBox

* Minor wording improvements in the text.

The words "note that" here don't really contribute to the flow.
2018-10-29 19:44:00 -07:00
Ben Konyi b1a23299e1
Added '--check-for-remote-artifacts' option for Flutter Doctor. (#23543)
* Added '--check-for-remote-artifacts' option for Flutter Doctor.

This option takes a Flutter engine revision and issues HEAD requests to
determine whether or not artifacts for the provided engine revision are
available from cloud storage. This functionality is needed for the Dart
SDK autoroller to avoid creating a PR to roll the engine into the
framework while artifacts haven't finished building, which would cause
Cirrus tests to fail.
2018-10-29 17:03:22 -07:00
Ian Hickson 5b4a5da78e
Revert "[O] Fix a race condition in vmservice_test.dart" (#23647)
* Revert "[H] Created a variant of InheritedWidget specifically for Listenables (#23393)"

This reverts commit 931328596a.

* Revert "Fix a race condition in vmservice_test.dart (#23529)"

This reverts commit 5e7b0a366b.
2018-10-28 13:43:15 -07:00
Ian Hickson 5e7b0a366b
Fix a race condition in vmservice_test.dart (#23529)
Fixes https://github.com/flutter/flutter/issues/19273
2018-10-27 16:50:53 -07:00
Dan Field 628e8ec0b9
Revert "Xcode backend refactor (#23387)" (#23528)
This reverts commit def1d80566.
2018-10-25 13:25:09 -07:00
Dan Field def1d80566
Xcode backend refactor (#23387)
* Use Xcode build configurations to drive Flutter build mode
2018-10-25 11:29:31 -07:00
Danny Tuppeny 9dfc0f3aaa
Log received messages for exceptions as well as timeouts (#23287) 2018-10-24 07:22:08 +01:00
Danny Tuppeny 64bf567b0e
Push breakpoint URIs to Project and remove unused string paths (#23395) 2018-10-24 07:21:48 +01:00
Danny Tuppeny aa83f77a49
Fix --pid-file not working for --machine + add to attach command (#23242)
* Fix --pid-file not working for --machine + add to attach

Fixes #23201.

* Add tests for --pid-file in run+attach
2018-10-24 07:21:36 +01:00
Jacob Richman f5f70f0c99
Include .track in file names for cached dill files for builds with --track-widget-creation (#23299)
Ensure that cached dill files for builds with --track-widget-creation
always have .track. in the file name to avoid mixing transformed and
untransformed kernel files.
2018-10-23 10:09:18 -07:00
Jason Simmons a6a1607888
Roll engine to 4c79e423dc6f89f98d8ceb263a5ca78e2f2da996 (#23384)
Also includes
  * Updates to affected tests
  * Change flutter_tools to pass package URIs to the Dart front end
    instead of filesystem paths
2018-10-22 18:03:50 -07:00
Jonah Williams b7c9c96c6b
Support for fuchsia device discovery, workflow, and sdk wrapper (#23282) 2018-10-22 16:48:17 -07:00
Dan Field 0edbe726a1
Revert "Roll engine to 4c79e423dc6f89f98d8ceb263a5ca78e2f2da996 and update tests (#23357)" (#23372)
This reverts commit ca0487b9ed.
2018-10-22 10:29:00 -07:00
Dan Field ca0487b9ed
Roll engine to 4c79e423dc6f89f98d8ceb263a5ca78e2f2da996 and update tests (#23357)
* Roll engine to 4c79e423dc6f89f98d8ceb263a5ca78e2f2da996 and update tests
2018-10-22 10:20:55 -07:00
Devon Carew 48fe65c236
allow todos in user code to show in IDEs (#23303) 2018-10-19 14:10:54 -07:00
Greg Spencer 2000583ed3
Revert "don't disable TODO issues in IDEs (#23274)" (#23297)
Devon asked me to revert commit c4d1b31b74.

Merging on red to fix the build.
2018-10-19 10:03:35 -07:00
Devon Carew c4d1b31b74
don't disable TODO issues in IDEs (#23274)
* don't disable TODO issues in IDEs

* minor change to start cirrus
2018-10-19 08:01:05 -07:00
Danny Tuppeny f87a2a32fe
Switch to URIs for breakpoints and unskip tests on Windows (#22510)
* Switch to URIs for breakpoints and unskip tests on Windows

addBreakpointWithScriptUri expects Uris. By coincidence, FS paths work on Mac/Linux but they fail on Windows. One of the issues in the skip comment is fixed, the other one seems not relevant here.

* Apply symlink resolution to all integration tests

The default temp folders we get include symlinks which breaks breakpoints.

* Save 🙄

* Fix typo
2018-10-19 12:51:31 +01:00
Sebastian Roth b95b67a66b allow command line option "--project-name" in flutter create (#22022)
Simple convenience function if users create flutter projects in custom folder structures and but want to specify a custom project name.
2018-10-17 08:25:46 -07:00
Alexandre Ardhuin 8b0de38ef8
fix upcoming lint avoid_returning_null_for_void (#23190) 2018-10-17 11:01:37 +02:00
Dan Field 5efe095895
Revert "Roll engine to aed6b8c46b05c7cee4506a9757dd9ea1b40583c2." (#23170)
This reverts commit a34488dd67.
2018-10-16 12:57:07 -07:00
Ryan Macnak a34488dd67 Roll engine to aed6b8c46b05c7cee4506a9757dd9ea1b40583c2.
aed6b8c46 Roll Dart to ac6d4f7e653deba11d4836768376537893a9e9d6. (#6549)
3ba6270b2 Roll src/third_party/skia 921ec976556c..4b7b2ceb4ad9 (14 commits) (#6550)
2018-10-16 11:03:52 -07:00
jslavitz 673d56d1b7
Fix test template (#22982)
* added test
2018-10-11 16:25:34 -07:00
Greg Spencer 081d2a7a86
Re-land text wrapping/color PR (#22831)
This attempts to re-land #22656.

There are two changes from the original:

I turned off wrapping completely when not sending output to a terminal. Previously I had defaulted to wrapping at and arbitrary 100 chars in that case, just to keep long messages from being too long, but that turns out the be a bad idea because there are tests that are relying on the specific form of the output. It's also pretty arbitrary, and mostly people sending output to a non-terminal will want unwrapped text.

I found a better way to terminate ANSI color/bold sequences, so that they can be embedded within each other without needed quite as complex a dance with removing redundant sequences.

As part of these changes, I removed the Logger.supportsColor setter so that the one source of truth for color support is in AnsiTerminal.supportsColor.

*     Turn on line wrapping again in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)

    This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).

    Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.

    Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.

    Since wrapping is now turned on, also removed many redundant '\n's in the code.
2018-10-10 18:17:56 -07:00
Greg Spencer 0ff9e8a928
Rename 'application' back to 'module', and make 'app' the default again for templates. (#22888)
We decided that redefining the default for templates was premature. We're going to go back to having "module" in experimental land again, and we'll try again when we have the feature set fully baked.

This keeps the writing of the .metadata files, and writing the template type to them, because that was a good improvement, and there are still a bunch of added tests that improve our coverage.
2018-10-10 11:01:40 -07:00
Jorge Coca 422e56c29c Added support for Gradle productFlavors that are not only lowercase (#22767)
Fixes https://github.com/flutter/flutter/issues/19507
2018-10-09 20:04:29 -07:00
Greg Spencer 485ed2f655
Fix DevFS to understand missing files in _stat() (#22844)
Fixes #22451
2018-10-09 14:33:47 -07:00
Stanislav Baranov 570ae840f2
Remove unused deps and flags from flutter tool. (#22571) 2018-10-09 13:04:06 -07:00
Greg Spencer c81f4c71a2
Have runAsyncChecked throw a ProcessException instead of a String. (#22710) 2018-10-08 19:11:31 -07:00
Greg Spencer 2d81adf74c
Revert "Turn on line wrapping in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)" (#22759)
This reverts commit e438632165
because it breaks 160 benchmarks, and several devicelab tests,
due to changing the format of the output.
2018-10-05 22:29:37 -07:00
Greg Spencer e438632165
Turn on line wrapping in usage and status messages, adds ANSI color to doctor and analysis messages. (#22656)
This turns on text wrapping for usage messages and status messages. When on a terminal, wraps to the width of the terminal. When writing to a non-terminal, wrap lines at a default column width (currently defined to be 100 chars). If --no-wrap is specified, then no wrapping occurs. If --wrap-column is specified, wraps to that column (if --wrap is on).

Adds ANSI color to the doctor and analysis output on terminals. This is in this PR with the wrapping, since wrapping needs to know how to count visible characters in the presence of ANSI sequences. (This is just one more step towards re-implementing all of Curses for Flutter. :-)) Will not print ANSI sequences when sent to a non-terminal, or of --no-color is specified.

Fixes ANSI color and bold sequences so that they can be combined (bold, colored text), and a small bug in indentation calculation for wrapping.

Since wrapping is now turned on, also removed many redundant '\n's in the code.
2018-10-05 20:00:11 -07:00
Greg Spencer 21a32fdd0c
Fixes the project detection logic when creating new projects over existing directories. (#22744)
This all happened because I was trying to be a little too helpful...

Part of the job of the "create" command is to recreate missing pieces of existing projects, and now that the default has changed, I wanted to make it so that if someone had created a default flutter create project before, that they could run a default flutter create there again, and not have it trashed by using the new default template (application) over the old one (app).

This meant I had to detect what type of project it was. Unfortunately, in the past we didn't write anything in the .metadata file to identify the type of project, and since the goal was regenerating missing files, I can't count on anything existing, so it's just a heuristic match.

This simplifies the heuristics down to just detecting the difference between "app" and "application" projects, and only detect the other types if they're explicitly listed in the .metadata file (I changed the code in my original PR to add the project type to the .metadata file). People used to have to specify the type for those anyhow, so it shouldn't be a surprise to users.

So, the main difference in the new heuristics from my last attempt is that if you have a directory that has some other stuff it (like maybe a "plugin" project), then we'll recreate (pronounced "mess up") the project using the "application" template, but that was true before (except it would use the "app" template).

Fixes #22726
2018-10-05 15:49:53 -07:00
Jason Simmons 9588946365
Do not continue a hot restart if _restartFromSources fails (#22645) 2018-10-05 13:48:41 -07:00
tonyzhao1 b04447d51c Split Android license checks into their own subvalidator (#22446) 2018-10-05 08:45:16 -07:00
Alexandre Ardhuin 2d3ff10d62
apply lint prefer_void_to_null in packages/flutter_tools (#22686) 2018-10-05 07:54:56 +02:00
Greg Spencer 40a7a9cfc3
Fixes a common crash in getAdbDevices when adb executable isn't found. (#22676)
Apparently, this accounts for 13% of our crashes in Beta.
2018-10-04 15:57:15 -07:00
Greg Spencer 9f23866a0a
Rename module --> application in flutter create command. (#22565)
This renames the "module" template to the "application" template, and makes "application" the default. The existing "app" template is now deprecated.

flutter create also now recognizes the type of project in an existing directory, and is able to recreate it without having the template type explicitly specified (although you can still do that). It does this now by first looking in the .metadata file for the new project_type field, and if it doesn't find that, then it looks at the directory structure. Also, the .metadata file is now overwritten even on an existing directory so that 1) the project_type can be added to legacy projects, and 2) the version of Flutter that updated the project last is updated.

I also cleaned up a bunch of things in create_test.dart, added many more tests, and added an example test to the test/ directory in the generated output of the application template.

Fixes #22530
Fixes #22344
2018-10-04 13:03:20 -07:00
Jason Simmons e031613a2a
Use "gradle tasks --all" to query build variants (#21761)
Previously flutter_tools had used "gradle properties" to find the build types
and flavors supported by the Gradle project.  Tasks should work more reliably
across different versions of the Android Gradle plugin.

Fixes https://github.com/flutter/flutter/issues/20781
2018-10-04 10:06:31 -07:00
Alexandre Ardhuin 2ea1d81cdc
sort_constructors_first (#22575) 2018-10-04 07:28:07 +02:00
Danny Tuppeny 2f6155bf18
Throw if trying to set fs.currentDirectory in tests (#22037)
* Block setting of fs.currentDirectory in tests

This isn't perfect, it only covers tests using testUsingContext, but that is the huge majority of tests.

* Tweak error message.
2018-10-03 19:07:04 +01:00
Danny Tuppeny d89604d85c
Change file paths to URIs to fix "Could not run configuration in engine" on Windows (#22507)
* Change file paths to URIs to fix "Could not run configuration in engine" on Windows

Plus unskip test that was failing due to this.

Fixes #21348.

* Remove unused import
2018-10-02 18:31:55 +01:00
Alexandre Ardhuin 5de96bb734
unnecessary this in field initializers (#22522) 2018-10-02 17:14:59 +02:00
Jason Simmons 3581b3ae85
Make font manifest descriptors consistent with the paths used for font assets (#22375)
The asset subsystem uses URIs to represent asset locations.  The font manifest
should also use URI-encoded paths instead of unencoded paths taken directly
from the manifest YAML.

Fixes https://github.com/flutter/flutter/issues/19452
2018-10-01 14:14:48 -07:00
Alexandre Ardhuin f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Jonah Williams 224f91e386
Revert "Eliminate snapshot, depfile opts from bundle cmd (#22495)" (#22519)
This reverts commit b07d986f66.
2018-10-01 10:49:39 -07:00
Chris Bracken b07d986f66
Eliminate snapshot, depfile opts from bundle cmd (#22495)
Eliminates the --snapshot and --depfile parameters from the flutter
bundle command. The snapshot parameter is unused in Dart 2 -- code is
built to kernel .dill files and for profile/release builds, then AOT
compiled.

While depfiles are still used in Dart 2 (e.g. by the kernel compiler),
there are enough assumptions in the code that they lie in the default
location (e.g. in the Gradle build) and no reasons to support
user-cusomisation that it makes sense to eliminate the --depfile option
as well, and always use the default location.

This commit also renames 'depFilePath' to 'depfilePath' for consistency
across the codebase.
2018-10-01 10:19:37 -07:00
Stanislav Baranov 54c10f44b2
Implement build flow for hot updates on Android (#22391)
This also involves switching from Core JIT to App JIT snapshot, and replacing per-isolate VM snapshot with the shared VM snapshot.

For now there is no separate update bundle file, as the generated update gets packaged directly into the APK for testing purposes.
2018-09-28 13:58:37 -07:00
asiva 556568ffe6 Fix quotes. 2018-09-27 15:17:03 -07:00
asiva 5024871a05 Fix error message. 2018-09-27 15:17:03 -07:00
asiva aef9804784 Roll engine to version d80c1de7b53af81a0b4385eb3f13de1ef77f0d2d
Contains the following changes:

d80c1de7b (HEAD -> master, upstream/master) Roll src/third_party/skia ab3144c3abb9..656cefe65d62 (11 commits) (#6362)
edf6249e0 Add pushOffset to SceneBuilder (#6349)
3a01f3956 Change log level from ERROR to WARNING (#6361)
5ae470845 Roll src/third_party/skia 227d4e10276c..ab3144c3abb9 (11 commits) (#6360)
763627fff Do not export libdart symbols (#6337)
3052dbd79 SystemNavigator.pop can pop w/o UINavigationController (#6341)
0c096f798 Roll src/third_party/skia b3e48afc936d..227d4e10276c (1 commits) (#6359)
b8c2a17a1 Roll src/third_party/skia cfe1264d7465..b3e48afc936d (3 commits) (#6356)
c589b312a Expose push/popRoute on FlutterViewController (#6347)
075b3fcca Roll src/third_party/skia 5ea41fc89b26..cfe1264d7465 (1 commits) (#6355)
2dd9b99aa Roll Dart to version 808ed6238b9262660e31ea826f7aea6cfa3a3493 (#6354)
5b799381f Dont make any binaries specify an X11 dependency. (#6353)
309ac4e1b V0.8.2 fix compile problem with xcode10 (#6339)
26fdd1e4f Roll src/third_party/skia 5767fc042834..5ea41fc89b26 (3 commits) (#6351)
cc44ca5d0 Perform persistent cache stores on the IO thread outside the frame workload. (#6350)
f2a3df97e Wire up the Skia persistent GPU related artifacts cache. (#6278)
2018-09-27 15:17:03 -07:00
xster 6cdf953241 Revert "remove code signing special casing for Googlers (#22287)" (#22376)
This reverts commit 1eb38abdb7.
2018-09-27 14:43:54 -07:00
xster 1eb38abdb7
remove code signing special casing for Googlers (#22287) 2018-09-27 14:03:52 -07:00
Greg Spencer 306bcbde8a Fixes terse doctor output when no devices available. (#22108) 2018-09-26 09:33:08 -07:00
Mikkel Nygaard Ravn a600fe7f13 Support materializing Flutter module host app on iOS (#21276)
* Prototype

* Fix paths to Flutter library resources

* Invoke pod install as necessary for materialized modules

* Add devicelab test for module use on iOS

* Remove debug output

* Rebase, reame materialize editable

* Add devicelab test editable iOS host app

* Removed add2app test section
2018-09-25 15:21:13 -04:00
Greg Spencer eadd59a9ec
Swap out the moon emoji used for progress spinner for a single-cell character. (#22243)
Swap out the moon emoji used for progress spinner for a single-cell character.

The moon emoji looked cool, but couldn't be used because of bugs in xterm.js, used for VSCode's terminal, among others. The moon emoji is two character cells wide, but xterm.js doesn't advance by two cells when it adds the emoji, but does go back by two when it backspaces.

This changes us to a different character animation (dots) that is only one cell wide, and so doesn't have this problem.
2018-09-25 10:55:41 -07:00
Ian Hickson 989cf18b0d
[H] Cleanup (#21542)
* Improve documentation and clean up code.

* Remove "Note that".

The phrase "note that" is basically meaningless as a prefix to an
otherwise fine sentence.
2018-09-22 02:02:56 -07:00
Greg Spencer efcd9a8001
Simplify Gradle compiler output. (#21760)
This changes the compiler output for gradle to be less verbose and more easily read.

This only applies to compilation error messages: other gradle messages will continue to print as before.

It also fixes a small problem with the performance measurement printing (see that "7.1s" on it's own line in the original?) so that if something is expected to have multiple lines of output, it prints an initial line, and a "Done" line with the elapsed time, so that it's possible to know what the time applies to.

It also updates the spinner to be fancier, at least on platforms other than Windows (which is missing a lot of symbols in its console font).

Addresses #17307
2018-09-20 15:45:48 -07:00
Alexander Markov 83cdb5738e
Cleanup uses of entry points files (#22098) 2018-09-20 15:10:41 -07:00
Greg Spencer 54236427dc
Fix flake in logger_test (#22095)
This fixes a flaky test where it included 0ms as part of an output check. Kind of a classic flaky test.
2018-09-20 14:45:24 -07:00
tonyzhao1 8b5af14f24 Use grouped validator instead of categories (#21577)
This is a cleanup PR.
2018-09-19 15:42:51 -07:00
Greg Spencer 7caa65943f
Added more extensive ANSI color printing support on terminals. (#20958)
This adds support to AnsiTerminal for colored output, and makes all tool output written to stderr (with the printError function) colored red.

No color codes are sent if the terminal doesn't support color (or isn't a terminal).

Also makes "progress" output print the elapsed time when not connected to a terminal, so that redirected output and terminal output match (redirected output doesn't print the spinner, however).

Addresses #17307
2018-09-19 15:22:43 -07:00
Danny Tuppeny 7dd82813f2
Remove -j1 to run tools tests concurrently (#22038)
Fixes #21113.
2018-09-19 17:47:06 +01:00
matthew-carroll 18d5b9dc45
Renamed 'flutter materialize' to 'flutter make-host-app-editable'. The iOS version is still incomplete and will therefore require additional renaming. (#21771) (#22006) 2018-09-18 17:58:20 -07:00
Chris Bracken f8c50ea15f
Use Xcode legacy build system for iOS builds (#21901) (#21994)
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: https://github.com/flutter/flutter/issues/20685
2018-09-18 10:05:46 -07:00
Alexandre Ardhuin e2d0b062d9
remove unnecessary ignore prefer_const_constructors (#21934) 2018-09-18 05:54:03 +02:00
Chris Bracken 4c045e79fb
Revert "Use Xcode legacy build system for iOS builds (#21901)" (#21966)
This caused issues for projects without an Xcode workspace. Almost all
Flutter projects in the wild will have a workspace, but this patch needs
to add a check to catch any that lack one.

This reverts commit 021f472efc.
2018-09-17 18:22:54 -07:00
Chris Bracken 021f472efc
Use Xcode legacy build system for iOS builds (#21901)
Xcode 10 introduces a new build system which includes stricter checks on
duplicate build outputs.

When plugins are in use, there are two competing build actions that copy
Flutter.framework into the build application Frameworks directory:

  1. The Embed Frameworks build phase for the Runner project
  2. The [CP] Embed Pods Frameworks build phase that pod install creates
     in the project.

Item (1) is there to ensure the framework is copied into the built app
in the case where there are no plugins (and therefore no CocoaPods
integration in the Xcode project). Item (2) is there because Flutter's
podspec declares Flutter.framework as a vended_framework, and CocoaPods
automatically adds a copy step for each such vended_framework in the
transitive closure of CocoaPods dependencies.

As an immediate fix, we opt back into the build system used by Xcode 9
and earlier. Longer term, we need to update our templates and
flutter_tools to correctly handle this situation.

See: https://github.com/flutter/flutter/issues/20685
2018-09-17 17:54:57 -07:00
Alexandre Ardhuin a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +02:00
Alexander Aprelev d61b48b75d
Fix integration hot-reload test on mac. (#21741)
Underlying issue with breakpoint was that /var path is a symlink to a /private/var on mac. Because of that breakpoint could not be resolved.
2018-09-12 22:35:21 -07:00
Joao da Silva 66e5422375 Check for AndroidStudio plugins in the right .dot dir. (#20619)
This fixes issues 11940 and 18155.
2018-09-12 08:15:30 -07:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Alexandre Ardhuin 774ca2f197
enable lint avoid_void_async (#21652) 2018-09-11 07:14:04 +02:00
Chris Bracken 5ab9e70727
Revert "Eliminate snapshot/depfile options to build bundle (#21507)" (#21563)
This tickled a bug in KernelCompiler.compile() where the fingerprinter
doesn't include the outputFilePath in its list of dependencies. As such,
if the output .dill file is missing or corrupted, the fingerprint still
matches and re-compile is skipped, even though it shouldn't be. I'll fix
that in a followup, then look at how this triggered that issue. My
hypothesis is that that it's due to the aot kernel compile and bundle
kernel compile have separate output directories for the .dill files
(build/ vs build/aot) but the same output directory for the associated
depfiles (due to this patch).

This reverts commit 43a106e95a.
2018-09-07 12:33:05 -07:00
Chris Bracken 43a106e95a
Eliminate snapshot/depfile options to build bundle (#21507)
The --snapshot argument was only necessary in Dart 1. The --depfile
argument was only used in Dart 2 mode to pass to the kernel compiler,
but was inconsistent with the 'build aot' command, where the depfile was
always set to build/kernel_compile.d.

This patch updates 'build bundle' to emit the depfile to a location
consistent with the 'build aot' command; since it's not intended to be
user-configurable and flutter.gradle hardcodes the location to
build/kernel_compile.d either way, this patch also eliminates the
ability to configure the filename altogether.
2018-09-07 10:21:55 -07:00
Danny Tuppeny cc1766d44c
Remove flutter_tester test (#21493)
I'm working on fixing up all tests that rely on fs.currentDirectory to allow us to run concurrently. This one proved to be really tricky because it calls a lot of code and spawns multiple processes that have a mix of absolute and relative paths passed to them. I managed to handle some of it with a ChrootFileSystem, but the paths passed to the external processes were wrong.

The functionality here is covered by all of the integration tests that use flutter_tester that were added after this, including flutter_run_test.dart, lifetime_test.dart etc. in this same folder but because they're run through `flutter run` as a separate process they get to set their own working directories without affecting other tests if run concurrently.
2018-09-06 17:59:34 +01:00
Danny Tuppeny 7fc9165e4e
Add a detach command to detach without terminating (#21490)
* 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

* Fix the text that the devicelab attach test looks for
2018-09-06 15:26:55 +01:00
Devon Carew e55b0f5244
remove the --use-cfe flag from flutter analyze (#21463) 2018-09-06 07:18:59 -07:00
Danny Tuppeny 7e3ebfc7e0
Rename test file to end with _test so it runs on the bots (#21438)
* Rename test file

* Fix detection to work regardless of whether there are other devices

On Windows we get one message, but on Mac we get another (because of the Simulator always being available).
2018-09-06 13:08:34 +01:00
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 fc8dbd3c44
Move asset_bundle_variant_test over to memory file system (#21426) 2018-09-05 19:31:36 +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
Danny Tuppeny 11ee2f71af
Move asset_bundle_package_test to MemoryFileSystem to avoid setting fs.currentDirectory in tests (#21427)
* Update asset_bundle_package_test to use MemoryFileSystem

This updates all tests in this file to use a memory filesystem (same as I did for asset_bundle_package_font_test) based on the current platform.

There were already a few minor tests at the bottom using a MemoryFileSystem and being run for all platforms - however this complicated the shared code I changed above to support Windows natively so I changed them to also work the same as others (that is, they just run the native platforms so require running on all to get full coverage - though this is the case for almost all other tests anyway).

* Move fixPath to the correct place
2018-09-05 19:30:55 +01:00
Danny Tuppeny 567a4b9cb6
Switch asset_bundle_test.dart to use memory file system (#21425) 2018-09-05 19:30:32 +01:00
Jonah Williams 61719c4e9f
fix unawaited future (#21439) 2018-09-05 09:29:22 -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 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
Danny Tuppeny a74f591d0c
Change asset_bundle_package_font_test to memory file system (#21114)
* Change assert_bundle_package_font_test to memory file system

This is to work towards being able to run the tests without `-j1` (#21113). These tests were using the real filesystem and setting/relying on fs.currentDirectory. There was a comment about this being because the memory provider didnt' support POSIX and Windows, however that seems to have changed since (and many other asset tests already do something similar to this).

* Trim trailing whitespace

* Add a workaround for Windows path slash directions

Strictly this is correct, but the real FS can tolerate either path. The in-memory file system is more strict (see https://github.com/google/file.dart/issues/112).

* Extract a helper for writing schema files in tests

* Missed file when saving!

* Remove redundant comment

* Rename writeBasicSchema -> writeEmptySchema

* Use the file we already have to write contents

* Make comments more descriptive

* Remove another dupe of writeSchema to use the shared one

* Rename schema -> pubspec_schema

* Trim whitespace
2018-09-04 17:12:24 +01: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
Danny Tuppeny db7aa6a069
Unskip passing tests on Windows + add a new failing test with GH reference (#21351)
* Unskip integration tests on Windows that now pass

The referenced issue is closed and these tests pass for me locally on Windows now.

* Remove import that's no longer used

* Add another issue that is afffecting these tests on Windows

* Add a hot restart test and mark skip on Windows

Skipped due to https://github.com/flutter/flutter/issues/21348.
2018-09-04 16:24:10 +01:00
Chris Bracken 4a0106658f
Migrate hot reload tests to Dart 2 (#21290) 2018-08-31 15:40:00 -07:00
Chris Bracken 4d0f09a2aa
Migrate Flutter Tester tests to Dart 2 (#21292) 2018-08-31 15:39:34 -07:00
Chris Bracken a6af2ca643
Run resident_runner_test in Dart 2 mode (#21288) 2018-08-31 14:31:38 -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
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
Chris Bracken 6d7ecab25c
Minor improvements to analyzer test naming (#21234)
Clarify the intent of these tests.
2018-08-30 14:07:34 -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
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
Danny Tuppeny a9275d2154
Swap order of attach/stop in flutter_attach integration test (#21106)
This is a bit of a stab in the dark for a flake sometimes seen on bots (but I can't repro locally) #20822. Detaching from a Flutter app currently seems to terminate it, so it may be the cause of the "app not found" when trying to stop the app subsequently.

This change means we stop the app from the main process first, before terminating the attach process.
2018-08-29 07:58:11 +01:00
David Shuckerow 77095356e9
Attach command: add Bazel filesystem support (#21082) 2018-08-28 14:50:03 -06:00
Ian Hickson 53b635817c
Re-enable missing_return (#20844) 2018-08-28 11:22:57 -07:00
Danny Tuppeny 8b0227b4a3
Don't time out if process terminates when told to stop (#21103)
* Don't time out if process terminates when told to stop but response was not processed

While trying to reproduce #20822 I found a condition where the app may quit before the `app.stop` response is received but this code (which is called in integration test teardown) would sit around waiting and time out. With this change, the process exit is considered a valid response to the stop request.

* Add process exit to log for better errors in failures

This log can be turned on for debugging but is also dumped when a test fails (in certain conditions). With this in the log, it'll be clear if the timeout is because we're waiting for an event but the process quit.
2018-08-28 18:26:46 +01:00
Danny Tuppeny 4466c9db4c
Re-enable integration tests (#20947)
* Unskip expression evaluation integration tests for non-Windows

* Add additional into to skip comments

* Add missing import
2018-08-27 09:29:07 +01:00
Danny Tuppeny 363543fc19
Don't try to stop the same app twice in flutter_attach test (#20905)
This test is sometimes flaky (#20822) because the two processes try to stop the same app. This fix changes to just gracefully terminate the attach process without explicitly trying to stop and then uses the original spawning process to stop the app.

I can't repro the flake locally to be certain, but I've verified only one stop command is sent now so it *should* be good.
2018-08-22 17:13:34 +01:00
Danny Tuppeny 65985db142
Double all timeouts on flutter_tools integration tests (#20872)
Due to CPU contention we've seen these go really slow on Cirrus (see https://github.com/flutter/flutter/issues/19542#issuecomment-414265152), and there's also a chance our flakes are timeouts due to running slow rather than hanging.
2018-08-22 17:13:23 +01:00
Danny Tuppeny e870b1a20f
Provide better error messages in integration tests when apps don't launch successfully (#20813)
* Don't keep parsing results once we've had the event we expected

* Report errors if an app.stop event is received while waiting for another event

* Don't throw if we see app.stop event when we've just sent an app.stop request

* Improve debug print to include --start-paused if being used

* Improve wrapping
2018-08-21 20:39:35 +01: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
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 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
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
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 26ba937846
Fix compiler error (#20687) 2018-08-16 13:59:27 +02:00
Mikkel Nygaard Ravn 405d1c473b
Avoid having flutter_tools test outcome depend on packages get (#20683) 2018-08-16 13:22:13 +02:00
Mikkel Nygaard Ravn d4e5e1e11e
Materialize Flutter module, Android (#20520) 2018-08-16 13:21:55 +02: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
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
Mikkel Nygaard Ravn e69b434602
Fix broken Flutter module with plugins (#20496) 2018-08-13 10:35:59 +02: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
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 651c5ab374
Fix latent type error in Flutter manifest (#20143) 2018-08-02 19:16:32 +02: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
Danny Tuppeny 93705691a4
Skip tests that are expected to fail with timeouts (#20074)
* Skip tests instead of expecting failure, because expected failure = timeout which is slow

Some of these tests are known to fail and were coded to expect it; however because the failure is a timeout it's just dragging out test runs (shortening timeouts will make the tests flakier).

* Make it easier to find skipped tests

* Change SKIP to TODO
2018-08-01 17:50:38 +01: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
Danny Tuppeny 12eff1d5da
Change from .first to .single to ensure this (#19981) 2018-07-31 08:05:24 +01: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
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
Danny Tuppeny 93dd3f193c
Skip integration tests that use flutter-tester on Windows (#19773)
* Skip integration tests that use flutter-tester on Windows

This is known to be broken. I will un-skip all of these once a fix for flutter-tester lands on Windows.

* Save with added import!
2018-07-25 18:31:50 +01:00
Danny Tuppeny b3c319e4f1
Add integration tests to ensure flutter run does not quit at startup (#19473)
* Add tests to ensure flutter run does not quit at startup

These tests require https://github.com/dart-lang/vm_service_client/pull/38 to be merged and currently the third test (pause-on-exceptions) fails because of a bug.

* Remove TODO

Probably makes most sense this way for now.

* Address PR comments
2018-07-25 17:29:35 +01:00
Danny Tuppeny 2a679bd858
Look up breakpoints rather than relying on magic numbers (#19708)
* Look up breakpoints rather than relying on magic numbers

* Make breakpoint comment more obvious
2018-07-25 15:31:57 +01:00
Danny Tuppeny bdf0dd466d
Skip attach test on Windows due to #17833 (#19763) 2018-07-25 14:56:29 +01:00
Danny Tuppeny d71d10094d
Rename file -> _test so it runs on CI! (#19749) 2018-07-25 13:43:36 +01: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
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
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
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 d9ee971e38
Fix copy/paste error in test (#19564) 2018-07-19 19:52:15 +01:00
amirh c1de12dd44
Skip flaky test (expression_evaluation_test) (#19543) 2018-07-19 10:20:28 -07: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
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
Danny Tuppeny 1363bd1795
Ensure timeouts in flutter_tools integration tests include all messages received (#19253)
* Allow a longer timeout for app launches

* Include timings in errors when waiting for events

* Extract a helper that adds a timeout and includes message logging

* Ensure all timeouts include messages

* Ensure logs are set up before we invoke actions

* Ensure all messages are logged during timeout periods

This adds a new stream _allMessages that collects all output (as routed through debugPrint) and updates _timeoutWithMessages to use that instead of stdin/out of only the flutter run process (since that was missing stdin - the sends, and both input/output to the VM service).
2018-07-12 18:17:33 +01: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