Commit graph

2227 commits

Author SHA1 Message Date
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 7adb720dcc
Fixed a typo that I forgot to push before committing ide-config change. (#12998) 2017-11-13 15:27:16 -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
Mikkel Nygaard Ravn c936aa8cd4
One more timeout. Centralize definitions. (#12970) 2017-11-10 15:56:17 +01:00
Mikkel Nygaard Ravn e3d5cbc929
Make timeout more robust (#12969) 2017-11-10 13:51:52 +01:00
Mikkel Nygaard Ravn a836201a74
Raise timeout limit for tests that call pub (#12968) 2017-11-10 12:33:34 +01:00
Mikkel Nygaard Ravn 46b2d6462e
Update timeouts for flutter create tests (#12965) 2017-11-10 09:35:11 +01: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
xster 8f79643680
Error message for unregistered phone (#12911) 2017-11-07 13:23:43 -08:00
xster c17099f474
Leave a version tag when creating project (#12846)
* Leave a version tag when creating project

* Generalize .version to .metadata
2017-11-03 10:07:57 -07:00
Ian Hickson d402d40aa6
Up a timeout to reduce the number of flakes. (#12837) 2017-11-02 12:19:43 -07:00
Chris Bracken 83df7bdd0f
Update Dart package dependencies (#12829) 2017-11-01 15:28:46 -07:00
Ian Hickson 8fd20b5deb
Text Painting Fuzzer (#12813)
Various improvements (in particular a new painting fuzzer) to the text manual test.

Some additional documentation.

A fix to Stack to remove an LTR bias: make unpositioned children apply "alignment".

Some more debugging information on RichText and Text.

A fix to the flutter tool to not crash when an RPC call throws an exception.
2017-11-01 15:04:43 -07:00
Ian Hickson e1174eb0f2
TextPainter RTL (#12791) 2017-10-31 10:39:34 -07:00
Jason Simmons cb2cfac0eb
Check for presence of an asset directory before accessing it (#12790)
Fixes https://github.com/flutter/flutter/issues/12460
2017-10-30 17:04:30 -07:00
Jason Simmons 1affb4237a
Remove the diagnostic server from flutter_tools (#12771) 2017-10-30 15:53:04 -07:00
Adam Barth 21145144e9
Don't collect usage data during Fuchsia build (#12780)
Previously, the usage analytics would generate a write to the user's
HOME directory during the Fuchsia build. We're tightening down the
environment in which we run the Fuchsia build, and these writes are now
more obvious.

This patch removes the usage analytics during the Fuchsia build,
avoiding the write to the user's HOME directory.
2017-10-30 12:28:31 -07:00
Michael Thomsen 50db9478e3
Clarify how to unconfigure with flutter config (#12733) 2017-10-30 11:12:12 +01:00
Chris Bracken acdbe45670
Report error on iOS non-release archive builds (#12773)
Archive builds for upload to iTunes Connect should always be built in
release mode, not doing so results in crash on startup.

Bug: https://github.com/flutter/flutter/issues/12086
2017-10-27 18:23:50 -07:00
Yegor 89a4a1384c unpin linter version, skip the broken 0.1.37 version (#12737) 2017-10-26 12:39:07 -07:00
Yegor 154f2e5402 Reapply #12700 but keep linter pinned at 0.1.35 (#12735)
* Revert "Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)"

This reverts commit 7f0d4f4caa.

* keep linter pinned at 0.1.35
2017-10-26 09:55:36 -07:00
Yegor 7f0d4f4caa Revert "fix --force-upgrade script; upgrade to the latest package versions (#12700)" (#12729)
This reverts commit 5b3575006e.
2017-10-25 17:08:08 -07:00
Yegor 5b3575006e fix --force-upgrade script; upgrade to the latest package versions (#12700)
* fix updrade script; upgrade to the latest package versions

* exclude special dependencies from transitive closure

* fix stack trace handling in flutter_test due to stack_trace change

* change type on _emptyStackTrace
2017-10-25 16:12:43 -07:00
Phil Quitslund 2b2b3ab516 Use a package URI in test template import. (#12723)
Use a `package:` import when referencing source under test in test template.

This is the prefered style and plays nice w/ automated refactoring.

See: https://github.com/flutter/flutter-intellij/issues/1429
2017-10-25 14:53:46 -07:00
Alexandre Ardhuin 28366002d9 enable lint prefer_foreach (#12674)
* enable lint prefer_foreach

* fix tests
2017-10-25 08:25:44 +02:00
Alexandre Ardhuin 872d83a3c5 enable lint prefer_conditional_assignment (#12694) 2017-10-25 08:18:26 +02:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Jason Simmons eb475bbb80 move dart_io_entries.txt to third_party/dart for AOT builds with a local engine (#12659) 2017-10-20 15:32:27 -07:00
Devon Carew 171b1b08c9 tweak the flutter create template to use the function shorthand for main() (#12654) 2017-10-20 10:46:07 -07:00
Devon Carew a554401e79 update the flutter create template files (#12641) 2017-10-19 19:38:39 -07:00
Michael Goderbauer 1eed6dff34 Make clean command top level (#12616)
* Make clean command top level

Fixes https://github.com/flutter/flutter/issues/10783

* remove backwards
2017-10-19 11:23:42 -07:00
Chris Bracken e965b69285 Improve libimobiledevice doctor messages (#12633)
The libimobiledevice suite of tools do not include version information.
A simple way to verify they meet our version requirements is to run
idevice_id -l, which will fail when older versions are run against iOS
devices with newer versions of iOS installed.

Unfortunately, idevice_id -l will also fail when libimobiledevice is up
to date, but the attached devices have never been paired with the host
machine in Xcode.

This patch updates the error message to help guide the user in such
situations.
2017-10-19 10:52:25 -07:00
Alexander Aprelev c05da1e29d Stop syncing dart source files when in --preview-dart-2. (#12597)
Syncing source files is not needed when host sends kernel file to the device.
2017-10-19 07:16:15 -07:00
Alexandre Ardhuin 700dc9f752 enable lint avoid_function_literals_in_foreach_calls (#12607) 2017-10-19 08:16:16 +02:00
P.Y. Laligand e938ceb086 Adjust to new location for the Dart project. (#12621) 2017-10-18 19:45:48 -07:00
Mihail Slavchev af0afff111 Workaround a connection issue on iOS 11.0.x (#12444)
On iOS 11.0.x ideviceinfo fails with the following message
ERROR: Could not connect to lockdownd, error code -3

This workaround should also work for #12330
2017-10-18 15:25:49 -07:00
Adam Barth f847272fc7 Make FLX construction atomic (#12604)
This patch also makes it possible to create FLX files with no extension.
Previously, the zip tool would add the ".zip" extension if the output file
lacked an extension.
2017-10-18 13:46:17 -07:00
Sarah Zakarias f6135107bc Copy snapshot file into assets (#12523) 2017-10-18 14:52:36 +02:00
Alexander Aprelev 52fbcefed6 Link platform.dill only into app kernel file used for build aot. (#12571)
gen_snapshot loads all packages from single app kernel file.
2017-10-17 13:30:32 -07:00
xster 9ce3ba314e Add Cupertino icon fonts helper and dependency for default template (#12559)
* add CupertinoIcons

* Use new font name convention

* review
2017-10-16 18:59:28 -07:00
P.Y. Laligand ad72c78342 Fix testing on Fuchsia. (#12563) 2017-10-16 10:58:39 -07:00
Alexander Aprelev be1467e0cd Restructure hot mode test so it runs interactively. (#12519)
* Restructure hot mode test so it runs interactively.

This allows to add a benchmark for hot reload after actual source code change.

* Add curly braces, refactory copyRecursive
2017-10-13 20:06:35 -07:00
P.Y. Laligand 0999fca99d Update references to the engine project. (#12515) 2017-10-13 17:16:33 -07:00
Alexander Aprelev 6c6d08b9ee Keep incremental compiler state through full restart. (#12535)
* Keep incremental compiler state through full restart.

* Add todo

* Add todo
2017-10-13 15:18:24 -07:00
Ryan Macnak 07a4b4c426 Reapply "When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed." (#12490)
This reverts commit 5e7bcbacf8.

`flutter run --benchmark` was triggering a different quick bailout path in the VM than `flutter run`. The failure has been fixed upstream.
2017-10-12 15:58:40 -07:00
Alexander Aprelev 85e4f0526b Fix restart flow for preview-dart-2 mode. (#12496)
* Fix restart flow for preview-dart-2 mode.

Restart in preview-dart-2 needs to use kernel file and it has to be complete, rather than incremental kernel file.

* Add curly braces

* Do full compile on restart

* Roll engine to pick up changes to hot reload for preview-dart-2
2017-10-12 14:48:37 -07:00
Ryan Macnak a4b29d6414 Pass --enable_mirrors=false when building script snapshots for the debug mode. (#12472)
The initial loading happens on the host, which was building a script snapshot and allowing imports of dart:mirrors. Hot reload happens on the device, which then notices the imports and issues a compile-time error. This change causes programs with imports of dart:mirrors to be rejected during the initial load.

Fixes https://github.com/flutter/flutter/issues/12440
2017-10-12 14:46:37 -07:00
Hans Muller c3d56b1dad flutter_localization optional package (#12410) 2017-10-11 16:01:13 -07:00
Zachary Anderson 4c23397eda Remove dead --assert_initializer flag (#12441) 2017-10-06 14:54:14 -07:00
P.Y. Laligand 21b81d902d Disable Dart analysis in Fuchsia. (#12409)
Fuchsia will soon use a newer version of the Dart analysis server which Flutter code has not been adjusted for yet.
2017-10-06 10:47:52 -07:00
Alexander Aprelev ac1546c794 Add hotReloadInitialDevFSSyncMilliseconds to track how long user have… (#12417)
* Add hotReloadInitialDevFSSyncMilliseconds to track how long user have to wait before being able to do first reload.

This stat is significantly different between existing and preview-dart-2 setting (for the latter, this stat is ~3x slower: 13s vs ~4s).

* Remove ws

* Cleanup timer-related code
2017-10-06 08:39:46 -07:00
Alexander Aprelev c02850b4dc Force upgrade update packages with improved update process. (#12412)
* Force upgrade update packages with improved update process.

* Update packages

* Revert "Update packages"

This reverts commit a37de26d3f.
2017-10-05 20:59:08 -07:00
stevemessick 2b78675bd8 Update IDEA project files (#12391)
* Generate Android framework config

* Fix templates

* Moar templates fixing

* Minor tweaking
2017-10-05 12:56:49 -07:00
Alexander Aprelev d5ba4df6af Skip over flutter sdk packages when upgrading dependencies. (#12405) 2017-10-04 17:50:10 -07:00
Ryan Macnak 5e7bcbacf8 Revert "When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed. (#12304)" (#12406)
This reverts commit 90028813a8.

This change caused a few bots to fail with 'JSON-RPC error 110: Extension error', which is odd because _getUnusedChangesInLastReload is not an extension.
2017-10-04 17:13:17 -07:00
Ryan Macnak 90028813a8 When parts of the program are changed in a hot reload, but not executed during the reassemble, warn that a restart may be needed. (#12304) 2017-10-04 16:32:30 -07:00
Devon Carew 02429cef84 Fix the doctor check for the flutter intellij plugin (#12389)
* update the intellij doctor check to support the m18 plugin version

* update to support multiple package names
2017-10-03 16:24:18 -07:00
stevemessick b9f20dc335 Print "package" instead of "plugin" when creating a package. (#12387) 2017-10-03 16:06:33 -07:00
Alexander Markov 7153dea296 Add hidden options --extra-front-end-options and --extra-gen-snapshot-options to flutter tool (#12219)
This CL introduces 2 hidden options to 'flutter build aot' and 'flutter run' for passing arbitrary arguments to front-end server and to gen_snapshot tool when building and running flutter app in --profile or --release modes.

The ability to pass arbitrary options simplifies various experiments, as it removes the need to change defaults and rebuild flutter engine for every tested configuration.
2017-10-03 12:55:53 -07:00
gspencergoog 18f0d3aef7 Add framework support for system text scale factor. (#12180)
* Add framework-side support for system text scale factor.

* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
  Additional changes rolled in with engine change:
    libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
    Provide an entropy source to the Dart engine (#4161) - e1aa867
    libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
    Roll skia to e4679fa06a. (#4157) - 267e7a8
    Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
    Revert engine Dart roll. (#4158) - 14aab33
    Add support for system text scale factor. (#4124) - b2a7f4b
    Include _http into sky_engine libraries for analyzer (#4154) - b930f10
    libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
    libtxt: remove redundant line_widths (#4152) - 14bf515
    Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
2017-10-02 14:18:18 -07:00
Ian Hickson 89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Michael Thomsen 3f6b28dddb Add a check for gradle failing due to missing licenses (#12318)
* Add a check for gradle failing due to missing licenses

* Review feedback Jakob
2017-09-29 13:49:38 +02:00
Ian Hickson e1fa035b69 Retry on failed download. (#12293) 2017-09-28 17:37:34 -07:00
Todd Volkert ce59412cf2 Remove hard-coded "Runner" from iOS simulator logs filtering (#12306) 2017-09-28 13:11:16 -07:00
Chris Bracken 283f27d422 Clarify libimobiledevice installation status message (#12303)
Differentiate between 'not installed' and 'not working' and emit a more
targeted message.
2017-09-28 13:04:59 -07:00
Todd Volkert 9ea1ff12d7 Add Flags class. (#12268)
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
2017-09-28 09:36:55 -07:00
Ian Hickson efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
Sarah Zakarias 3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
asaarnak 97dd12cf83 Seems like a lint was renamed. (#12034)
* Seems like a lint was renamed.

Lint `- unnecessary_brace_in_string_interp` is not in the list here: http://dart-lang.github.io/linter/lints/

In linter [0.1.30](9652dd44b6/CHANGELOG.md (0130)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interp.html](unnecessary_brace_in_string_interp)
In linter [0.1.2](9652dd44b6/CHANGELOG.md (012)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interps.html](unnecessary_brace_in_string_interps)

* Fix lint tests. analyze_once_test.dart and create_test.dart
2017-09-26 11:03:45 -07:00
Todd Volkert bb0a724a1d Don't require .packages file for flutter packages command (#12258)
(it's the command that populates the .packages file)
2017-09-26 09:12:40 -07:00
Adam Barth 3433f42b09 Attempt to fix Fuchsia build (#12259) 2017-09-26 08:50:41 -07:00
Sarah Zakarias 49ba974710 Factor out flutter manifest logic (#12237) 2017-09-26 14:48:52 +02:00
Todd Volkert a08b5e00af Run command validation on all commands. (#12246)
This makes command validation happen as part of `verifyThenRunCommand()`,
using a newly introduced protected method (`validateCommand()`) rather than
a `commandValidator` property (that subclasses were responsible for manually
invoking).
2017-09-25 18:56:37 -07:00
Sarah Zakarias 82ec7a2af5 update pubspec.yaml.tmpl of package and plugin (#12238) 2017-09-25 13:09:28 +02:00
Ian Hickson 36e7138e4f Update some places that mentioned the old update-packages --upgrade (#12218) 2017-09-23 22:23:09 -07:00
Ian Hickson 441b5c2031 Pin all dependencies ONCE AND FOR ALL (#12210)
* Pin all dependencies ONCE AND FOR ALL

This replaces the secret `flutter update-packages --upgrade` with a destructive `flutter update-packages --force-upgrade` that actually goes and pins every dependency and transitive dependency in every flutter package to the same version.

* Add comments.
2017-09-22 13:35:35 -07:00
xster e28765a997 Delinting future awaits round 3 (#10791)
* round 3

* partially address comments

* merge

* review notes

* review

* review

* review
2017-09-20 17:24:43 -07:00
xster 987b205665 Delinting future awaits round 2 (#10790)
* round 2

* deal with null futures

* review

* review

* review

* review
2017-09-20 16:25:16 -07:00
Zachary Anderson 8566777dee Fix -d all hot reload (#12178) 2017-09-19 15:38:01 -07:00
Sarah Zakarias 3de99c1575 Update fonts section in pubspec.yaml.tmpl (#12164) 2017-09-19 21:26:02 +02:00
Sarah Zakarias ec2d1c9116 Add support for shared fonts in packages. (#12142) 2017-09-19 14:04:51 +02:00
Zachary Anderson 2859a563ce [Fuchsia] Fix view reassemble trigger after hot reload (#12151) 2017-09-18 14:55:20 -07:00