Commit graph

3238 commits

Author SHA1 Message Date
Michael Goderbauer 8e2ca93f52
Remove all service extensions from release mode (#23038)
Service extensions can only be activated in debug or profile mode, their code should never be included in release mode. This PR adds guards around all service extension registration calls that enable Dart's tree shaker to remove the extension's code in release mode, which reduces our binary size:

Android Snapshot (uncompressed): minus 127,384 Bytes (-124.40KB)
APK (compressed): minus 38,136 Bytes (-37.24KB)
iOS Snapshot (App.framework, uncompressed): 264,304 Bytes(-258.10KB)

For details: https://docs.google.com/document/d/13JlgvliCn5sWwT2K2SfDwD1NhEfxpJH9DCf22gZZru8/edit

**Benchmark Regressions:** This PR may cause benchmarks to regress because it may change the timing of GC. If you notice a benchmark regression **please note down the exact set of benchmarks that regressed on this PR** and then feel free to revert. I will follow-up with a PR that forces a GC before the effected benchmarks run to get a clean baseline before re-applying this PR.
2018-10-12 21:07:55 -07:00
jslavitz 673d56d1b7
Fix test template (#22982)
* added test
2018-10-11 16:25:34 -07:00
Alexander Aprelev e274ed866a [dart] Roll engine to dart roll 2018-10-10 20:45:22 -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
Philip 0c6c61988d Remove new keyword from default template app (#22454)
* Remove new keyword from default template app
2018-10-10 09:59:53 -07:00
Jason Simmons 52e5a9a70a
Add a profile build type to the Android app template (with plugin support) (#22884)
This is required in order to support "flutter run --profile"
2018-10-10 09:54:57 -07:00
Danny Tuppeny a02f9d501b
Allow passing a restart reason through to analytics (#21983)
* Allow passing a restart reason through to analytics

* Update to avoid overlaps with other code

* Remove TODO as this is the real live value

* Improve formatting + constant name
2018-10-10 10:23:32 +01: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
liyuqian a5c161c13a
Revert "Add a profile build type to the app template" (#22872)
Reverts flutter/flutter#22837

Try to fix application_test

* Revert "Add a profile build type to the app template (#22837)"

This reverts commit 3b248fdc11.
2018-10-09 11:43:31 -07:00
Stanislav Baranov 9a22f5a117
Ensure that VM snapshot is copied from artifacts before gradle merges assets. (#22707)
Gradle plugin support for adding flutter as subproject to another Android app
2018-10-09 10:40:03 -07:00
Jason Simmons 3b248fdc11
Add a profile build type to the app template (#22837)
This is required in order to support "flutter run --profile"
2018-10-09 09:45:46 -07:00
Greg Spencer c81f4c71a2
Have runAsyncChecked throw a ProcessException instead of a String. (#22710) 2018-10-08 19:11:31 -07:00
matthew-carroll 4f298e6776
Publish make-host-app-editable command with CLI docs. (#22635)
Publish make-host-app-editable command with CLI docs.
2018-10-08 16:02:13 -07:00
Andrew Davies 9ceb9ab305
[flutter_driver] Adds fuchsia compat for connect() (#22633)
Adds a Fuchsia compatibility function that allows for connecting to a
specific Isolate by name when running Flutter Driver on a Fuchsia
device.  This will check over multiple Dart VM's in an attempt to find
an Isolate by its name.
2018-10-08 11:09:07 -07:00
Greg Spencer e0b182e61a
Fix gradle error in devicelab tests (#22814)
Fixes a gradle error where it was failing to find a plugin because of an absolute path in the .flutter-plugins file instead of a relative path.

I had originally removed this variable because I thought it was redundant with the projectDir, but apparently I was wrong about that (one resolves to a relative path, and one resolves to an absolute path).

This PR reverts that part of the change and reintroduces the (not really) redundant variable.
2018-10-08 09:38:37 -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
Yegor 3184b7cb66
Revert "Use mixin syntax for Flutter's super-mixins (#22435)" (#22748)
This reverts commit 3c56e6c77d.

It breaks the AOT build.
2018-10-05 15:09:38 -07:00
Yegor 3c56e6c77d
Use mixin syntax for Flutter's super-mixins (#22435)
* first pass

* revert WidgetsBindingObserver

* disable prefer_mixin

* docs and more mixins

* newer engine; binding fixes

* upgrade dependencies

* fix test binding

* remove whitespace

* remove the obsolete `enableSuperMixins: true`

* upgrade dartdoc to 0.22.0

* temporarily use git version of dartdoc

* fix pub global activate syntax

* use dartdoc 0.23.0
2018-10-05 14:54:41 -07:00
Jason Simmons 9588946365
Do not continue a hot restart if _restartFromSources fails (#22645) 2018-10-05 13:48:41 -07:00
Danny Tuppeny 3ea4b44374
Increase timeout waiting for app to start (#22504)
https://github.com/flutter/flutter/issues/22338#issuecomment-425794734 shows almost 1 minute being spent on the `Resolving Dependencies` step alone. Possibly this needs to go higher still, but this should be a good start.
2018-10-05 17:02:08 +01: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
Michael Goderbauer 07fc9f6442
Fix mkdir call to not fail if dir exists (#22622) 2018-10-03 14:12:54 -07: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
Michael Goderbauer bfa9822134
Hide App.framework.dSYM from Spotlight (#22540) 2018-10-02 18:28:22 -07: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
jensjoha 4bd6ad7395
Use unsafePackageSerialization when running tests (#22407) 2018-10-02 08:36:21 +02:00
Yegor d91f1608c5
upgrade packages (#22524) 2018-10-01 14:42:53 -07: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
Tran Huy Phuc 481cb77a4c Fix flutter emaultors crash when ini file is not parsed (#22503)
Fixes #22247.
2018-10-01 18:02:43 +01:00
shrike69 c496751ae8
Change flutter tool to not require Fuchsia build args (#22382)
* Change flutter tool to not require Fuchsia build args

* Restore code that was commented out.

* Fix style nits.
2018-09-28 15:13:47 -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
shrike69 fd8a9603ac
Remove waitForViews() during hot reload (#22371) 2018-09-28 11:35:38 -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
Derek Hannah fafd615a81 updated Flutter Doctor grammar (#19676)
* updated Flutter Doctor grammar

* updated messaging based on a suggestion by Greg Spencer

* grammar update
2018-09-27 09:47:36 -07:00
Jonah Williams 63f2fb9f5d
Add coverage directory to fuchsia coverage script (#22236) 2018-09-26 13:17:20 -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 52697ef962 Fixes to support add2app on iOS (#22277)
* Fix xcode_backend.sh script to support add2app

* Fix ios deployment target. Too old for new Xcode.

* Fix ios host app

* Register plugins with Flutter view
2018-09-26 01:57:05 -04:00
Michael Goderbauer eda228404c
Strip debug symbols from App.framework for non-debug builds (#22245)
A dSYM file is created for the stripped `App.framework` and placed at `build/aot/App.dSYM`.

Reduces `App.framework` for Flutter Gallery by 6MB uncompressed, minus 23%.
Reduces `App.framework` for Hello World by 1.6MB uncompressed, minus 22%.

Fixes #4287.
Fixes #18693.
Helps with #21813.
See also #12012.

This change depends on https://dart-review.googlesource.com/c/sdk/+/76306.
2018-09-26 00:57:39 +02: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 6d134e0c86
Animation API improvements (#21540) 2018-09-23 00:43:05 -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
Stanislav Baranov c799c2fd80
Use "product" mode VM snapshot when running dynamic "release" mode flutter with cached engine. (#22043)
Dynamic "release" mode requires "product" (not "release") mode VM, so we must point it to the correct cached snapshot.

Generation and caching of this snapshot happens the following corresponding change: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1232134
2018-09-20 13:12:38 -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
Danny Tuppeny ff9dc22e44
Run logcat through shell (#21977)
This should fix #18889 which may be related to `adb logcat` not working correctly in non-terminals on some LG devices. See https://github.com/flutter/flutter/issues/18889#issuecomment-422217761.
2018-09-18 17:57:31 +01: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
Mehmet Fidanboylu 2895d71b79
Make Flutter repo Dart SDK 2.1-dev3.1 compatible (#21853)
This is a blocker for Google roll since we are not at dev4.0:
- Future is not yet part of dart:core.
- Future.sync().then<dynamic>... causes failure without the new keyword.
2018-09-13 18:50:21 -07:00
Alexander Aprelev 199422cd2d
Skip first time full dill transfer (#21133)
* Don't sync first full kernel file.

* Update the comment
2018-09-13 09:01:47 -07: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
Todd Volkert d7a0dcaa4a
Fix race condition in resident_runner (#21696)
* Don't set the `vmServices` member variable until it's fully initialized.
* Add a timeout to the future that sends the 'started' event to the IDE

https://github.com/flutter/flutter/issues/16604
2018-09-11 20:58:47 -07:00
Alexandre Ardhuin 774ca2f197
enable lint avoid_void_async (#21652) 2018-09-11 07:14:04 +02:00
Alexander Aprelev e2e241320b
Update fuchsia-tester so it takes map of kernel test files (#21573)
* Update fuchsia-tester so it takes map of kernel test files

* Set mainDart correctly. Cleanup nits.
2018-09-08 17:53:40 -07:00
Tim Sneath e8fa45c695
Update gitignore template for flutter create (#21192)
* update gitignore template to mirror

* Add a newline to end of doc

* remove Android/ and iOS/ subfolder gitignores
2018-09-08 10:20:57 -07:00
Jason Simmons 6effa190b9
Return an error from flutter_tools if gen_snapshot fails in an AOT build (#21576)
Fixes https://github.com/flutter/flutter/issues/21215
2018-09-07 16:44:01 -07:00
Chris Bracken 05d557b9ef
Make FlutterDevice.generator final (#21555)
Now that Dart 1 support has been eliminated, generator should always be
populated to a kernel compiler instance.

Also moves the constructor to the top of the class, and orders final
fields before non-final fields, as dictated by the style guide.
2018-09-07 13:56:04 -07: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
Jason Simmons 4fc5048efd
gradle: add a dependency on the task that generates the x86 jar instead of the jar file (#21466) 2018-09-06 13:59:41 -07:00
Chris Bracken 3519eabe8a
Do not pass --preview-dart-2 to Dart VM (#21455)
--preview-dart-2 is no longer necessary as it is now the default for the
standalone Dart VM.
2018-09-06 10:59:37 -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
Chris Bracken 05edc00a6f
Eliminate Dart 1 support from Flutter test (#21408) 2018-09-05 10:41:44 -07: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 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
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
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 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
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
Todd Volkert 2f32166f4b
Update packges (#21241)
https://github.com/flutter/flutter/issues/19578
2018-08-30 18:16:23 -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
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
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
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
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 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
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
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
leoylung adafaee0e3 Remove duplicated assets under /pkg/data (#20728)
Require componentName to ensure assets are placed under /pkg/data/<component-name>
2018-08-21 13:14:17 -07: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
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
Amir Hardon f4caa21c88 flutter update-packages 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 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
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
Todd Volkert f8a5c86109
Pass icu data file to fuchsia_tester (#20605) 2018-08-14 20:06:07 -07:00
leoylung 7762e45115 Check null on componentName (#20560) 2018-08-14 10:24:17 -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
leoylung 5311dff1f4 Duplicate assets under data/ to data/componentName (#20534) 2018-08-13 13:35:51 -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
Amir Hardon c0b7070319 flutter update-packages --force-upgrade 2018-08-08 08:36:24 -07: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
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
Ryan Macnak 6d92151f61 [gn] Be explicit about Dart sources. 2018-08-01 09:33:03 -07: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
Stanislav Baranov 51d3daadfb
Change 'flutter ide-config' to optionally create root Intellij module (#19920) 2018-07-30 10:15:26 -07:00
Greg Spencer e262817ac2
Fix the gradle templates so that they default to values rather than throw build exceptions. (#19916)
When creating a new project, the build fails with an error similar to:

"versionCode not found. Define flutter.versionCode in the local.properties file."

This puts developers in the untenable situation of having to edit a file with local paths, but being unable to check it in.

This changes the templates to default to using versionCode 1 and version "1.0" if they are not defined in the local.properties file.

Fixes #18983.
2018-07-27 18:24:13 -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
Todd Volkert 7ea164ecb5
More dart 2 fixes to fuchsia_tester.dart (#19846) 2018-07-26 17:46:08 -07:00
Jonah Williams 9c159638bc
Revert "Clean up startProgress logic. (#19695)" (#19842)
This reverts commit 0636c6fe60.
2018-07-26 16:44:27 -07:00