Commit graph

167 commits

Author SHA1 Message Date
Jonah Williams 4b351ac1b4
[flutter_tools] do not allow attaching in release mode (#68071)
Do not allow attach in release mode, as there is not VM Service to connect to. Observed in crash reporting as thrown string which is changed to exception below.
2020-10-13 21:29:23 -07:00
Jonah Williams 9e70180f63
[flutter_tools] do not measure progress timeout (#67959)
Remove "This is taking a long time" progress timeout and TimeoutConfiguration.
2020-10-13 13:05:47 -07:00
Jonah Williams ac614de7ac
[flutter_tools] validate that SkSL bundle path exists (#67883)
Fixes #61772

tool exit if there is no file at the path provided when building/running with sksl
2020-10-12 12:49:51 -07:00
Jonah Williams bdb830a833
[flutter_tools] pretty print hot reload rejection error (#66701)
If the vm of an attached device rejects a hot reload, pretty print the reason. Suggest a hot restart so that users are aware that they do not have to detach and rebuild. Also resets the last compilation time, so a subsequent restart would still apply the last change. Adds an integration test for the const field removal.

Fixes #64027
2020-10-09 15:44:52 -07:00
Jonah Williams 5fa801718f
[flutter_tools] remove train and inject-plugins command (#67766)
The train command does nothing and was originally added to provide a no-output default for generating app-jit snapshots. The inject-plugins command is only for a repo-only analysis check, which is not necessary since we regenerate during pub get.

#29805
2020-10-09 15:43:39 -07:00
Jonah Williams 9a3a0dc18f
[flutter_tools] hot reload/restart update for asset manager change (#66742)
Do not upload all assets on initial devFS sync. This should increase the reliability of the initial connection, even in the face of flaky devfs behavior, in addition to a moderate perf improvement.

Updates fast-start to build assets as part of the initial bundle

Requires flutter/engine#21436
Requires flutter/engine#21586
Requires flutter/engine#21611
2020-10-09 12:25:15 -07:00
Jonah Williams 973404a27f
[flutter_tools] support powershell style help request (#67493) 2020-10-08 14:06:58 -07:00
Jonah Williams a4e0e2a8ee
Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572)
This reverts commit 76cbc462d2.
2020-10-07 15:30:46 -07:00
Jonah Williams 76cbc462d2
[flutter_tools] remove all pub caching logic (#66776)
There have been some more additional reports of a missing 'package:characters' import after upgrading flutter, as well as problems with detecting the correct language version. This has me concerned that our pub caching logic is incorrect. Instead of the tool attempting to guess when pub should be run, always delegate to pub.
2020-10-07 13:11:07 -07:00
Jonah Williams 13bf341584
[flutter_tools] update build rules to depend on subset of package_config contents (#67165)
Split from #66776

Even if pub does not change the packge_config contents, it will still update a timestamp in one of the fields. This causes unnecessary rebuilds. To fix this, generate an additional file when running pub get that only contains the relevant fields and then update the KernelSnapshot rule to depend on it only.
2020-10-07 08:46:11 -07:00
Jonah Williams 6180a4c179
[flutter_tools] fix documentation, globals, and todos in the android codebase (#66980)
Cleans up some undocumented classes and re-organizes the AndroidDevices class to avoid the need for the static testing only member. Adds a script for tracking globals.
2020-10-05 15:47:57 -07:00
Jonah Williams fe22d196fc
[flutter_tools] prevent running analyze-size with split-debug-info (#66983)
Running a build command with split debug info and analyze size causes a crash in the snapshot analysis library. Disable the combination of these two flags.

Fixes #66962
2020-09-30 11:15:49 -07:00
Jonah Williams e819f292b3
[flutter_tools] do not require a dependency on devtools server (#66842)
Re-arrange the implementation of the devtools launcher so that google3 is not required to depend on any devtools packages. Also renames the build_runner folders to isolated to better clarify their intention.
2020-09-29 18:15:56 -07:00
Marcus Tomlinson 5f76bfb4af
Add the ability to inject a bootstrap script (#66897) 2020-09-29 19:24:21 +01:00
Ben Konyi 65a81c7cd3
Roll package:dds to 1.4.0 and update error handling (#66836) 2020-09-29 10:28:17 -07:00
Jonah Williams 76698a5026
[flutter_tools] dont crash if attach is given a bad debug uri (#66358) 2020-09-22 12:03:21 -07:00
Jonah Williams a19f5baccc
[flutter_tools] connect widget cache from frontend_server (#65951) 2020-09-19 11:02:04 -07:00
Ben Konyi a17b330980
Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#65873)
This reverts commit 66b01c1f29.

* Add DDS ipv6 support

* Use --dds-port for DDS instead of hijacking --host-vmservice-port
2020-09-16 16:27:42 -07:00
Michael R Fairhurst 7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
Jonah Williams b02cb6e4c9
[flutter_tools] make local engine integration testing easier (#65802) 2020-09-15 13:32:02 -07:00
Jonah Williams b88f308af7
[flutter_tools] port deprecated settings test to flutter integration shard (#65806)
Port the deprecated settings devicelab test to tool integration shard. Tests that apps can be built using the deprecated android/settings.gradle file.

Part of #65790
2020-09-15 10:55:07 -07:00
Jonah Williams 6b444c4dd7
[flutter_tools] standardize patterns for integration.shard (#64980)
Integration tests must only go through the real file system/process manager/platform. The global indirection makes this code harder to understand than if it directly referred to the concrete instances that are being used.

Update the integration shard to use a const instance of a LocalFIleSystem, LocalProcessManager, and LocalPlatform. Remove global usage and apply testWithoutContext.
2020-09-08 15:56:00 -07:00
Jenn Magder ace54425e0
Add observatory Bonjour service to built iOS Info.plist bundle (#65138) 2020-09-02 18:47:56 -07:00
Jenn Magder 259deec221
Revert "Add observatory Bonjour service to built iOS Info.plist bundle (#65138)" (#65141)
This reverts commit 5e0aa8b9fc.
2020-09-02 18:31:45 -07:00
Jenn Magder 5e0aa8b9fc
Add observatory Bonjour service to built iOS Info.plist bundle (#65138) 2020-09-02 17:57:43 -07:00
Jenn Magder cb819504f3
Revert "Add observatory Bonjour service to built iOS Info.plist bundle (#64988)" (#65109)
This reverts commit 4fde217dea.
2020-09-02 12:31:17 -07:00
Jenn Magder 4fde217dea
Add observatory Bonjour service to built iOS Info.plist bundle (#64988) 2020-09-02 11:11:07 -07:00
Jonah Williams 216da410a8
[flutter_tools] add --config-only option to flutter build ios (#64848) 2020-08-31 17:23:03 -07:00
Mehmet Fidanboylu 66b01c1f29
Revert "Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64847)" (#64981)
This reverts commit c8f234d365.
2020-08-31 16:09:02 -07:00
Ben Konyi c8f234d365
Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64847)
This reverts commit 2436de1391.
2020-08-31 12:14:32 -07:00
Shi-Hao Hong fd22fc3e35
[gen_l10n] Synthetic package generation by default (#62395)
* synthetic packages by default in gen_l10n tool

* Refactor default path for synthetic package

* Remove unused import

* Code cleanup

* Further improvements to help text

* Refactor synthetic package path

* Remove newlines

* Test cleanup

* clean up logic in inputs and outputs list function

* Update l10n.yaml usage

* only add option if value is non-null

* Update stocks app as proof of concept for synthetic package usage

* Address nits

* print pubspec contents

* add print statements

* Do not allow null value for useSyntheticPackage

* +

* +

* +

* +

* Cleanup

* Add test

* Fix text

* Dont parse pubspec directly

* Test using context

* WIP: generate synthetic packages on pub get -- needs tests

* Allow null value

* Update null handling

* Refactor to properly handle null case

* Fix yamlMap condition

* Fix yaml node for real

* WIP: struggling to write tests

* WIP - take absolute path as an option

* Add tests

* Use environment project directory for synthetic package generation pathway

* Fix typo

* Improve help text

* Update defaults

* Remove unauthorized path import

* Fix pathing issues at synthetic package generation

* Fix typo in test

* Use path.join so projectDir matches up based on OS

* Fix Windows pathing in test

* Remove unnecessary replaceApp code for projectDir.path

* Use globals.fs.currentDirectory.path in resident_runner_test.dart

* Fix merge conflict

* Add test to ensure that synthetic package is generated on pub get

* Fix resident_runner_test.dart tests

* Fix tests

* Use package:file instead of dart:io

* WIP - exploration

* Remove synthetic package use from stocks example

* Update integration test to not use synthetic packages

* Remove trailing whitespace

* flutter pub get runs synth package generation

* Remove more print statements

* Add license header

* WIP - minimally working pub.get

* Use own MockBuildSystem

* Modify test and implementation to be a little cleaner

* Fix flutter pub get invocation

* Use synthetic packages in stocks app

* Revert "Use synthetic packages in stocks app"

This reverts commit 45bf24903c.

* Add environment and buildSystem params to flutter test

* Address code review feedback

* +

* Isolate codegen into its own API

* Fix imports

* Slight refactor

* Add one more test for no l10n.yaml file

* Remove unneeded mock class and import in pub_get_test.dart

* More code review feedback

* Remove unnecessary imports

* Remove `return await`s that I missed

* use arrow functions instead
2020-08-31 13:19:41 +08:00
Jonah Williams 2436de1391
Revert "Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64802)" (#64845)
This reverts commit eef0050d08.
2020-08-28 18:02:15 -07:00
Ben Konyi eef0050d08
Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64802)
* Reland "Re-enable the Dart Development Service (DDS) (#64671)"

This reverts commit 2ae25cc2d7.

* Fix MDNS building Observatory URI with port 0 instead of forwarding the device port

* Added MDNS test
2020-08-28 16:18:35 -07:00
Ben Konyi 2ae25cc2d7
Revert "Re-enable the Dart Development Service (DDS) (#64671)" (#64797)
This reverts commit d7d12412e5.
2020-08-28 09:00:53 -07:00
Ben Konyi d7d12412e5
Re-enable the Dart Development Service (DDS) (#64671)
This change re-enables DDS and outputs the DDS URI in place of the VM
service URI on the console. If --disable-dds is not provided,
--host-vmservice-port will be used to determine the port for DDS rather
than the host port for the VM service, which will instead be randomly
chosen.
2020-08-27 16:35:00 -07:00
Jonah Williams 059de1537e
[flutter_tools] support code size tooling on iOS, linux, windows, macOS, and Android on Windows (#63610)
Adds support for size analysis on iOS, macOS, linux, and Windows - using an uncompressed directory based approach. The output format is not currently specified.

Adds support for size analysis on android on windows, switching to package:archive

Updates the console format to display as a tree, allowing longer paths. Increases the number of dart libraries shown (to avoid only ever printing the flutter/dart:ui libraries, which dominate the size)
2020-08-25 10:00:24 -07:00
Nolan Scobie 43c1b34cf5
Add punctuation for unterminated sentences in doc comments (#62755)
* Add punctuation for unterminated sentences in doc comments

* Addressing review nit
2020-08-06 19:18:52 -04:00
Ian Hickson 8ad4da4a4e
There's a bug filed about this now, so update comment. (#62892) 2020-08-05 15:01:21 -07:00
Jonah Williams a0745e23bf
[flutter_tools] add --analyze-size flag (#62697) 2020-08-03 14:21:05 -07:00
Ben Konyi d6a25ae699
Temporarily disable Dart Development Service in flutter_tools (#62508)
Devtools doesn't currently support connections to DDS. Disable DDS
temporarily while a solution is worked on. See https://github.com/flutter/flutter/issues/62507
2020-07-29 12:32:10 -07:00
Ben Konyi 3a5a3eaf68
Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#62147)
This reverts commit adc9dde3ba.

- Fixed issue where `FallbackDiscovery` would hold on to a `VmService` when launching on iOS devices, causing DDS to fail to start
- Fixed `flutter drive` case where DDS is already running in another flutter_tools instance
2020-07-29 10:05:40 -07:00
Jonah Williams f707f6f6ea
[flutter_tools] add flutterRoot field to JSON machine output (#62053) 2020-07-29 08:16:04 -07:00
Jonah Williams a7db3591cb
[flutter_tools] deflake fastReassemble test (#62152) 2020-07-24 15:17:39 -07:00
Jonah Williams a19fd72db5
[flutter_tools] check in script for generating per library unit coverage (#61996)
Allows generating a per-library coverage summary like https://gist.github.com/jonahwilliams/f298381c3fb9f472b2dfe54b82a20a88
2020-07-22 18:40:12 -07:00
Ben Konyi adc9dde3ba
Revert "Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61975)" (#61993)
This reverts commit f7a1c87ffd.
2020-07-21 16:17:23 -07:00
Ben Konyi f7a1c87ffd
Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61975)
This reverts commit 4867f5931f.
2020-07-21 15:44:38 -07:00
Jason Simmons b3f0f092ec
Disable the deferred loading variant of gen_l10n_test (#61912) 2020-07-21 02:18:29 -07:00
Ben Konyi 4867f5931f
Revert "Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61882)" (#61909)
This reverts commit 895b7ef6fa.
2020-07-20 16:41:01 -07:00
Ben Konyi 895b7ef6fa
Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61882)
This reverts commit 38fe887342.
2020-07-20 16:01:58 -07:00
Helin Shiah 5b9ce492f3
Skip printing rendered error text in machine mode (#61684) 2020-07-20 09:41:03 -07:00