Commit Graph

2596 Commits

Author SHA1 Message Date
Danny Tuppeny
e2181a6ad9
First run simulator with -n to ensure it always opens a device (#17460) 2018-05-22 07:35:42 +01:00
Simon Lightfoot
be6501a91c Patch to fix builds with custom targets on iOS simulator. (#17734)
* Patch to fix builds with custom targets on iOS simulator. #16787

* Fix for unused import.

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

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

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

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

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

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

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

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

Relates to:

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

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

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

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

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

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

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

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

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

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

This migrates existing uses of Fingerprint over to Fingerprinter.

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

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

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

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

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

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

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

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

Still TODO:

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

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

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

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

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

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

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

* Address analyzer lint

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

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

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

* remove an unused import

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

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

Contains the following engine commits:

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

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

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

* Address review comments.

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

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

* Use ?.

* Include engine roll with dart sdk roll.

* parse(onError) -> tryParse

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

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

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

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

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

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

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

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

* add null aware and bump group number

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

* ensure non zero exit code

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

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

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

This reverts commit e59651f925.

* More thenReturn to thenAnswer when mocking Futures

* Revert "More thenReturn to thenAnswer when mocking Futures"

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

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

This reverts commit 52c9e96b30.

* Add dependency override

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

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

* separate dev and reg deps

* update pubspecs

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

* cleanup comments

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

* rerun tool with fixed string

* ensure correct working directory and bump versions

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

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

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

* Clean up unneccessary conversions

* add final.

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

This reverts commit 0f3eada066.

* Fix for windows failing test

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

* missed rename commit

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

This reverts commit c663e3367d.

* Check whether filesystem-root is emtpy.

* Restore broken merge

* Fix windows test

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

* revert formatting

* add back ignore

* add a default value to serverPort

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

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

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

* Update test package use following upgrade

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

* remove extra async tag

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

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

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

* Address some comments
2018-03-08 10:41:29 -08:00
Alexander Aprelev
69c33a321a
Fix path to uri conversion. (#15264) 2018-03-08 10:25:27 -08:00
Todd Volkert
fffb7630c1
Give file system recording serialization a timeout. (#15217)
Some file I/O is piped from OS processes and never completes,
so without havign a timeout on the recording serialzation, we
end up waiting forever on that I/O to complete.
2018-03-07 11:39:59 -08:00
shrike69
f3c806c9f2
Remove _checkPort() when getting flutter views (#15184) 2018-03-07 10:35:24 -08:00
Alexander Markov
7d0536b87a
Enable global type flow analysis in Dart 2 AOT (#15221) 2018-03-07 09:35:22 -08:00
Alexander Aprelev
c01cad3491
Fix flutter test --preview-dart-2 following last dart roll. (#15233)
* Fix `flutter test --preview-dart-2`  following last dart roll.

Incremental compiler maintains single incremental dill file, so for every test compilation that dill file has to be copied away for execution.

* Fix lints
2018-03-07 06:27:58 -08:00
Mikkel Nygaard Ravn
0d59679624
Make Flutter tooling work on Android without Xcode being installed (#15161) 2018-03-07 08:41:23 +01:00
Josh Soref
c5a5945e92 Spelling (#15229)
* spelling: accommodate

* spelling: allotted

* spelling: anonymous

* spelling: artificial

* spelling: associated

* spelling: asset

* spelling: button

* spelling: canvas

* spelling: compatibility

* spelling: coverage

* spelling: condition

* spelling: decoration

* spelling: deferring

* spelling: diameter

* spelling: direction

* spelling: displacement

* spelling: dropdown

* spelling: needing

* spelling: environment

* spelling: exited

* spelling: expansion

* spelling: explore

* spelling: families

* spelling: horizontal

* spelling: increment

* spelling: indices

* spelling: internationalization

* spelling: labrador

* spelling: localizations

* spelling: midflight

* spelling: milliseconds

* spelling: minimum

* spelling: multiple

* spelling: multiplication

* spelling: navigator

* spelling: overridden

* spelling: package

* spelling: performance

* spelling: platform

* spelling: porsche

* spelling: position

* spelling: preceded

* spelling: precede

* spelling: precedence

* spelling: print

* spelling: property

* spelling: readily

* spelling: reproducibility

* spelling: rounded

* spelling: scroll

* spelling: separate

* spelling: separator

* spelling: services

* spelling: specific

* spelling: specify

* spelling: synchronously

* spelling: through

* spelling: timeout

* spelling: triangle

* spelling: trivial

* spelling: unusual

* spelling: then

* spelling: vertically

* spelling: visible

* spelling: visited

* spelling: voice
2018-03-06 21:36:03 -08:00
Todd Volkert
d0cbbd5394
Fail if precompiled test entry point is specified, but more than one test suite is run (#15208) 2018-03-06 21:28:52 -08:00
Alexander Markov
602e6d74b5
Pass entry points JSON files to front-end server, take 2 (#15227)
* Pass entry points JSON files to front-end server (#15180)

* Fix ios/debug build which uses 'flutter build aot': do not require entry points files and disable AOT transformations in this mode
2018-03-06 18:45:45 -08:00
Alexander Markov
01d8e0a143
Revert "Pass entry points JSON files to front-end server" (#15223)
* Revert "Pass entry points JSON files to front-end server (#15180)"

This reverts commit 0edea88745.

Reason: buildbot failures on Mac.
2018-03-06 16:08:37 -08:00
Alexander Markov
0edea88745
Pass entry points JSON files to front-end server (#15180) 2018-03-06 14:50:22 -08:00
Keerti Parthasarathy
0263394028
Adding back commit #e0f6e62 with fix to test failures (#15212)
* Add to Artifacts, and add optional arguments to entry points for flut… (#15185)

Add to Artifacts, and add optional arguments to entry points for flutter run and test to allow for wiring up the same with preview-dart-2 internally

* Changing packages uri here is not necessary
2018-03-06 14:41:50 -08:00
Keerti Parthasarathy
7066cd7b88
Revert "Add to Artifacts, and add optional arguments to entry points for flut… (#15185)" (#15210)
This reverts commit e0f6e626e9.
2018-03-06 11:55:39 -08:00
Keerti Parthasarathy
e0f6e626e9 Add to Artifacts, and add optional arguments to entry points for flut… (#15185)
Add to Artifacts, and add optional arguments to entry points for flutter run and test to allow for wiring up the same with preview-dart-2 internally
2018-03-06 10:03:42 -08:00
Todd Volkert
545c292cb8
Pass --trace to pub when in verbose mode (#15169)
https://github.com/dart-lang/pub/issues/1812
2018-03-05 20:01:30 -08:00
Yegor
905f9acf90
[tools] consolidate "preview Dart 2" option in BuildInfo (#15083)
* [tools] consolidate "preview Dart 2" option in BuildInfo

* format BuildInfo constructor
2018-03-02 15:45:55 -08:00
Alexander Aprelev
673c5485ae
Generate and use dep-file for --preview-dart-2 (#15077)
* Use depfile in --preview-dart-2 mode.

* Generate and use frontend_server.d to guard against reusing outdated dill files when frontend_server changes.
2018-03-02 11:33:13 -08:00
Alexander Aprelev
1a7eeb34da
Roll engine to 97b22348c8d5cba471418dc94f9e384e384e796f. (#15069)
Changes since last roll:
  - Leave only widget creation tracker kernel pass in flutter frontend server. (#4727).
2018-03-02 09:51:48 -08:00
Alexander Aprelev
da24ad0b33
Roll engine to c88ba37c794f57982374bb53a694301198cad593 (#15053)
* Roll engine to c88ba37c794f57982374bb53a694301198cad593.

Changes since last roll:
  - move generated entry points JSON out of flutter_patched_sdk
  - List missing core lib bigint_patch.dart source for new Bigint implementation (#4735)
  - Skip over .emf-files. (#4739)
  - Roll dart to ee15c8eb689791f6777eb3f6b0a1e9c58ff0671b.

* defaultValue -> orElse
2018-03-02 06:23:59 -08:00
jcollins-g
050ee9d180
Improve robustness of --version parsing for sdkmanager (#15029) 2018-03-01 14:25:03 -08:00
Todd Volkert
621a963e8b
Fix call to git checkout (#15026)
In the case of "dev", `git checkout dev` could be miconstrued
as checking out the dev _directory_ rather than the branch...

https://github.com/flutter/flutter/issues/14865
2018-03-01 09:28:15 -08:00
Danny Tuppeny
db1a942479
Show 32/64bit in VS Code headings on Windows (#15018)
* Show 32/64bit in VS Code headings on Windows

Fixes #14949.
2018-03-01 17:19:06 +00:00
Alexander Aprelev
d3797628ca
Run flutter tests in preview-dart-2 mode on travis flutter builds. (#14728)
* Run flutter tests in preview-dart-2 mode on travis flutter builds.

* Run dart2 tests on osx. Run dart tests in dart2.

* Fix name camelCase

* Default options to empty array, rather than null

* Troubleshoot failures

* More logging

* Troubleshoot: run single test

* Troubleshoot: run 15 tests

* Troubleshoot: run 15 tests with fix

* Try limit concurrency to 1

* Limit concurrency for preview-dart-2 tests to 4

* Move dart2 tests to allow_failures section

* Reinstate tests_dart_2 shard

* Raise concurrency to 8

* Reuse compiler across multiple test runs

* Allow to switch entry points when recompiling.

Actually use single compiler to incrementally recompile all tests executed by 'flutter test'.

* Remove leftover commented code

* Fix comment

* Lints
2018-03-01 09:04:26 -08:00
Jacob Richman
7dbe9e7bcd
Fix cases where previewDart2 and trackWidgetCreation were (#14994)
accidentally missed due to named parameters being omitted.
2018-03-01 07:19:21 -08:00
Chris Bracken
eaa9848fd4
Improve error message for missing 32-bit libstc++ (#15004)
Adds more actionable error messages for users of the most common Linux
distributions. We could improve this by checking the current
distribution and emitting only the appropriate error message. We could
further improve that by only emitting the install instructions if we
determine the appropriate package is not installed.

See: https://github.com/flutter/flutter/issues/6207
2018-02-28 17:53:38 -08:00
Alexander Aprelev
9a9aed191d
When doing flutter test use batch compiler and link platform in. (#14983)
This is to fix #14931.
2018-02-28 12:54:30 -08:00
jcollins-g
614df6949c
Android license detector in doctor, take two (#14783)
* Revert "Revert "Add android license verification to doctor and some refactoring" (#14727)"

This reverts commit d260294752.

* Add tests, fix sdkManagerEnv and use it consistently, and rearrange Status object model

* AnsiSpinner needs to leave the cursor where it found it.

* fix tests

* Const constructor warning only shows up on windows...?

* Avoid crash if we can't find the home directory

* Make pathVarSeparator return a string in the mock

* Implement review comments

* Fix out-of-order problem on stop
2018-02-28 12:09:52 -08:00
Victor Choueiri
9c895fabf2 Add intelliJ path to doctor output (#14795) 2018-02-27 15:19:32 -08:00
Todd Volkert
91a85ac249
Fetch upstream refs before checking out branch in ChannelCommand (#14896)
https://github.com/flutter/flutter/issues/14893
2018-02-26 15:55:28 -08:00
Ryan Macnak
a0ffe87bc3
Use fx get-build-dir and fx netaddr --fuchsia to make fuchsia_reload more convenient. (#14854) 2018-02-26 15:14:09 -08:00
Alexander Aprelev
c3bbcb6f91
Add --preview-dart-2 to 'flutter drive' (#14858)
* Add --preview-dart-2 to 'flutter drive'

* Run driver side in --preview-dart-2 mode.

* Fix test
2018-02-24 09:28:58 -08:00
Vyacheslav Egorov
1f6b9471a8
Fix snapshot fingerprinting in --preview-dart-2 mode. (#14843)
* Fix snapshot fingerprinting in --preview-dart-2 mode.

This is a follow up to PR #14775 - instead of treating dill file
as an input treat as intermediate file and don't fingerprint it.

Make sure to always use original main Dart file as an entry
point for fingerprint calculation.

This fixes an issue that AOT snapshot would not be recompiled in
the preview-dart-2 mode if entry point changes, e.g.

$ flutter build aot -t t/x.dart --preview-dart-2
$ flutter build aot -t t/y.dart --preview-dart-2

The second invocation would not build AOT snapshot.

(This issue is visible on the microbencmarks bot)
2018-02-23 21:40:19 +01:00
Michael Thomsen
382ee4baa4
Detail number of available devices in doctor summary (#14781) 2018-02-22 17:40:56 +01:00
Todd Volkert
37ffb2d730
Make the isRunningOnBot getter more robust. (#14811)
It was failing in the case of an AppContext being in scope
but not having a `BotDetector` seeded in it.
2018-02-21 15:01:46 -08:00
Victor Choueiri
3f884661bd Skip upgrade check on upgrade (#14797) 2018-02-21 11:34:36 -08:00
jcollins-g
ca677011f8
Fix flutter tools packages_test when run off bots (#14692)
* Fix packages tests when run off bots

* Tweak dependencies to make bots happy

* Review comment
2018-02-21 09:54:07 -08:00
Todd Volkert
21c514fc56
Wire up support for --skia-deterministic-rendering (#14802)
https://github.com/flutter/flutter/issues/14519
2018-02-20 23:22:58 -08:00
Todd Volkert
eabfd570dd
Remove unused parameter to DevFS._scanBundleEntry (#14782) 2018-02-20 12:43:29 -08:00
Alexander Aprelev
45175f5342
Now that we are on dev-23, remove analyzer //ignore (#14780) 2018-02-20 11:20:13 -08:00
Alexander Aprelev
39ddeb52b0
Fix snapshot fingerprint check for --preview-dart-2. (#14775)
* Fix snapshot fingerprint check for --preview-dart-2.

* Remove printTraces
2018-02-20 10:02:00 -08:00
Jason Simmons
494270fe46
Return the result of the operation in ServiceObject.reload (#14755) 2018-02-20 09:45:32 -08:00
Victor Choueiri
4f5f4222e0 Add flutter version to non-verbose doctor output (#14779) 2018-02-20 09:22:49 -08:00
Danny Tuppeny
f914e701c5
Update some http links to https (#14762)
These URLs all automatically redirect HTTP to HTTPS so makes sense to point users at the secure versions.
2018-02-19 21:12:17 +00:00
Mikkel Nygaard Ravn
130dfc87ad
Make Podfiles use symlinks to local pods (#14748) 2018-02-19 21:32:13 +01:00
Mikkel Nygaard Ravn
f526805e20
Fix of flutter packages get in plugin project (#14757) 2018-02-17 21:25:13 +01:00
xster
f7f1685cac
Make sure broken pod install runs triggers pod install on next flutter build (#14753) 2018-02-16 16:05:16 -08:00
Todd Volkert
1686b6d56d
Remove fixed asset bundles - they're no longer used. (#14729) 2018-02-16 10:22:52 -08:00
Alexander Aprelev
fe00598ab3
Reintroduce engineDartSdkPath artifact. (#14742)
This is needed to support running with local engine's dart sdk.

This is follow-up to https://github.com/flutter/flutter/pull/14702.
2018-02-16 09:20:23 -08:00
Mikkel Nygaard Ravn
2000435728
Move plugin injection to just after pub get (#14743) 2018-02-16 10:17:28 +01:00
Alexandre Ardhuin
bd1921ec84
unnecessary parenthesis (#14533) 2018-02-16 07:43:19 +01:00
asiva
11105bed4d - Roll engine to version 9867298f86a7ccd5f1c07a83796ee21567d37fb0
- Remove redundant strong flag as it is the default for preview-dart-2
now
2018-02-15 17:45:36 -08:00
xster
1e397d3fb7
Break up and show more progression during an Xcode build (#14715)
* Created plumbing but has stream problem

* testing with makePipe

* Trying pipe but not really getting anywhere

* works by repeatedly reading line

* Minor cleanup

* works

* Clean up pipe after use.

* Move the last status forward

* Make sure failed script commands bubble up
2018-02-15 15:16:23 -08:00
Mikkel Nygaard Ravn
c2e1bc0322
Revert "Move plugin injection to just after pub get (#14560)" (#14734)
This reverts commit b3e4976ca2.
2018-02-15 22:55:36 +01:00
Mikkel Nygaard Ravn
b3e4976ca2
Move plugin injection to just after pub get (#14560) 2018-02-15 22:17:12 +01:00
Todd Volkert
d260294752
Revert "Add android license verification to doctor and some refactoring" (#14727)
Reports from that commit included:

* Doctor hanging
* Doctor prompting to install JDK
* AnsiStatus.cancel() printing elapsed time and extra newline
* Printing extra spinner character at the end of each line
2018-02-15 09:13:56 -08:00
Vyacheslav Egorov
3932a22cdf
When running tests with --preview-dart-2 check for compilation errors. (#14724)
If compiler failed to produce Kernel binary then compile(...) returns
null to the caller. If we don't check for null we end up trying to
run file called "null" which causes a very confusing crash of the
flutter_tester.
2018-02-15 16:57:52 +01:00
Alexander Aprelev
c0c6c60b8f
Use already downloaded dart sdk for frontend_server. (#14702)
* Use already downloaded dart sdk for frontend_server.

This is follow-up to https://github.com/flutter/flutter/pull/14610

* Remove reference to engine dart-sdk from artifacts

* Remove unused imports

* WIP to switch back to solution where dart sdk is downloaded into bin/cache/dart-sdk, but it is 'flutter precache -a' that can download all dart sdks for other platforms under bin/cache/artifacts/engine/<platform>/dart-sdk

* Download all dart sdks when 'flutter precache -a'
2018-02-15 07:29:42 -08:00
Devon Carew
53b348a50d
have flutter analyze support --preview-dart-2 (#14582)
* have flutter analyze support --preview-dart-2

* review comments
2018-02-14 16:00:29 -08:00
jcollins-g
59fe5d0f46
Add android license verification to doctor and some refactoring (#14535)
* Initial version, seems to work

* Unit test for android license checker

* Cleanups

* Windows analyzer wants const.

* Refinements to timeout

* review comments

* Forgot a nit
2018-02-14 15:25:12 -08:00
Alexander Aprelev
a11da23852
Put generated kernel files into <build> folder (#14693)
* Put generated kernel files into <build> directory

* USe default value for kernel file
2018-02-14 12:59:42 -08:00
Justin
ec76c652bd Add support for assets in Fuchsia packages (#14654)
Pull code out of flx.dart:assemble() to make flx.dart:buildAssets
which creates the AssetBundle. This will allow us to create just
this instead of an entire FLX.
2018-02-14 08:05:05 -08:00
Todd Volkert
3023fe2046
Add map-specific catch block in run_hot (#14689)
Fixes #14688
2018-02-13 21:08:33 -08:00
xster
80c10bc431
Work around xcodebuild's undocumented freeze when -showBuildSettings is used with -allowProvisioning* (#14684) 2018-02-13 16:49:01 -08:00
Mikkel Nygaard Ravn
8507b72af5
Fix xcode build settings parsing (#14672) 2018-02-13 22:19:03 +01:00
Vyacheslav Egorov
d745684393
Plumb strong mode option through startApp(...) to the engine on iOS. (#14653)
This is a temporary workaround until we solve #14594.
2018-02-13 14:16:26 +01:00
xster
d401bd78ae
Reduce Xcode noise #3 (#14663)
* Revert "Revert "Reduce xcodebuild noise #2" (#14641)"

This reverts commit 2d47481f1e.

* Stop scrapping xcodebuild output, get the right build settings

* clone the command params first
2018-02-13 01:56:13 -08:00
Michael Thomsen
bc36ca9619
Change the default for pub tracing to false for non-bot runs (#14552)
* Change the default for pub tracing to false for non-bot runs

* Review feedback: update docs

* Review feedback
2018-02-13 09:44:27 +01:00
Alexander Aprelev
c54f0bcdb3
Pipe --preview-dart-2 when running flutter daemon. (#14658) 2018-02-12 18:26:34 -08:00
xster
6d2dc050b2
Let Xcode communicate with Apple and create new provisioning profiles and register new devices (#14589) 2018-02-12 16:44:21 -08:00
Jason Simmons
09aa673b1d
Revert "Disable selection of the Android ARM64 target platform based on the attached device" (#14650)
This reverts commit cdb581807c.

Dart has been updated in the engine, and this workaround should no longer be necessary.

Fixes https://github.com/flutter/flutter/issues/14646
2018-02-12 13:56:17 -08:00
Jacob Richman
2c05ecab9f
Flutter tools support for kernel transformer tracking Widget creation locations. (#13997) 2018-02-12 10:44:31 -08:00
Jason Simmons
02f59784b8
Download android-arm64 AOT tools for Mac and Windows hosts (#14528)
Fixes https://github.com/flutter/flutter/issues/14524
2018-02-12 09:48:53 -08:00
Mikkel Nygaard Ravn
2d47481f1e
Revert "Reduce xcodebuild noise #2" (#14641)
Merging to get back to a green tree.
2018-02-12 15:15:51 +01:00
xster
33ea7f84a9
Reduce xcodebuild noise #2 (#14622)
* Revert "Revert "Reduce noise in xcodebuild stdout (#14586)" (#14605)"

This reverts commit 8e2278bd8d.

* Specify the build config when cleaning
2018-02-11 05:54:14 -08:00
Chris Bracken
4e106d7e47
Eliminate doctor warning about paths with spaces (#14614)
Some people call me the space cowboy
Some people call me the gangster of love
Some people call me Maurice
2018-02-10 13:43:31 -08:00
xster
8e2278bd8d
Revert "Reduce noise in xcodebuild stdout (#14586)" (#14605)
This reverts commit 74ddda5177.
2018-02-09 14:28:36 -08:00
xster
74ddda5177
Reduce noise in xcodebuild stdout (#14586)
* Reduce noise in xcodebuild stdout

* Reduce output from cleaning, from non failing xcode outputs and from script

* Check xcodebuild clean's exit code

* Revert "Reduce noise in xcodebuild stdout"

This reverts commit 222a26f55f.
2018-02-09 12:47:27 -08:00
Todd Volkert
ab4506cad2
Add annotations to ignore analyzer errors on pre-dev.22 SDKs (#14599) 2018-02-09 12:21:43 -08:00
Alexander Aprelev
0f3aa50071
Roll engine with rolled dart (#14538)
* Roll engine to pre-dart roll

* Roll engine to pick up updated dart

* Apply Map changes

* Move to dev.22

* Fix some analysis issues

* Silent analyzer

* More consts

* More const massaging

* Yet more const massaging

* Yet more const massaging

* Use nonconst()
2018-02-09 10:33:24 -08:00
Jason Simmons
fa122f5a6b
Disable selection of the Android ARM64 target platform based on the attached device (#14581)
The current ARM64 back end generates code that crashes on some devices,
including Pixel phones.  With this change, the android-arm64 target will
not be used by "flutter run" unless explicitly requested.
This is intended as a workaround until we can roll out an engine with the
required Dart VM fix.

See https://github.com/flutter/flutter/issues/14454
2018-02-08 17:51:20 -08:00
Jason Simmons
3c9ad811f7
Add a flutter run option that can override the default target platform (#14537)
By default flutter run will build a 64-bit APK if the attached Android device
is 64-bit.  Specifying --target-platform=android-arm will deploy a 32-bit APK
to a 64-bit device.

Fixes https://github.com/flutter/flutter/issues/14526
2018-02-08 14:56:01 -08:00
jcollins-g
7982694a0c
Hide the NDK warning that should never happen with a regexp (#14503) 2018-02-08 12:16:04 -08:00
asiva
225b52bc0e Fix iOS build which broke after the change to fuse --strong option into
--preview-dart-2.
2018-02-08 11:38:12 -08:00
asiva
83e0ca24fd Fuse --strong into --preview-dart-2 option. 2018-02-08 09:18:52 -08:00
Danny Tuppeny
8ccc9a45c9 Add flutter doctor support for VS Code (#14463)
Looks in default install locations on Mac, Linux and Windows for VS Code. If found, looks in default extension location to see if Dart Code is installed.

If VS Code is not installed, nothing is reported. If VS Code is installed without Dart Code, a warning is shown.
2018-02-07 10:49:54 -08:00
Ian Hickson
a441a4030f
Fix the channel-switching logic (#14507) 2018-02-07 09:56:45 -08:00
Danny Tuppeny
efb88a0380 Reject requests for hot reload if a hot reload is already in progress. (#14494)
* Reject requests for hot reload if a hot reload is already in progress.

Fixes #14184

* Implement TODO, verifying further hot reloads complete sucessfully.

* Fix year on new file.

* Add missing type annotations to fix lints

* Add run_machine_concurrent_hot_reload to manifest for CI

* Reformat document

... but undo things that cause lints (like single-line ifs)

* Extract std stream transformations

* Make inProgressHotReload private

* Disallow all types of reload while hot reload in progress

* Simplify code handling in-progress hot reloads
2018-02-07 08:58:23 -08:00
Greg Spencer
14309b9311
Adds the semantic node traversal API. (#14060)
This adds an API for defining the semantic node traversal order.

It adds a sortOrder argument to the Semantics widget, which is a class that can define a list of sort keys to sort on. The keys are sorted globally so that an order that doesn't have to do with the current widget hierarchy may be defined.

It also adds a shortcut sortKey argument to the Semantics widget that simply sets the sortOrder to just contain that key.

The platform side (flutter/engine#4540) gets an additional member in the SemanticsData object that is an integer describing where in the overall order each semantics node belongs. There is an associated engine-side change that takes this integer and uses it to order widgets for the platform's accessibility services.
2018-02-06 13:24:16 -08:00
Alexandre Ardhuin
2e80bf1db7
unnessary parenthesis (#14475) 2018-02-06 09:00:11 +01:00
Chris Bracken
cad61b1817
Mark iOS App ID param as required (#14480)
Previously, the iOS ApplicationPackage subclasses did not mark the
bundleID constructor parameter as @required. This is passed up to the
ApplicationPackage constructor as the id parameter which is already
marked @required and is asserted to be non-null.
2018-02-05 18:11:33 -08:00
Chris Bracken
024cebf8f3
Fix mismatched bracket in Xcode failure diagnostic (#14478)
When diagnosing a failed Xcode build, if neither the development team
(for automatic provisioning) nor the provisioning profile (for manual
provisioning) is set, display the appropriate error message. Previously,
this method would not output the appropriate error message if a
only a development team was set.
2018-02-05 18:11:07 -08:00
Alexandre Ardhuin
3c379aaf43
whitespace cleanup (#14458) 2018-02-05 22:20:21 +01:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Jason Simmons
d5149d4457
Toolchain support for Android ARM64 targets (#14394) 2018-02-01 15:14:48 -08:00
jcollins-g
26102c9120
Condense and summarize doctor output without --verbose (#14173)
* Flatten change out from lots of merges and temporary hacks for #7224

* Expand fakes to cover cases where doctor passes

* -v != --verbose

* Cosmetic touchups

* delint

* Clean up summary line, add a switch for review comments

* Review comments

* nit

* review comment

* review comments
2018-02-01 10:27:55 -08:00
jcollins-g
c81a5ed09a
fix rare flutter_tools logging crash in daemon mode (#14401)
* Populate AnsiTerminal in context for daemon launches

* Strip out AnsiTerminal additions to context since they are no longer needed
2018-02-01 09:30:53 -08:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
jensjoha
5ccd5a1e75 [kernel/flutter] Improve speed of first hot reload (#13699)
* [kernel/flutter] Improve speed of first hot reload

* [kernel/flutter] Improve speed of first hot reload

* Revert "[kernel/flutter] Improve speed of first hot reload"

This reverts commit f3dc133878.

* Revert "[kernel/flutter] Improve speed of first hot reload"

This reverts commit f7bcb082b0.

* Revert "Revert "[kernel/flutter] Improve speed of first hot reload""

This reverts commit 73c7a1a8e8.

* [kernel/flutter] Improve speed of first hot reload

Do so by not evicting unnecessary paths (while still evicting paths
that was changed between the generation of the package file and the
initial upload).

* Fix grammar in method name

* Fix bad merge

* Add method to super class
2018-01-31 07:39:58 -08:00
Vyacheslav Egorov
340d9e00cf
Fix various strong mode issues. (#14284) 2018-01-31 08:21:32 +01:00
Ian Hickson
3001b3307d
Try to make transitioning channels actually work. (#14353)
* Try to make transitioning channels actually work.

* Update upgrade.dart
2018-01-30 11:37:15 -08:00
Alexander Markov
a0ffbe29ff
Add tracing to print front-end command (#14340) 2018-01-30 08:52:04 -08:00
Todd Volkert
1859e82a3d
Extensibility improvements to flutter_tools (#14299)
* Make the current command injected into the AppContext, allowing
  other classes to inject the current command.
* Introduce `AssetBundleFactory`, an injected factory class for
  spawning instances of `AssetBundle`. This allows other run contexts
  to use custom asset bundling logic.
* Clean up RunCommand by removing a 'packages' argument that duplicated
  a global argument by the same name (and for the same purpose).
  Duplicate arguments are confusing and error-prone.
2018-01-29 09:40:28 -08:00
Chris Bracken
6854e81bdb
Fix host engine lookup for iOS simulator builds (#14304)
When running with --preview-dart-2, host variant of the engine is
required. Simulator builds, like device builds, should resolve
host_RUNTIMEVARIANT_OPTVARIANT, not host_RUNTIMEVARIANT_sim_OPTVARIANT.
2018-01-26 17:31:49 -08:00
Ian Hickson
64e2e00d6f
Attempt to make flutter compatible with more git versions (#14273)
Fixes https://github.com/flutter/flutter/issues/14232

(I haven't tested this with older versions of git, I'm just going on
what @jason-simmons wrote in the bug.)
2018-01-26 16:59:56 -08:00
Yegor
4c21bf103a
warn about hard-coded version constraints in the upgrade script (#14291) 2018-01-26 12:41:09 -08:00
Todd Volkert
c11f174946
Mark FlutterManifest.createFromString() as visible for testing only. (#14276) 2018-01-26 11:35:38 -08:00
Ian Hickson
014a2255df
Nicer error message for TLS errors (#14285)
Also some trivial improvements to style.
2018-01-26 11:09:23 -08:00
Vyacheslav Egorov
c23509e9fd
Unpin test and upgrade packages (#14282)
* Unpin package:test and upgrade packages

* Update packages/flutter/test/foundation/stack_trace_test.dart

* Also add packages/flutter_tools/test/data/asset_test/font/.dartignore to ensure that update-packages --force-upgrade does not crash.
2018-01-26 10:40:03 -08:00
Vyacheslav Egorov
ae72cea001
Fix an incorrect variable name in Dart 2 flutter test code (#14283)
The code was attempting to delete temporaryDirectory while it should have been deleting tempBundleDirectory
2018-01-25 19:33:24 -08:00
Alexandre Ardhuin
10f721c8a5
use const instead of final with const declarations (#14253) 2018-01-25 19:28:22 +01:00
Ian Hickson
97b9579e55
Random cleanup across the tree (#14221) 2018-01-25 09:46:48 -08:00
Chris Bracken
1058cff395
Add version check for doctor --android-licenses (#14249)
flutter doctor --android-licenses requires Android sdkmanager version 26
or later. When sdkmanager is not available (SDKs earlier than v25),
direct users to SDK upgrade instructions. When it's installed but not
v26 or later, emit instructions to run sdkmanager --update.
2018-01-24 20:01:11 -08:00
Michael Goderbauer
84580b545a
Make Assets more robust across platforms (#14246) 2018-01-24 13:16:23 -08:00
Chris Bracken
9654659c72
Add AndroidSdk.sdkManagerPath, sdkManagerVersion (#14247)
Convenience getters for the the path to the Android SDK manager and the
currently installed version of the tool.

Pre-factoring to support better checks around the --android-licenses
command, which uses a feature of the SDK manager that is unsupported in
older versions of the tool.
2018-01-24 12:38:08 -08:00
Alexander Aprelev
7c2fe34fbb
Run 'flutter test --preview-dart-2' in strong mode (#14188)
* Default to strong for 'flutter test --preview-dart-2' mode

* Remove empty line

* Dont init to null

* Break up line to make it more readable

* Add missing type annotation
2018-01-22 10:26:01 -08:00
Michael Goderbauer
733bd04904
Fix custom fonts on Windows (#14191)
Fixes https://github.com/flutter/flutter/issues/13870.
2018-01-22 10:00:27 -08:00
Devon Carew
159db5ca44
pass through preview-dart-2, strong, ipv6 in daemon mode (#14200)
* pass through preview-dart-2, strong, ipv6 in daemon mode

* ws change to kick the windows bot
2018-01-20 14:43:23 -08:00
Alexander Aprelev
a92110a265
Clean up build directory before copying freshly produced build artifacts over. (#14081) 2018-01-20 11:11:44 -08:00
Ian Hickson
38ce59f039 [G] Revert "Exclude flutter doctor IDE validators in CI environments" (#14196)
* Revert "Bump async, http, and vm_service_client packages (#14136)"

This reverts commit 7ffcce84a2.

* Revert "Exclude flutter doctor IDE validators in CI environments (#13816)"

This reverts commit 3258c54618.
2018-01-19 20:47:23 -08:00
Ali Bitek
3258c54618 Exclude flutter doctor IDE validators in CI environments (#13816) 2018-01-19 14:45:10 -08:00
Alexander Aprelev
e910ce7ece
Fix local import paths. (#14183)
This is in attempt to resolve build failure on Windows.
2018-01-19 07:05:28 -08:00
Alexander Aprelev
a50b465c99
Add --preview-dart-2 to 'flutter test' (#14135) 2018-01-19 06:17:28 -08:00
Ian Hickson
9e42e4b88f
New release process (#14061)
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
2018-01-18 07:59:06 -08:00
Mikkel Nygaard Ravn
4353297079
Change default organization name to example.com in project templates (#14116) 2018-01-18 09:21:24 +01:00
Michael Goderbauer
a67df9e1d1
Fix crash during artifact download (#14147) 2018-01-17 16:08:19 -08:00
Ian Hickson
18c60d3301
Fix import statements in flutter_tools (#13911) 2018-01-17 10:17:52 -08:00
jcollins-g
a6e5de2176
Make artifact downloading more robust for flaky networks, take two (#14084)
* Revert "Revert "Make artifact downloading more robust for flaky networks" (#13995)"

This reverts commit 33d8a03545.

* Use subdirectories to organize cached files

* Fix unauthorized import
2018-01-16 08:07:37 -08:00
Vyacheslav Egorov
d9fd4d6f49
Make sure to pass strong mode options down to gen_snapshot (#14118) 2018-01-16 15:38:29 +01:00
Jason Simmons
e11cf5c94c
Use a safe codec to read Skia SKP screenshot files when checking for errors (#14086)
If the downloaded file is an actual SKP and not an error report, then the
default UTF-8 codec will fail to decode the SKP content
2018-01-12 17:54:49 -08:00
Chris Bracken
6a42ed3f55
Decode syslog-encoded iOS logs (#14075)
Apple encodes syslog entries using a 7-bit encoding where input UTF-8 bytes
are encoded as follows:
1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash).
3. 0x5c (backslash): octal representation \134.
4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40).
5. 0xa0: octal representation \240.
6. 0xa1 to 0xf7: \M-x (where x is the input byte stripped of its high-order bit).
7. 0xf8 to 0xff: unused in 4-byte UTF-8.

As there doesn't appear to be a system tool to decode these strings, we
implement here in Dart. If we're unable to decode a string (e.g.
decoding results in an invalid UTF-8 string), we fall back to emitting
the log line as-is.
2018-01-12 15:12:26 -08:00
Alexander Aprelev
a48185a6ad
When targeting iOS sim in preview-dart-2, always compile. (#14059)
Fixes https://github.com/flutter/flutter/issues/14058.
2018-01-11 18:19:28 -08:00
Alexander Aprelev
e2e3c5df05
Reland 9534082fc0 with fix for incremen… (#14040)
* Reland 9534082fc0 with fix for incremental compilation.

When in incremental mode, awaiting exitCode won't work because compiler is not expected to exit after compilation.
Instead listen for stdout stream closing and report error if outputFilename has not been received.

* Fix lints
2018-01-11 14:33:50 -08:00
Alexander Aprelev
bedf987fc8
Pipe strong mode option for iOS simulator. (#14002) 2018-01-11 14:08:28 -08:00
Alexander Aprelev
991765780b
Fix handling --preview-dart-2 for ios (#14016)
* Fix handling --preview-dart-2 for ios

* final var
2018-01-11 13:24:51 -08:00
Devon Carew
ccc0d29454
send 'reloadRecommended' info to IDEs (#13996)
* send 'reloadRecommended' info to IDEs

* rename hint ==> hintMessage
2018-01-11 12:55:00 -08:00
Alexander Aprelev
5dc4ce85d9
Revert "Handle abnormal termination of frontend compiler. (#13982)" (#14037)
This reverts commit 9534082fc0.

Causes hot_mode_dev_cycle__preview_dart_2_benchmark test timeout.
2018-01-10 19:54:08 -08:00
Alexander Aprelev
9534082fc0
Handle abnormal termination of frontend compiler. (#13982)
* Check frontend_server exit code.

When frontend_server completes abnormally, flutter tools has to stop and let user know.

* Add tests
2018-01-10 17:51:08 -08:00
Leaf Petersen
ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
jcollins-g
33d8a03545
Revert "Make artifact downloading more robust for flaky networks" (#13995)
* Revert "Change github readme links to be served by github (#13929)"

This reverts commit fd516d9538.

* Revert " Rename SemanticsFlags to SemanticsFlag (#13994)"

This reverts commit 24e3f70536.

* Revert "Make artifact downloading more robust for flaky networks (#13984)"

This reverts commit 4d37e03e1d.
2018-01-09 12:15:58 -08:00
jcollins-g
4d37e03e1d
Make artifact downloading more robust for flaky networks (#13984)
* First version

* Add a clarifying comment

* Add verify to ZipDecoder.decodeBytes call

* Review comments

* Need OS Error for missing files

* FileSystemException, not OSError.
2018-01-09 10:30:42 -08:00
Ian Hickson
9114e2afd1
The dependency script wasn't catching quite all our transitive dependencies (#13954) 2018-01-08 21:39:33 -08:00
P.Y. Laligand
1954ffcaf5
[fuchsia] dart_package is now dart_library. (#13979) 2018-01-08 13:16:46 -08:00
Alexander Aprelev
c3366a65e1
Set asset directory path only on first hot reload. (#13934) 2018-01-08 10:05:44 -08:00
Mikkel Nygaard Ravn
0a96f96c4f
Update and simplify Android templates (#13970) 2018-01-08 15:01:43 +01:00
Alexander Aprelev
86c6ce99a3
Remove pinning that became obsolete once we moved up to gradle 4.1 (#13963) 2018-01-06 13:42:11 -08:00
Alexander Aprelev
60c5fed12d
Pin connectivity and device_info to unbreak build. (#13959) 2018-01-05 23:52:54 -08:00
Alexander Aprelev
fdbbfc3b32
Pin url_launcher package to prevent major version upgrade (#13952)
* Pin url_launcher to 1.0.3

* Commit results of 'bin/flutter update-packages --force-upgrade'

* Added TODO
2018-01-05 22:54:44 -08:00
Alexander Aprelev
27c61eeb50
Explicitly report CFE output(when using --preview-dart-2) (#13936)
* Explicitly report CFE output(when using --preview-dart-2)

* Fix test so it looks at errorText

* Fix expected text
2018-01-05 18:51:35 -08:00
xster
e6e4406de8
Fix simulator not printing to console lines with ) (#13920)
* it's fixed

* Add test for simulator log reader
2018-01-05 11:34:05 -08:00
jcollins-g
e25d881046
Reduce the chances of bots reporting analytics (#13915)
* First version

* Prevent modification of .flutter during analytics test

* Pass in directory and override analyzer warning due to conditional import

* Review comments
2018-01-05 09:38:13 -08:00
Alexander Aprelev
8da5af55c5
Send RPC request to switch assets directory on hot reload. (#12872)
* Send RPC request to switch assets directory on hot reload.

This is needed to pick up updated assets that are expected to be picked up on hot reload.

* Assert assets directory is not null.

* Better multiple future wait

* Add type annotation
2018-01-04 14:27:25 -08:00
Siva
426d6b0672
support for --strong option (#13859)
* Plumb a --strong option through to the front end server and the engine
so that we can run flutter apps in preview-dart-2 and strong mode

* - Address analyzer lint issues
*- correctly set up strong mode option in the case of AOT builds
2018-01-04 10:39:02 -08:00
Mikkel Nygaard Ravn
b6796f426f
Inject plugins before evaluating Gradle project (#13827) 2018-01-02 08:24:21 +01:00
xster
4d2c2aaaa1
Revert pod install skip revert (#13774)
* Revert "Revert "Enable developers to run pod from terminal directly and skip pod install if possible. (#13374)" (#13770)"

This reverts commit 0759043e47.

* some nits on cocoapods code

* put back the FLUTTER_FRAMEWORK_DIR env variable
2017-12-27 07:30:31 -08:00
xster
0759043e47
Revert "Enable developers to run pod from terminal directly and skip pod install if possible. (#13374)" (#13770)
This reverts commit c6a17525e8.
2017-12-27 02:51:44 -08:00
KyleWong
c6a17525e8 Enable developers to run pod from terminal directly and skip pod install if possible. (#13374)
Avoids running pod install if .flutter-plugins and its flutter framework pod dependency didn't change
2017-12-27 01:27:15 -08:00
Alexander Aprelev
70b32e85a3 Use processManager.canRun instead of file existance check. 2017-12-22 17:00:24 -08:00
Alexander Aprelev
a6c963032e Fix gen_snapshot name, path for Windows.
Executables have '.exe' extension on Windows. We do have to specify extension for gen_snapshot since when running with local engine, we are looking for that exact file before launching it.
2017-12-22 17:00:24 -08:00
Sarah Zakarias
73552ecae2 Remove app.flx on iOS (#13648) 2017-12-18 18:58:44 +01:00
Chris Bracken
7fb78523e9
Require Xcode 9.0 or later for iOS builds (#13608) (#13622)
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.

The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.

This re-lands flutter/flutter#13608 now that the devicelab Macs have
been updated to Xcode 9.
2017-12-15 18:13:10 -08:00
amirh
05dba60c63
keep recursing past directories with pubspec.yaml when gathering packages (#13573) 2017-12-15 12:21:03 -08:00
Chris Bracken
6728d4845d
Revert "Require Xcode 9.0 or later for iOS builds (#13608)" (#13612)
Our devicelab machines have not yet been upgraded to Xcode 9. Once this
has been done, I'll re-land this.

This reverts commit 0fac5f01a2.
2017-12-15 11:59:42 -08:00
Chris Bracken
0fac5f01a2
Require Xcode 9.0 or later for iOS builds (#13608)
We now require Xcode 9.0, which ships with the iOS 11 SDK, for iOS
builds. This change does not affect the minimum supported iOS deployment
target, which remains iOS 8.

The iOS 11 SDK adds support for safe area insets, which model the status
bar, iPhone X home indicator, and symmetric horizontal insets to avoid
the iPhone X sensor housing when in landscape mode.
2017-12-15 11:44:01 -08:00
amirh
7d90bfc179
Pin the test package to 0.12.26 (#13546) 2017-12-14 08:52:56 -08:00
Sarah Zakarias
5e18c07614
Reapply flutter_assets (#13567)
* Revert "Revert engine (#13547)"

This reverts commit ee65db11d4.

* Keep flaky mark
2017-12-14 17:27:25 +01:00
Sarah Zakarias
5c90c35f22
Write flutter_assets directory on Windows (#13564) 2017-12-14 16:08:31 +01:00
Michael Goderbauer
e5846d962e
Verify that committed GeneratedPluginRegistrant are up-to-date (#13541) 2017-12-13 17:49:54 -08:00
Yegor
ee65db11d4
Revert engine (#13547)
* Revert "Include a directory with Flutter assets (#12944)"

This reverts commit 3af6b9cbf5.

* Revert "Upgrade project.pbxproj to include flutter_assets (#13011)"

This reverts commit 08128cb29b.

* Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)"

This reverts commit 35f1a04195.

* mark complex_layout_ios__start_up as flaky
2017-12-13 16:25:25 -08:00
Sarah Zakarias
08128cb29b
Upgrade project.pbxproj to include flutter_assets (#13011) 2017-12-13 23:02:10 +01:00
Sarah Zakarias
3af6b9cbf5
Include a directory with Flutter assets (#12944) 2017-12-13 22:30:32 +01:00
Mikkel Nygaard Ravn
e5aac6928b
Support Android Gradle plugin v3.0.1 (#13492) 2017-12-13 12:16:22 +01:00
Mehmet Fidanboylu
951b85a12b
Increase coverage collection timeout to 2 minutes. Leafy is hitting the limits of the previous timeout of 30 seconds for tests that touch a lot of code in the app. (#13527) 2017-12-12 15:54:18 -08:00
Greg Spencer
6b8ceb9472
Make the create command call pub get online instead of offline. (#13505)
We thought it would be OK to call the create command offline-only, but it turns out that isn't a great idea because not all of the create template dependencies are cached by running flutter_tool.

This PR makes it go online by default when running pub get after creating a project, and adds an "--offline" flag to the create command so that offline users can use it offline if their cache is warm.
2017-12-11 21:21:41 -08:00
Ben Konyi
0ca1af7e4f Removed additional dead code. 2017-12-11 11:13:16 -08:00
Ben Konyi
90ad465f8e Removed dead code. 2017-12-11 11:13:16 -08:00
Ben Konyi
08c2e0771f Removed special cases for '.exe'. 2017-12-11 11:13:16 -08:00
Ben Konyi
bf33eb78c5 Enabling 'flutter test' for Windows (woohoo!). 2017-12-11 11:13:16 -08:00
Ben Konyi
3fe19d95c6 update_script 2017-12-11 11:13:16 -08:00
Greg Spencer
aedee0df3d
Make create command use pub in offline mode. (#13462)
In order to allow offline usage of the create command we need to be able to tell pub not to try and contact the server to see if new versions are available. Since all the versions that create could want are pinned, it shouldn't need to check for new versions.
2017-12-08 15:32:10 -08:00
Zachary Anderson
927a143d79
[flutter_tools][plugins] generated registerWith guards against re-registration (#13384) 2017-12-08 09:38:02 -08:00
Yusuke Konishi
ca5ab1b42a Remove unnecessary error message when cocopods is not available (#13241)
* Remove unnecessary error message

* Add AUTHOR
2017-12-07 18:48:59 -08:00
Kevin Moore
64feb95ada
Revert "(cleanup) standardize on shouldRunPub and usesPubOptions() in commands (#13427)" (#13430)
This reverts commit 9315a79b11.

There is an unfortunate interaction with verifyThenRunCommand
2017-12-07 14:29:12 -08:00
Kevin Moore
9315a79b11
(cleanup) standardize on shouldRunPub and usesPubOptions() in commands (#13427) 2017-12-07 13:31:32 -08:00
Devon Carew
0350c9ecff
route device issue diagnostics to flutter doctor (#13346)
* route device issue diagnostics to flutter doctor

* review comments

* review comments
2017-12-07 09:32:23 -08:00
Jakob Andersen
e1018fab34
Make artifacts URLs configurable. (#13380)
Add support for configuring the base storage URL for Flutter's
artifacts. If FLUTTER_STORAGE_BASE_URL is set, use it instead of
storage.googleapis.com.

The pub server can be overridden by setting PUB_HOSTED_URL.
2017-12-07 16:30:23 +01:00
Kevin Moore
13a6d40f90
flutter_tools: ensure the context value passed to pub is consistent (#13366)
Adds a class `PubContext` with a fixed set of allowed values
Make it clear these values should not be changed casually

Fixed one inconsistency already: update_packages vs update_pkgs
Provide more information for verify calls
Eliminate `ctx_` prefix.
2017-12-06 08:10:56 -08:00
Devon Carew
cbcdd03ef0
some wording tweaks to the doctor text (#13356) 2017-12-06 08:05:51 -08:00
Greg Spencer
f29ecba6de
Use .pub-cache from Flutter root, if it exists. (#13358)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.

This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
2017-12-05 14:46:39 -08:00
Greg Spencer
c89cf6ccc6
Reverting my .pub-cache change to figure out why it's still failing. (#13355)
* Revert "Add tests."

This reverts commit 31bad961ff.

* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"

This reverts commit 72d6bcc3f7.
2017-12-05 12:51:18 -08:00
Greg Spencer
72d6bcc3f7
Use .pub-cache from Flutter root, if it exists. (#13248)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
2017-12-05 12:02:14 -08:00
Martin Kustermann
3280f23452
Use only one message for NDK discovery, remove accidental newline (#13348) 2017-12-05 18:17:28 +01:00
Alexander Markov
a69af9902c
Pass --aot option to front-end server when generating kernel for AOT build (#13342) 2017-12-04 16:57:44 -08:00
Kevin Moore
c25608d83b
Provide more information in PUB_ENVIRONMENT for pub get/upgrade (#13307)
* Provide more information in PUB_ENVIRONMENT for `pub get/upgrade`

Should help diagnose and fix https://github.com/dart-lang/pub-dartlang-dart/issues/636
2017-12-01 16:20:06 -08:00
Phil Quitslund
a4bc470fa5
Tweak access to linter internals in package validation. (#13297)
A more future-proof approach to accessing internal package name lint rule description details.

See: https://github.com/dart-lang/linter/issues/654
2017-12-01 10:54:24 -08:00
Jakob Andersen
5174dbaff5
Download our own copy of gradle wrapper. (#13267)
Rather than depending on android.googlesource.com for hosting the gradle
wrapper, host our own copy on storage.googleapis.com (along with our
other artifacts).

Also added a script to repackage AOSP's version into ours, in case we
ever need to update it.

Addresses the gradle wrapper part of #11681.
2017-12-01 09:39:13 +01:00
Alexander Aprelev
5a1dcdb427
Fix --preview-dart2 option handling for ios profile/release. (#13285)
* Fix --preview-dart2 option handling for ios profile/release.

* Remove unused parameter
2017-11-30 17:17:39 -08:00
Yegor
e809511682
remove dependency on package:quiver/iterables.dart (#13281) 2017-11-30 15:09:39 -08:00
Alexander Aprelev
42ca92c756
Hide preview-dart-2 flag. Show only in verbose (#13270) 2017-11-30 10:36:46 -08:00
Alexander Aprelev
4447c0aaf3 Add --preview-dart-2 option support for ios builds (#13251) 2017-11-29 18:11:34 -08:00
Mehmet Fidanboylu
b61cbc735e
Add capability to print engine dart sdk to flutter doctor (#13085)
* Add capability to print engine dart sdk to flutter doctor

* First round of review comments

* second round of comments

* Final review comments
2017-11-29 11:03:50 -08:00
Todd Volkert
137f0751b2
Add support for IOS_SIMULATOR_HOME environment variable in IOSSimulat… (#13236)
Add support for IOS_SIMULATOR_HOME environment variable in IOSSimulator.logFilePath

flutter_tools can be run on environments where the user's HOME directory
is not the root of the iOS simulators' configs. This change adds support
for such environments by allowing the caller to set the simulator root
directory via an environment variable.
2017-11-29 08:22:05 -08:00
Todd Volkert
c182e0e517
Remove unused pushFile methods in ios classes (#13215) 2017-11-27 12:55:59 -08:00
Devon Carew
c25558d426
change 2 print calls to printStatus (#13206) 2017-11-27 08:13:24 -08:00
Devon Carew
d776f64f4e
tweaks to the cli args for flutter run (#13207) 2017-11-27 06:56:51 -08:00
Dwayne Slater
c7c3b606fc Show Android tombstone during native crash (#12923)
* Show Android tombstone during native crash

* Fix tombstone lines being missed on newer Android versions
2017-11-22 14:58:59 -08:00
Todd Volkert
e792c6bb5b
Add support for binding to IPv6 localhost in flutter run (#13136)
This allows `flutter run` to work on hosts that are IPv6-only.
2017-11-21 20:12:21 -08:00
Chris Bracken
d6a35ee356
Update dart:vmservice_sky to vmservice_io (#13138)
In 77af1e5eec, dart:vmservice_sky was
renamed to dart:vmservice_io.
2017-11-21 16:23:33 -08:00
Martin Kustermann
545ec9efb7
Add support for NDK discovery and add --prefer-shared-library option (#12788)
* Add support for NDK discovery and add --prefer-shared-library option

We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps.  The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.

The reason for using blobs / instruction snapshots is that we do not
want to force flutter users to install the Android NDK.

This CL adds a `--prefer-shared-library` flag to e.g. `flutter build
apk` which will use the NDK compiler (if available) to turn the
precompiled app assembly file to an `*.so` file.  If the NDK compiler is
not available it will default to the default behavior.

* Rebase, add test for NDK detection, augment flutter.gradle with @Input for flag

* Use InMemoryFileSystem for test

* Remove unused import

* Address some analyzer warnings
2017-11-21 15:44:03 +01:00
Mikkel Nygaard Ravn
4676e1d724
Add support for iOS plugin class prefix (#13095) 2017-11-20 13:27:21 +01:00
Todd Volkert
928d2cc764
Add EBADF errno to list of ignorable errors in terminal.dart (#13077)
I get this error when piping an `echo` string to the stdin of
the flutter tool.

https://github.com/dart-lang/sdk/issues/29083
2017-11-17 15:45:27 -08:00
Greg Spencer
0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
xster
d5d2cdfeef
A bunch of onboarding error detections (#12977) 2017-11-16 22:53:22 -08:00
Todd Volkert
f0e8819886
Extract Android SDK version from named platform dirs. (#13056)
Previously, we were mapping certain named platforms
(e.g. `android-stable`) to their corresponding version.
this had two problems:

1. The version could become out of date. For instance, we had
   mapped `android-stable` to version 24, but the stable version
   is now 27.
2. The list of possible named versions wasn't comprehensive.
   Some Android SDKs just list the platform as `stable`, or
   `experimental`, etc.

This change updates the platform version detection to use
the `build.prop` file that exists in the platform directory
(only for cases where the version number is not encoded into
the directory name).
2017-11-16 17:38:53 -08:00
xster
9a0d4cf75b
Add a Flutter version comparison function (#12959)
* add git version comparison function

* use [] in dartdoc

* Make method instance method
2017-11-14 18:50:15 -08:00
Greg Spencer
2a26f29c9d
Switch to concurrency of two, to see if that is a good balance. (#13003) 2017-11-13 15:26:42 -08:00
Greg Spencer
e2b9f8906d
Turn on concurrency for coverage shard so that it runs in parallel to fix Travis timeouts. (#13001) 2017-11-13 13:20:38 -08:00
Greg Spencer
797b39e9b2
Creates a new flutter command 'ide-config' and removes *.iml and .idea from tree. (#12958)
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.

It also:

 * Adds *.iml to the .gitignore
 * Removes existing .iml files from the repo, and moves them to the
   packages/flutter_tools/ide_templates/intellij directory.
 * Adds a flag to ide-config ('--update-templates') that will take any new .iml
   files in the flutter tree and add them to the existing templates.
     - If --overwrite is also specified, then all existing templates will also
       be overwritten with the contents from the flutter tree, and any that have
       been deleted from the flutter tree will also be removed from the
       templates.
 * Added new run configurations for all existing app targets that will now also
   be automatically added to IntelliJ.
 * Setting up the environment also includes setting the coding style guidelines
   and the git VCS.
 * Note that after this PR lands, Flutter developers will need to run it once to
   re-create the .iml files and configuration files that have been removed.

After this PR lands, .iml files will no longer appear in the untracked files
section for git.
2017-11-13 10:55:22 -08:00
Jakob Andersen
9be85b6b4b
Support IPv6-only hosts in vmservice_test.dart. (#12985)
If we fail to bind to IPv4 loopback, try IPv6. Some hosts only support IPv6,
causing the test in vmservice_test.dart to fail, since it couldn't find an
available port.
2017-11-11 21:33:40 +01:00
Mehmet Fidanboylu
96942bc797
Get rid of static version methods which ignore the AppContext (#12971)
* Get rid of static version methods which ignore the AppContext

* Review comments

* Review Comments

* Make branch behave the same as original implementation

* Fix tests
2017-11-10 17:31:18 -08:00
Yegor
870da175bc
remove unused forwardPort; truthier console messages (#12981) 2017-11-10 16:51:16 -08:00
xster
e94038154b
Print a warning when cocoapods specs repo is out of date (#12915) 2017-11-10 12:41:58 -08:00
Devon Carew
60af4ed725
tweak the text for the "elements didn't reload" message (#12826)
* tweak the text for the 'elements didnt reload' message

* review comments

* prefix items with a list char

* add a hostIsIde param instead of the isDaemonMode top-level function

* add a trailing comma
2017-11-10 11:34:34 -08:00
Zachary Anderson
f993cc36dd [flutter_tool] Fix fuchsia_reload command for new .packages location (#12825) 2017-11-10 10:10:07 -08:00
Alexander Aprelev
9ae893bd45
Use IKG for restarts, use IKG with ProtectedFileByteStore. (#12953)
* Use IKG for restarts, use IKG with ProtectedFileByteStore.

* Fix comment, add end of file newline.

* Remove unused import
2017-11-10 10:09:37 -08:00
Alexander Aprelev
edc0781420
Reset list of dirty assets to be evicted when we do restart (#12743) 2017-11-10 09:24:05 -08:00
Todd Volkert
454db9d47c
Re-organize flutter_tools code to better support proper layering. (#12957)
* executable.dart#main() depends on runner.dart#run()
* Refactor code such that non-commands don't depend on commands.

No code was actually changed in this PR - code was merely moved from
point A to point B.
2017-11-09 21:45:31 -08:00
Devon Carew
b6bd628bcd
address unused element issues and new warnings (#12890)
* address unused element issues and new warnings

* add a missing return
2017-11-08 14:06:55 -08:00
Alexandre Ardhuin
15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Yegor
d4830fcf1b
smoke test VM service connection before returning VMService object (#12914) 2017-11-08 10:43:47 -08:00