Commit graph

1175 commits

Author SHA1 Message Date
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
ekibun 719268b43a
add different workload & add -products * to vswhere calls to check both Visual Studio IDE and standalone Build Tools. (#64251) 2020-08-31 09:33:04 -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
Jonah Williams 5a4fa220e2
[flutter_tools] handle OsError thrown during azure detector (#64749) 2020-08-27 17:13:04 -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 d3515f5fb6
[flutter_tools] add analytics to code size, add more testing (#64578)
* [flutter_tools] add analytics to code size, add more testing

* add gradle case

* Update build_macos_test.dart

* move analytics to code size tooling

* Update analyze_size.dart

* fix analysis
2020-08-27 09:45:10 -07:00
Jonah Williams 401d401c59
[flutter_tools] reland: avoid creating Android Devices if AndroidSDK cannot be found (#64665)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.

Reland with fixed code + tests for null SDK + adb in AndroidDeviceDiscovery
2020-08-27 09:44:31 -07:00
Jenn Magder f5187535d5
Revert "[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)" (#64602)
This reverts commit 47596c6203.
2020-08-25 17:55:58 -07:00
Jonah Williams 47596c6203
[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.
2020-08-25 11:08:27 -07:00
Jonah Williams f0a3cbace3
[flutter_tools] handle FileSystemException thrown when attempting to decode stamp file (#64559)
Fixes #64246

If decoding the string contents of a stamp file fails, treat it as if the stamp file is missing. This is always safe to do, since at worst it downloads more artifacts. The files could end up corrupted if they were edited by another program, for example
2020-08-25 10:58:21 -07:00
Jonah Williams 23032d772d
[flutter_tools] refactor artifact downloading to retry zip exceptions. (#64512) 2020-08-25 10:06:04 -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
Jonah Williams 302f9f751b
[flutter_tools] remove globals from utils (#63831) 2020-08-24 15:26:03 -07:00
Jonah Williams ed4a8e8d05
Revert "Pass --verbose-logging to flutter_tester (#64440)" (#64517)
This reverts commit 8b52e6a8b2.
2020-08-24 14:50:38 -07:00
Todd Volkert 8b52e6a8b2
Pass --verbose-logging to flutter_tester (#64440) 2020-08-24 13:33:56 -07:00
Jonah Williams ee12d7c3fc
[flutter_tools] check for permission issues when copying file (#63540) 2020-08-21 11:11:04 -07:00
xster a2e5e074ab
Move Android doctor SDK check to 29 and Cirrus images to 30 (#63517) 2020-08-20 11:06:32 -07:00
xster e1ae4dfcae
Move v1 embedding migration warning from plugin consumers to all apps (#64181) 2020-08-19 22:32:08 -07:00
Jonah Williams 69fd5c50a2
[flutter_tools] null assertions off by default for web (#64186)
Like Android/iOS, only enable --null-assertions if asked. Previously this was enabled by default for web, but in general this has proved to be too breaking to enable by default.

#61042
2020-08-19 14:52:47 -07:00
Jonah Williams 4954a46ff0
[flutter_tools] shrink API surface of Android SDK (#63867)
Attempt to simplify the Android SDK interface ahead of refactoring it. The locateAndroidSdk static method is called at startup to locate the android SDK, returning null if it cannot be found. These helper methods attempted to first look up the AndroidSDK if it was already null - which could only cover the case where someone installed the Android SDK while flutter was running (possibly through an IDE)
2020-08-19 14:44:56 -07:00
Zachary Anderson 6f78131474
WIP: [flutter_tool] Fix amberctl host address (#64020) 2020-08-19 14:41:05 -07:00
Jonah Williams a42c56791b
[flutter_tools] shrink fingerprinter API to currently used subset (#63840) 2020-08-18 17:01:06 -07:00
Jonah Williams 042fa8cf66
[flutter_tools] trim trailing newline from vm service logging events (#63976) 2020-08-17 12:26:03 -07:00
stuartmorgan 70bd819c52
Separate blkid in the Linux library checks (#63810) 2020-08-17 10:51:03 -07:00
Jonah Williams 06c3de3285
[flutter_tools] remove most globals from build system and tests (#63697)
Remove globals and testbed to simplify test cases, using the existing environment configuration. This is some pre-factoring work to make landing #63610 easier
2020-08-13 15:00:27 -07:00
Shi-Hao Hong 0a7c6243fa
[gen_l10n] Absolute project path parameter (#63368) 2020-08-13 05:11:05 -07:00
Jonah Williams 9225d8d5b7
[flutter_tools] move to fake_async, skip failing tests (#63536) 2020-08-11 19:36:05 -07:00
Jonah Williams 16df32b1eb
[flutter_tools] handle invalid yaml in plugin dependency (#63526) 2020-08-11 19:31:03 -07:00
Christopher Fujino 8dcb4c338a
Fix version parsing to use git tag --points-at (#63505) 2020-08-11 17:29:35 -07:00
xster df8e537f96
move compile/target sdk versions to 29 (#62799) (#63008) 2020-08-11 14:51:02 -07:00
Jonah Williams c86d090e6f
[flutter_tools] add --null-assertions flag for debugging with null safety (#63416) 2020-08-11 11:36:03 -07:00
James D. Lin ec58182b3b
[flutter tools] Make SizeAnalyzer support .apk files that don't use libapp.so (#63250) 2020-08-10 21:06:05 -07:00
Michael Klimushyn cb69bbb4d5
Remove unused l and --isolate-filter tools (#63336) 2020-08-10 10:51:04 -07:00
Jenn Magder 0aafdf9aa9
Change minimum iOS version from 8.0 to 9.0 (#62902) 2020-08-06 13:46:15 -07:00
Chris Yang c9cd825fca
[flutter_tools] flutter version reports picks up release versions (#63019) 2020-08-05 15:20:27 -07:00
Jonah Williams 762d9f7f4e
[flutter_tools] warn when main library is relocated (#62930) 2020-08-05 15:11:15 -07:00
Ian Hickson ef62463e9c
Update link to bug (#62893) 2020-08-05 15:06:24 -07:00
Marcus Tomlinson 145df39953
Explicitly find and link blkid using pkg-config (#62979) 2020-08-05 14:56:19 -07:00
Jonah Williams e8ad863a08
Revert "move compile/target sdk versions to 29 (#62799)" (#62884)
This reverts commit 5b3dc5251b.
2020-08-04 11:20:16 -07:00
xster 5b3dc5251b
move compile/target sdk versions to 29 (#62799) 2020-08-04 08:26:08 -07:00
Peter Lee 8b39af2ea7
Implement size analyzer to unzip & parse APK and AOT size snapshot to generate analysis json (#62495)
* Implement size analyzer to unzip & parse APK and AOT size snapshot to generate analysis json
2020-07-31 13:25:29 -04:00
Jonah Williams fbd29b8880
[flutter_tools] fix formatting regression in analyze and add full coverage (#62593) 2020-07-30 13:41:02 -07:00
Jonah Williams b880dad4ab
[flutter_tools] delete test that will start failing (#62580) 2020-07-30 10:06:02 -07:00
Yuqian Li 22bf19cece
Add purge-persistent-cache option to run and drive (#62221)
Fixes https://github.com/flutter/flutter/issues/39526

Needs https://github.com/flutter/engine/pull/20013 to land and roll first.
2020-07-29 12:24:39 -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
Lau Ching Jun a317c2c06a
Wrap launching devtools in DevtoolsLauncher (#62364) 2020-07-28 19:46:05 -07:00
Jonah Williams 78efd3eb46
[flutter_tools] ensure desktop builds can run without flutter_tools' package_config (#62426) 2020-07-28 18:36:05 -07:00