Commit graph

2892 commits

Author SHA1 Message Date
Jonah Williams 549de844ed
[flutter_tools] add a mechanism to turn off immediate tool exit (#66787)
Instead of always exiting the tool, provide a mechanism to turn off this behavior for non-critical functionality like configuration and analytics settings.

Fixes #66786 Fixes #4674
2020-09-28 13:04:38 -07:00
Jonah Williams 19fbe98df3
[flutter_tools] pass existsSync through error handling io (#66704)
Crash reporting shows at least one instance of EACCES during an existsSync cache call. Add this to the list of error handling io methods. Did not add the async exists method since we lint against its usage.
2020-09-25 20:17:39 -07:00
knaeckeKami 8e9e13449b
Teach the flutter tool how to find android output files if the flavor contains uppercase letters (#66687)
This changes the name of the generated output files on android in case a flavor with uppercase letters is used.
Previously, the lowercased flavor name would be used for the apk/aab file. Now, the flavor name is used as-is.
2020-09-25 15:54:55 -07:00
Mouad Debbar 31254fbe03
[web] Change the web server to support path url strategy (#66606) 2020-09-25 15:42:03 -07:00
Jonah Williams 99d0954857
[flutter_tools] ensure ErrorHandlingFileSystem wraps current directory (#66680)
The lack of current directory wrapping was letting some of the already handled errors through

Fixes #66675
2020-09-25 14:29:22 -07:00
Jenn Magder 934e05f86d
Remove Try accepting the local network permissions popup warning (#66621) 2020-09-25 11:05:47 -07:00
gaaclarke 76ad864727
Added timeout for closing devfs sync http connections. (#66152) 2020-09-25 10:52:33 -07:00
Jonah Williams 90bc7c64dd
[flutter_tools] fix calling debugToggleBrightness on release mode (#66401)
ensure that the terminal handler checks if the service protocol is enabled before calling debug toggle brightness. Also removes globals from TerminalHander and test cases.

Fixes #65477
2020-09-24 18:56:07 -07:00
includecmath 71c42c9c54
[flutter_tools] Add channel order aware version_test (#62417) 2020-09-24 13:07:03 -07:00
Jonah Williams b9274c7c60
[flutter_tools] bypass pubspec yaml content check when running pubdependencies (#66559)
Otherwise the heuristics we have may decide to skip running pub. We should consider reducing the number of dimensions of caching here to a single check optimized for the run/test case.
2020-09-24 12:51:18 -07:00
Jonah Williams faa4b6635a
[flutter_tools] try deleting the web cache directory before copying new web sdk (#66461)
Delete the destination directory for the web sdk before copying the new contents. This might fix an error where the OS refuses to overwrite the files on dev
2020-09-23 16:45:20 -07:00
Jenn Magder f654346777
Check git commands in Flutter version check test (#66406) 2020-09-23 13:27:24 -07:00
Jonah Williams 1d4e7cd52d
[flutter_tools] do not add events to closed sink in throttle transform (#66468)
The throttle duration could delay past the point where the destination sink was closed. Check if it is closed before adding an event. Fixes a crash on dev: StateError: Bad State: Stream is already closed.
2020-09-23 10:40:39 -07:00
Emmanuel Garcia fc1e764264
Expose enable-experiment in Flutter drive (#66311) 2020-09-23 10:38:02 -07:00
Jonah Williams 51ededb92f
[flutter_tools] reland: map file URIs to a multiroot scheme (#66405)
If a file scheme and one or more roots is provided, fall back to this mapping before the direct file path if the file path cannot be turned into a package URI.

Use URI representation so that the transformation is resilient to the org-dartlang-app scheme used by the web builds.

Fixes #66095
Fixes #66404
2020-09-23 07:03:59 -07:00
Jenn Magder 78e54dd46b
Revert "[flutter_tools] map file Uri to multi-root scheme if provided (#66151)" (#66403)
This reverts commit af6ba86728.
2020-09-22 17:50:27 -07:00
Jenn Magder d5b715d7cb
Stream logging from attached debugger on iOS 13+ (#66399) 2020-09-22 17:16:45 -07:00
Jenn Magder 658e6c8a8d
Listen to Debug VM stream to get Stdout logs from VMService (#66310) 2020-09-22 17:12:02 -07:00
Jonah Williams 943b41bd61
[flutter_tools] allow device classes to provide platform-specific interface for devFS Sync (#66266) 2020-09-22 16:57:04 -07:00
Jonah Williams af6ba86728
[flutter_tools] map file Uri to multi-root scheme if provided (#66151)
If a file scheme and one or more roots is provided, fall back to this mapping before the direct file path if the file path cannot be turned into a package URI.

Fixes #66095
2020-09-22 16:51:18 -07:00
Jenn Magder 4881b4b07c
Revert "Stream logging from attached debugger on iOS (#66092) (#66390)" (#66397)
This reverts commit 2be4570d3a.
2020-09-22 15:15:56 -07:00
Jenn Magder 2be4570d3a
Stream logging from attached debugger on iOS (#66092) (#66390) 2020-09-22 14:59:14 -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
Jenn Magder 8d2e257633
Revert "Stream logging from attached debugger on iOS (#66092)" (#66368)
This reverts commit 5c8580360a.
2020-09-22 11:30:50 -07:00
Dan Field 4299dd7843
Revert "Revert "Stream logging from attached debugger on iOS (#66092)" (#66359)" (#66360)
This reverts commit 53fee1be38.
2020-09-22 09:23:57 -07:00
Dan Field 53fee1be38
Revert "Stream logging from attached debugger on iOS (#66092)" (#66359)
This reverts commit 5c8580360a.
2020-09-22 09:22:55 -07:00
Jonah Williams 511367aa5a
[flutter_tools] remove k toggle for canvaskit from web runner (#66273)
The k toggle allows switching between canvaskit and html backend at runtime. unfortunately this causes hot restart to break, since the dart_sdk modules stores state at runtime. The recommendation will be to use cavaskit via dart-defines.
2020-09-21 15:33:32 -07:00
Jonah Williams 2c6f862bf8
[flutter_tools] add EPERM to set of immediate exit errors (#66159) 2020-09-21 11:32:07 -07:00
Jonah Williams a029e172fe
[flutter_tools] fix bug where last build id parent folder is missing (#66156) 2020-09-21 11:17:13 -07:00
Jonah Williams a19f5baccc
[flutter_tools] connect widget cache from frontend_server (#65951) 2020-09-19 11:02:04 -07:00
Jenn Magder 5c8580360a
Stream logging from attached debugger on iOS (#66092) 2020-09-18 15:26:28 -07:00
Jonah Williams 84aae22c3e
[flutter_tools] optimize fetch requests and remove main.dart.js bypass (#66069)
The main.dart.js bypass is not needed now that we have skipWaiting. Additionally optimize the fetch handler so that resources not in the cache skip the service worker altogether.

Fixes #66068
2020-09-17 17:05:46 -07:00
Daniel Edrisian 3a5e45404d
Updated androidMissingSdkInstructions error message (#65964) 2020-09-17 15:57:06 -07:00
Jonah Williams bc11c2a8c4
[flutter_tools] update windows config feature (#65867) 2020-09-17 15:24:52 -07:00
stuartmorgan 50fd10fc6f
Consider the Windows app template stable (#66022)
Removes the template version from the Windows template; the API and
tooling boundary will now be considered stable, so there will no longer
be frequent breaking changes.

Also updates the link for adding desktop support to a project for all
three platforms to reflect the current location.

Fixes https://github.com/flutter/flutter/issues/52748
2020-09-17 15:24:28 -07:00
stuartmorgan eaf3f8b4f7
Add VERSIONINFO to the Windows template (#66025)
Adds a VERSIONINFO to Runner.rc in the Windows app template, populated
from the project creation metadata.

Currently the version itself is hard-coded, but it is future-proofed to
allow plumbing the actual version through at build time via preprocessor
defines.
2020-09-17 15:23:38 -07:00
Jonah Williams 3e838da96a
[flutter_tools] use flutter tool handler for dwds resources and precache tool pub dependencies (#65814)
If the tool is downloaded from a precompiled snapshot, or if the backing source files in the pub cache are deleted, the dwds debugging functionality will break as the client.js file cannot be located. Instead use the PackageConfig to verify that package location, downloading if it is missing.

Override the dwds middleware to avoid Isolate.resolvePackageUri

Fixes #53644
Fixes #65475
2020-09-17 15:22:06 -07:00
Michael Arndt fbc34def01
Fixed typo (subetting -> subsetting) (#62502) 2020-09-17 15:17:08 -07:00
Jenn Magder 4fee00798a
Inform user how to fix permissions when the observatory URL isn't found on iOS 14 (#65977) 2020-09-17 15:16:55 -07:00
gaaclarke fa646339d6
Added the machine's architecture to macos doctor results. (#65978) 2020-09-16 17:47: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
Devon Carew 04e4b117f6
fix an issue where raw json output is written to IDE clients (#65508)
fix an issues where raw json output was written to IDE clients
2020-09-15 12:44:05 -07:00
Balvinder Singh Gambhir 3dde3e034c
[flutter_tools] generates version.json for web using flutter tool (#64644)
Generates version.json in web directory of project. version.json can be used in the future version of package_info which will support web. version.json has the following keys : app_name, version and build_number. This file is generated every time a user runs or builds the project.

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2020-09-15 11:21:54 -07:00
Yuqian Li e3c6979d1b
Save startup timeline (#65118)
This would help us investigate issues like
https://github.com/flutter/flutter/issues/64781
2020-09-15 11:17:30 -07:00
Jonah Williams 4188085596
[flutter_tools] handle archive exception from invalid zip signature (#65869)
Like the ProcessException thrown from zip running on a bad file, the tool should catch the ArchiveException thrown from windows implementation using package:archive.
2020-09-15 10:55:41 -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
stuartmorgan bcd0959ac3
Sort generated plugin file content by plugin name (#65509) 2020-09-14 17:57:11 -07:00
Jonah Williams 039f1cf853
[flutter_tools] handle terminals that do not support single char mode in Terminal.promptForCharInput (#65418)
Some terminals stdin do not support single char mode (like an emacs terminal buffer apparently). If this is the case, then the presented choice values would always have an appended newline \n which would prevent us from finding the value in the listed index (or using it as a signal for the default choice). To fix, treat '' as the default choice and always trim the choice value.

While this has seemingly always been broken, it wasn't noticeable until the multi-device selection prompt was added a few months ago.

Fixes #65267
2020-09-14 17:57:04 -07:00
Jonah Williams 6acea15f22
[flutter_tools] fix failure to create ansi spinner if download needs to be retried (#65797)
Because the Status spinner was only created on setup, the second stop would asset/crash.

Fixes #65449
2020-09-14 17:55:11 -07:00
Herbert Poul 8dfd42f6b7
[gen_l10n] Support string list as preferred-supported-locales (#63649)
* [gen_l10n] Support string list as preferred-supported-locales, as documented.

* [gen_l10n] Convert preferredSupportedLocale to a list of strings. 

* [gen_l10n] Accept a multi option instead of a json string in the command line.
2020-09-10 07:32:40 +08:00
stuartmorgan 6d1c244b79
Always use POSIX paths for generated CMake files (#65493)
The Windows plugin CMake generation had code to ensure that the paths
written to it used POSIX separators, but the Linux version didn't; that
meant that plugin updates run on Windows machines would corrupt the
generated (but checked in) Linux CMake file.

This change shares that code so that both will use POSIX paths
regardless of what OS they are generated on.

Fixes https://github.com/flutter/flutter/issues/64591
2020-09-09 16:08:19 -07:00
Jonah Williams 6d360562e3
[flutter_tools] alternate the name of the dill file used for hot restart (#65435)
* [flutter_tools] alternate the name of the dill file used for hot restart

* switch alternative name to .swap
2020-09-09 15:56:25 -07:00
Jonah Williams b4551e31fc
[flutter_tools] remove globals from tracing and add unit tests (#65490)
Removes global variables and adds unit tests that can be copied for #65118
2020-09-09 15:55:52 -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
Ian Hickson e10bdbbd9d
Fix RangeMaintainingScrollPhysics (#65135) 2020-09-07 11:40:03 -07:00
Jonah Williams 9248fda410
[flutter_tools] add EACCES to list of immediate exit tool conditions (#65125)
Similar to the permission denied error on Windows, this is not resolvable by the tool.
2020-09-03 16:08:01 -07:00
Jonah Williams 30a0b5a50c
Revert "[flutter_tools] split project parsing/validation into separate function (#64814)" (#65202)
This reverts commit 8eed690442.
2020-09-03 14:25:29 -07:00
Jonah Williams 8eed690442
[flutter_tools] split project parsing/validation into separate function (#64814)
In order to share logic across build/archive/ipa commands, move the project parsing/validation into a different function. #64683
2020-09-03 14:14:52 -07:00
Jonah Williams 418681d6f1
[flutter_tools] allow disabling pwa from build command, fix run release build caching (#64587)
Fix run release/profile modes generating a full service worker.
2020-09-03 13:42:47 -07:00
Jaime Blasco 0699c18e99
[flutter_tool] [web] Remove x-frame-options header during debug (#62115)
Currently flutter run -d web creates a server with the x-frame-options: SAMEORIGIN added by default (shelf add it's by default). This doesn't allow you to use it inside a frame.

I am trying to build an embedded simulator in vscode and it requires using an iframe.

With this PR I remove the header for debug and profile mode.
2020-09-03 13:33:39 -07:00
Jonah Williams bd3eee75f3
[flutter_tools] rethrow process exceptions as tool exit from gradle build (#64745)
The flutter tool is currently unable to detect missing permissions in gradle/gradle.bat that would cause a gradle build to fail via process exception. Rather than crashing and exiting, we can display the exception as an error message and tool exit.

While linux/macOS are able to add the +x bit, this is not possible on windows with our current file system/OS API. These crashes represent a substantial amount of crash reporting, but are otherwise not actionable on our end.
2020-09-03 11:55:55 -07:00
Jonah Williams 08e3ed9e2d
[flutter_tools] prevent creation of android devices if adb is not located (#65184)
More work to prevent current #2 crash issue on stable. If adb is not located do not list/create android devices.
2020-09-03 11:01:43 -07:00
Shi-Hao Hong b80b432555
Move gen_l10n into flutter_tools (#65025) 2020-09-03 09:26:58 -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
Jonah Williams c034f1a1cc
[flutter_tools] fix screenshot command in release mode and help documentation (#65114)
Currently taking a screenshot in release mode crashes and is also not documented as a supported command. Fix both of these and add test cases.
2020-09-02 17:33:41 -07:00
includecmath 6d46ff7e9b
[flutter_tools] flutter run should allow exit when make choose for devices. (#64403) 2020-09-02 17:30:04 -07:00
Jonah Williams d3fd62c843
[flutter_tools] exit with helpful message if where is missing on windows (#65112) 2020-09-02 16:50:04 -07:00
Jenn Magder 6175183545
Add --device-timeout flag to device-related commands (#64834) 2020-09-02 15:38:52 -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
stuartmorgan 6eef5f2c5f
Share build command flag configuration on desktop (#64983)
Almost all of the flag setup on Linux, macOS, and Windows should be
identical; this pulls that common setup to a shared method.

This adds support for several flags on macOS that have all the necessary
plumbing already in place due to shared backend code, but were never
enabled.

Fixes https://github.com/flutter/flutter/issues/64944
2020-09-01 10:21:51 -07:00
Jonah Williams 216da410a8
[flutter_tools] add --config-only option to flutter build ios (#64848) 2020-08-31 17:23:03 -07:00
Jonah Williams 183a653e37
[flutter_tools] adjust index.html caching and insert cache busting URL in to main.dart.js/sw request (#64976)
Attempt to bypass aggressive CDN by requesting main.dart.js/sw.js with a query param and defaulting index.html to online first. This will not stop aggressive CDN caching of the index.html

#64968
2020-08-31 17:22:42 -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
Jonah Williams 15d18b9e42
[flutter_tools] remove unused zip verification (#64970)
This is no longer used, in favor of just attempting to unzip and handling the exception.
2020-08-31 13:26:38 -07:00
Jonah Williams 68b39da346
[flutter_tools] tool exit after repeated network failure (#64878)
Exit the tool after a repeated network error to download. previously we were returning null and continuing on, leading to a ProcessException when we unzipped a missing file.
2020-08-31 12:15:05 -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
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
Jenn Magder 6ca9cd7b8f
Use real flutter root for finding pub in command integration test (#64021) 2020-08-18 17:09:02 -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 39c735f408
[flutter_tools] correctly forward error only stdout in non-verbose modes (#63815) 2020-08-18 16:56:05 -07:00
Albert Viilik 654022aecb
Make deprecation notice link to website downloads (#63829) 2020-08-17 17:01:02 -07:00
Jonah Williams 042fa8cf66
[flutter_tools] trim trailing newline from vm service logging events (#63976) 2020-08-17 12:26:03 -07:00
Zachary Anderson 1884920e30
[flutter_tool] Handle Windows line endings in packages_test.dart (#63806) 2020-08-17 11:41:08 -07:00
stuartmorgan 70bd819c52
Separate blkid in the Linux library checks (#63810) 2020-08-17 10:51:03 -07:00
Helin Shiah 3d3b5349a7
Return host and port from devtools launcher (#63795) 2020-08-17 10:46:05 -07:00
Jonah Williams 08254b2156
Revert "Remove TODOs added for HTTP abort() change in dart sdk (#63924)" (#63972)
This reverts commit b1c17313f6.
2020-08-17 10:25:01 -07:00
zichangg b1c17313f6
Remove TODOs added for HTTP abort() change in dart sdk (#63924) 2020-08-17 09:46:08 -07:00
Zachary Anderson f360d8b8e8
[flutter_tool] Fix some create_test.dart tests on Windows (#63796) 2020-08-14 15:26:29 -07:00
stuartmorgan 6f0cfc9524
Surface Windows build errors in non-verbose mode (#63707) 2020-08-13 19:46:02 -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
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
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
Ian Hickson 8ad4da4a4e
There's a bug filed about this now, so update comment. (#62892) 2020-08-05 15:01:21 -07:00
Marcus Tomlinson 145df39953
Explicitly find and link blkid using pkg-config (#62979) 2020-08-05 14:56:19 -07:00
Chris Yang 2459f5c513
plugin template min flutter sdk version to 1.20 (#62605) 2020-08-04 12:31:05 -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
Jonah Williams a0745e23bf
[flutter_tools] add --analyze-size flag (#62697) 2020-08-03 14:21:05 -07:00
Helin Shiah 5ce7282a36
Return devtools serve response instead of printing (#62702) 2020-08-03 10:26:12 -07:00
Helin Shiah 7cbec567de
Add daemon handler to start devtools (#62608) 2020-07-31 11:06:05 -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
Chris Yang 48fab86c6e
[flutter_tools] update pubspec .yaml message should not be displayed when creating a new plugin (#62599)
* update pubspec message should not be displayed when creating a new plugin

* formatting

* revikew

* review

* cleanup
2020-07-30 13:49:15 -07: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
Robert Ancell 392e25c8f2
Set the application-id in the Linux shell (#60053) 2020-07-30 08:46:29 +12: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
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
Jonah Williams f707f6f6ea
[flutter_tools] add flutterRoot field to JSON machine output (#62053) 2020-07-29 08:16:04 -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
Chris Yang 004f90f8fd
remove iOS folder (#61561) 2020-07-28 10:33:52 -07:00
Jenn Magder 5abe2d3364
Allow hyphens in iOS UDIDs (#62225) 2020-07-28 10:29:34 -07:00
includecmath 3215a0130b
[flutter_tools] Unified analyze error log format (#61146)
* Unified analyze error log format

* Fix review issues
2020-07-28 10:21:57 -07:00
Jonah Williams 59e0a2ec28
[flutter_tools] update device discovery constructors (#61640)
google3 callsites are updated, remove global lookup from constructor parameters.
2020-07-28 10:20:01 -07:00
雷宇辰 7779a14794
[flutter_tools] Make flutter git upstream configurable (#61513) 2020-07-24 16:16:31 -07:00
Jenn Magder f9499f44f7
Detect exact device ID matches quickly (#62070) 2020-07-24 16:15:44 -07:00
Will Larche 7782845edd
[Material] Updated icons and fonts (#61778) 2020-07-24 15:41:13 -07:00
Jonah Williams c6dce2318b
[flutter_tools] remove breakpoints from paused isolate on hot restart (#62069)
The embedder requires that the isolate is unpaused, because the runInView method requires interaction with dart engine APIs that are not thread-safe. These APIs must be run on the same thread that would be blocked by the pause. Simply unpausing is not sufficient, because this does not prevent the isolate from immediately hitting a breakpoint, for example if the breakpoint was placed in a loop or in a frequently called method. Instead, all breakpoints are first disabled and then the isolate resumed.
2020-07-24 15:34:55 -07:00
Zachary Anderson 523afbe58b
Ensure analytics are sent before disabling (#62094) 2020-07-24 15:31:18 -07:00
Jonah Williams a7db3591cb
[flutter_tools] deflake fastReassemble test (#62152) 2020-07-24 15:17:39 -07:00
Zachary Anderson 5e0ba2290f
Pass --disable-dart-dev in more places (#62217) 2020-07-24 13:37:08 -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
Jonah Williams 3a976feb58
[flutter_tools] clean plugin dependencies file (#62061)
Clean even more, in case the plugin dependency update logic is wrong-o.
2020-07-22 18:39:33 -07:00
huangchaoyang 9da74f66ca
Show correct errors when plugins yaml forgot the 'flutter.plugins.pla… (#61338) 2020-07-22 18:24:03 -07:00
Jonah Williams 9f040865c9
[flutter_tools] macOS cleanups, attach to log reader in release mode (#61913) 2020-07-22 18:23:20 -07:00
Jenn Magder fe670c04cc
Only try to get build settings if the Xcode project exists (#61979) 2020-07-22 18:22:38 -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
includecmath aa9119e53b
[flutter_tools] Concise dart2js commands outputKernel & outputJavaScript (#61881) 2020-07-21 02:31:03 -07:00
Jonah Williams 8be1c9ef25
[flutter_tools] turn off fuchsia support by default (#61634) 2020-07-21 02:26:04 -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
Jonah Williams 07caa0fbfe
[flutter_tools] Add plumbing for widget cache (#61766)
To support #61407 , the tool needs to check if a single widget reload is feasible, and then conditionally perform a fast reassemble.

To accomplish this, the FlutterDevice class will have a WidgetCache injected. This will eventually contain the logic for parsing the invalidated dart script. Concurrent with the devFS update, the widget cache will be updated/checked if a single widget reload is feasible. If so, an expression evaluation with the target type is performed and the success is communicated through the devFS result. An integration test which demonstrates that this works is already present in https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/integration.shard/hot_reload_test.dart#L86

Finally, when actually performing the reassemble the tool simply checks if this flag has been set and calls the alternative reassemble method.

Cleanups:

Remove modules, as this is unused now.
2020-07-20 14:03:44 -07:00
Helin Shiah 5b9ce492f3
Skip printing rendered error text in machine mode (#61684) 2020-07-20 09:41:03 -07:00
Jenn Magder c4bfa4c7ab
Inject iproxy into context (#61762) 2020-07-20 07:46:05 -07:00
Jonah Williams 78a975444a
[flutter_tools] revert dart format changes (#61760) 2020-07-20 07:41:05 -07:00
Jenn Magder 55176c4d6f
Show device diagnostic messages in doctor (#61585) 2020-07-17 09:41:03 -07:00
Konstantin Scheglov 741e9675e7
Remote returns for function expression inferred return type void. (#61582) 2020-07-17 09:36:03 -07:00
Ben Konyi 38fe887342
Revert "Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61633)" (#61641)
This reverts commit 594c3541aa.
2020-07-16 11:43:54 -07:00
Ben Konyi 594c3541aa
Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61633)
This reverts commit a1a5a8f635.
2020-07-16 11:38:17 -07:00
Christopher Fujino f796e047fd
Verbose process exceptions (#61552) 2020-07-16 11:31:03 -07:00
Jonah Williams 859fce9010
[flutter_tools] add feature for iOS, android, and fuchsia (#61481)
Add feature flags for android, ios, and fuchsia (on by default). After updating the g3 rollers, the fuchsia feature will be turned off by default. Creates a simpler base type of feature flags for g3 to extend.

Updates android, ios, fuchsia workflows to use feature flags check.
Removes concept of stable artifacts and checks on flutter version.

Fixes #58999
#52859
#12768
2020-07-16 09:51:59 -07:00
Jonah Williams 045f3a54f5
[flutter_tools] turn down flutter generate (#61475)
complete removal of all generate functionality

Fixes #61508
2020-07-16 09:51:22 -07:00
Danny Tuppeny e8eb876489
Fix build (fix references to _flutter -> flutter) (#61568) 2020-07-15 12:45:55 -07:00
Danny Tuppeny 51fcf8fa7a
Add debounce support to daemon hot reload requests (#55376) 2020-07-15 11:56:05 -07:00
Jonah Williams d8b6fa153a
[flutter_tools] generate a synthetic flutter_gen package on pub get (#61261)
Allow configuring the flutter_manifest to support a synthetic package, this is done through flutter: generate: true.

When running pub get, insert a flutter_gen entry into the packages if it does not already exist. This points to .dart_tool/flutter_gen, which can be updated to contain the generated intl sources (But doesn't currently)

Adds an integration test that verifies this code can be run and imported when enabled.

Part of #60914
2020-07-15 10:12:52 -07:00
zichangg 3631adc99a
Fixing patch for coming breaking change in HttpClientRequest (#61138)
* Fixing patch for coming breaking change in HttpClientRequest

* Add noSuchMethod() and comment out abort()

* Add ignore: override_on_non_overriding_member
2020-07-15 10:07:57 -07:00
Jonah Williams cb7770b3a5
[flutter_tools] add support for enable null safety asserts (#61114)
Enable null safety asserts for web debug mode. This induces runtime asserts at the boundaries between null safe and non-null safe libraries. Adds integration test that validates assertion error is thrown.

#61042
2020-07-15 09:54:39 -07:00
Jonah Williams b010f78e3a
[flutter_tools] fix typo in test code (#61548) 2020-07-15 09:21:24 -07:00
Jenn Magder 4fba77476d
Support Xcode patch version comparison (#61484) 2020-07-14 17:16:02 -07:00
Ben Konyi a1a5a8f635
Revert "Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61395)" (#61498)
This reverts commit f98184e487.
2020-07-14 16:32:49 -07:00
Ben Konyi f98184e487
Reland "Add support for Dart Development Service (DDS) in Flutter Tools (#61276)" (#61395)
This reverts commit 5b9c6e2b0e.
2020-07-14 15:57:36 -07:00
Jonah Williams 485034cab3
[flutter_tools] update fastReassemble method for single widget reloads (#61413)
For #61407 , we need to be able to find all widgets that of a given type. Previously I experimented with using the type name, but of course this does not handles subtypes. The actual check needs to be an is check.

Since there is no way to convert a String to a Type at runtime for use in this check, we can instead evaluate an expression which assigns a closure to a field. The idea for this was inspired by how the dart devtools adds debug functionality to older versions of flutter.

Since the reload feature is not complete yet, adds an integration test which simulates how it will eventually behave
2020-07-14 12:25:13 -07:00
Jonah Williams d22d65c6e7
[flutter_tools] add the feature for single widget reloads (#61411)
Implements the flutter config feature for #61407 , but does not implement any of the functionality.
2020-07-14 12:24:58 -07:00
Jonah Williams e666ea8de4
[flutter_tools] cleanups to web runner functionality (#61178)
Skip unnecessary parsing of chrome URI. Ensure stack traces are initialized in web server. Disclaimer on web server that it does not support debugging and remove help message. Fix generated entrypoint to check for main(List<String> args)

- Fixes #59643
- Fixes #55084
- Fixes #60417
2020-07-13 15:12:46 -07:00
Dan Field eadc35f62b
Optionally invert oversized images (#61209)
* Optionally invert oversized images
2020-07-13 14:03:23 -07:00
Danny Tuppeny f8135add8e
Add a flag for using WS for debug backend (#61359) 2020-07-13 13:31:04 -07:00
xster 8bd2e6585b
Remove v1 Android create templates (#61203) 2020-07-11 12:15:19 -07:00
Anna Gringauze 9cbe1dccf3
Added web compiler debug metadata (#61265)
Made flutter tools serve metadata produced by the frontend server:

pass --experimental-emit-metadata flag to flutter engine
store and serve metadata from web asset server
store and serve merged metadata from web asset server
add tests to verify that metadata is served from memory
update dwds version so it can read metadata
configure dwds to read metadata from file
Prerequisite changes (landed):

sdk: https://dart-review.googlesource.com/c/sdk/+/150181
flutter engine: flutter/engine#19168
webdev:dart-lang/webdev#1064
2020-07-10 16:36:43 -07:00
Dan Field cd80ed3009
Fix bold not getting cleared on new line (#61256)
* Fix bold not getting cleared on new line
2020-07-10 16:09:49 -07:00
Dan Field 5b9c6e2b0e
Revert "Add support for Dart Development Service (DDS) in Flutter Tools (#59114)" (#61276)
This reverts commit fe7bbf7226.
2020-07-10 15:53:35 -07:00
Ben Konyi fe7bbf7226
Add support for Dart Development Service (DDS) in Flutter Tools (#59114) 2020-07-10 15:35:21 -07:00
Jonah Williams 66556faef7
[flutter_tools] deflake integration test with tryToDelete (#61253) 2020-07-10 13:29:49 -07:00
Jonah Williams 1c1ef133ee
[flutter_tools] remove globals from device manager, flutter tester (#61139)
Remove global variables from device manager, flutter tester devices and update tests
2020-07-10 11:52:09 -07:00
Jonah Williams fbca40add2
[flutter_tools] abstract logger construction (why can't I hold all these loggers) (#61201)
We have too many loggers, and the logger construction rules are too complicated to be untested. Capture these in a LoggerFactory and test that construction is correct.
2020-07-10 11:51:47 -07:00
Jonah Williams 6eaaf1650e
[flutter_tools] switch order of injection (#61191)
Inject loggers in the right order, test WIP. Otherwise verbose machine would not get the AppRunLogger
2020-07-09 18:04:37 -07:00
Jenn Magder 20fe2f88c5
Prefer tear offs to lambdas in test expects (#61196) 2020-07-09 17:58:51 -07:00
Jonah Williams ed9a705ec2
[flutter_tools] allow unmuting of command logging (#61198)
Running flutter doctor -v prints out extra details instead of running in verbose mode. Allow disabling this with -vv so it can be debugged.
2020-07-09 17:55:53 -07:00
Jenn Magder e110ca7209
Case insensitive check flavor names against Xcode schemes (#61140) 2020-07-09 16:56:02 -07:00
includecmath 72258eac5f
[flutter_tools] Separate style and data from AnalysisError (#60591) 2020-07-09 13:51:02 -07:00
Dan Field c6fd42499a
Test update_packages for git packages (#61127) 2020-07-08 19:31:02 -07:00
Jonah Williams d4589e0c71
[flutter_tools] ensure AppRunLogger is injected for run/attach machine (#61103)
run/attach --machine requires a different logger than daemon, which uses the NotifyingLogger. We have too many loggers!

Fixes #59463
2020-07-08 18:21:46 -07:00
includecmath 93eac884eb
[flutter_tools] Clean code analyze command (#60200) 2020-07-08 18:11:03 -07:00
Jonah Williams 741608a261
[flutter_tools] fix recursive asset variant issue (#61129)
Fixes #45075
Fixes #57210

If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants".

The solution is to include project ephemeral directories, in addition to the build directory.
2020-07-08 18:07:27 -07:00
Natan Portilho f567a0cc98
Device manager choose running device (#57349) 2020-07-08 09:41:02 -07:00
Jonah Williams 07e2d6f63b
[flutter_tools] make precache force blow away stamp files (#61003)
update flutter precache --force to delete all stamp files. In the event that a user is hitting a cache issue, this should be easier than re-downloading all artifacts or manually blowing away the cache.

This is probably how it should have worked in the first place
2020-07-07 19:33:25 -07:00
Jonah Williams 77310c152f
[flutter_tools] deprecate flutter version (#60998) 2020-07-07 18:04:02 -07:00
Jonah Williams f111a823ec
[flutter_tools] remove some globals from flutter_tester device (#60787)
Remove globals from flutter_tester device and cleanup test case. Not completely gone since the Kernel Builder will still use them, but a good incremental improvement.
2020-07-07 10:24:52 -07:00
Jonah Williams 846418b60b
[flutter_tools] fix crash if the platform section was a list (#60927)
Missed validation to go with cast. Added test case to reproduce.
2020-07-07 10:24:42 -07:00
stuartmorgan 4b12050112
Switch Windows to CMake (#60629)
* First pass at CMake files; untested

* First pass of adding CMake generation logic on Windows

* Misc fixes

* Get bundling working, start incoprorating CMake build into tool

* Fix debug, exe name.

* Add resources

* Move cmake.dart

* Rip out all the vcxproj/solution plumbing

* Fix plugin cmake generation

* Build with cmake rather than calling VS directly

* Adjust Windows plugin template to match standard header directory structure

* Pass config selection when building

* Partially fix multi-config handling

* Rev template version

* Share the CMake generation instead of splitting it out

* VS build/run cycle works, with slightly awkward requirement to always build all

* Update manifest

* Plugin template fixes

* Minor adjustments

* Build install as part of build command, instead of separately

* Test cleanup

* Update Linux test for adjusted generated CMake approach

* Plugin test typo fix

* Add missing stub file for project test

* Add a constant for VS generator
2020-07-06 12:59:16 -07:00
Jenn Magder 11bf7f0687
Take screenshots of wirelessly paired iOS devices (#60623) 2020-07-06 12:28:29 -07:00
Jonah Williams ae9ac9f211
[flutter_tools] support starting in canvaskit with FLUTTER_WEB_USE_SKIA=true (#60708) 2020-07-01 22:53:03 -07:00
Jonah Williams 2f43aeaf54
[flutter_tools] fix crash if grouped doctor validator crashes (#60658) 2020-07-01 22:48:02 -07:00
Jonah Williams c543db70dc
[flutter_tools] add null-safety flags to dill cache location (#60633)
initialize from dill does not handle changing null-safety flags and will incorrectly use the nullability mode of the last compile. Add all extra frontend options to the unique name prefix for the flutter run dill cache to avoid this situation.
2020-06-30 15:49:31 -07:00
Chris Yang 07e24f6dad
[flutter_tool] fix ide-config crash because of no android key (#60617) 2020-06-30 13:01:47 -07:00
Jonah Williams 7ca324ac01
[flutter_tools] support sound null-safety mode for the web (#60570)
In web debug mode, infer sound null safety by default. When sound null safety is enabled, provide a separate dill and precompiled Dart SDK. Release builds do not need this setting since we run dart2js from source.

Fixes #59873
2020-06-30 12:29:42 -07:00
Jonah Williams 2188196125
[flutter_tools] ensure flutter daemon can exit correctly when app fails to start (#60615)
The flutter daemon unconditionally waits for the appFinished signal, even if startup failed. Ensure this future is correctly completed if there is a failure in ResidentRunner.run and not just ResidentRunner.attach. Adds regression tests for run release, debug, debug web, and release web. Adds missing try catch in cold runner startup.

Manually tested with release/debug on Android and release/debug on web.

Fixes #60613
2020-06-30 12:26:18 -07:00
James D. Lin cf8fbc363a
[flutter tools] Revert desktop device name changes and print the category instead (#60395) 2020-06-30 11:28:02 -07:00
Christopher Fujino b15798fa98
Revert "Revert "[flutter_tools] update libimobiledevice (#59512)" (#60551)" (#60569)
This reverts commit 09cca73aee.
2020-06-29 18:29:58 -07:00
Jonah Williams 55e3770f3e
[flutter_tools] remove globals from base/android (#60480)
Remove unnecessary use of globals from base tests, and an android test. This changes the test to avoid bouncing through the global getters, which can lead to incorrectly cached zone values. Switches the memory filesystem implementation to the test implementation
2020-06-29 15:06:58 -07:00
Jenn Magder d5225a560d
Fix daemon device discovery crash when Xcode isn't installed (#60546) 2020-06-29 14:54:19 -07:00
Christopher Fujino 09cca73aee
Revert "[flutter_tools] update libimobiledevice (#59512)" (#60551)
This reverts commit 32000db52e.
2020-06-29 13:44:38 -07:00
Christopher Fujino 32000db52e
[flutter_tools] update libimobiledevice (#59512) 2020-06-29 13:17:04 -07:00
Jenn Magder a4fa61b4f1
Use ephemeral ports for iOS port forwarding (#60381) 2020-06-26 15:02:05 -07:00
Jonah Williams e1538d1b88
[flutter_tools] last pass on general.shard unit tests (#60263)
Last batch of test fixes for general shard.
2020-06-26 13:36:06 -07:00
Jonah Williams 4bb6096086
[flutter_tools] surface null safety/experiment flags in attach (#60317)
Missed this one. Needed for google3 and add2app workflows
2020-06-25 15:44:57 -07:00
Jonah Williams 82a6f9bf0b
[flutter_tools] remove most use of global packages path (#60231)
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info.

It needs to stick around for the fuchsia deps we do not control.

Filled #60232 for remaining work.
2020-06-25 12:52:14 -07:00
Jonah Williams 5cfcae004a
[flutter_tools] fix tests that depend on correct cache existance (#60241)
These tests will hit the real Cache, failing if the flutter root has been modified
2020-06-24 16:45:46 -07:00
Jonah Williams a0334fb500
[flutter_tools] maintain file manifest for create (#59706)
First pass at fixing #57985 and implementing #59602

This doesn't have enough metadata to be useful for IDEs yet, but it prevents the issue from getting worse while we iterate on it.
2020-06-24 16:20:21 -07:00
Jonah Williams 2a7ee930c3
[flutter_tools] Update WebAssetServer to avoid context, fix tests (#60224)
WebAssetServer could fail if some of the global statics it depended on were initialized in a different order. Fix this by removing globals.

Delete dwds startup test that needs to spawn a real server.
2020-06-24 16:19:49 -07:00
stuartmorgan d9902a5474
Consider the Linux template stable (#60163)
Remove the version checking and associated warnings. The Linux template
and build process will now be subject to more typical Flutter breaking
change policy, and should no longer require regularly deleting and
recreating the platform directory.
2020-06-24 12:23:57 -07:00
Jonah Williams f8c9e1bb67
[flutter_tools] de-flake integration tests (#60221)
The vm_service_integration test flake is caused by trying to call the method before the framework is initialized (and the extension added). The run errors failure is caused by the error taking some time to propagate to the harness
2020-06-24 12:14:58 -07:00
Jonah Williams 9e30d51ac6
[flutter_tools] start fixing command tests (#60172) 2020-06-24 11:26:36 -07:00
Chris Yang 95b98dc2c2
flutter create . on plugins also regenerates files for platforms supported in pubspec.yaml (#60159) 2020-06-24 10:38:03 -07:00
Jonah Williams 5d61bff294
[flutter_tools] even more test fixes (#60156)
Fix tests broken under tester
2020-06-24 10:23:59 -07:00
Jonah Williams dd49e57be2
[flutter_tools] more test fixes (#60144)
Fixes additional bugs uncovered by tester, style fixes to prevent suggested imports.
2020-06-23 17:53:00 -07:00
Chris Yang 2e63b7d4f8
Add --platforms to flutter create -t plugin command (#59507) 2020-06-23 17:38:03 -07:00
Jonah Williams 14992c5951
Revert "[flutter_tools] separate target platform, host platform, and architecutre (#60119)" (#60147)
This reverts commit 30d97d89e0.
2020-06-23 17:19:29 -07:00
Jonah Williams 37db92beeb
[versions] update all versions and fix tool tests (#60127)
Update all versions, specifically file which fixes some bugs that caused tests to fail if run in different orders:

- systemTemp directories created by MemoryFileSystem will allot names based on the file system instance instead of globally.
- MemoryFile.readAsLines()/readAsLinesSync() no longer treat a final newline in the file as the start of a new, empty line.
- RecordingFile.readAsLine()/readAsLinesSync() now always record a final newline.
2020-06-23 15:48:37 -07:00
Jenn Magder c8e53b3859
Add null safety options to build ios-framework (#60111) 2020-06-23 14:35:45 -07:00