Commit graph

4552 commits

Author SHA1 Message Date
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
Siva e15cfc2c09
Remove code that morphs --sound-null-safety to --null-safety options (#61491) 2020-07-14 17:21:01 -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 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
Pasindu De Silva 5c9d09f05a
Add the ability to ignore lines from coverage depending on comments (#61408) 2020-07-14 01:46:02 -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
Jenn Magder cda6c27ff7
Add spaces between sentences in help text (#61135) 2020-07-13 11:16:03 -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 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
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
Alexandre Ardhuin f32a73711a
use nnbd deps (#61177) 2020-07-09 23:01:22 +02: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
Sim Kern Cheh 5f49654734
Issue with comparison operator in generated service worker (#61066) 2020-07-08 09:56:02 -07:00
Natan Portilho f567a0cc98
Device manager choose running device (#57349) 2020-07-08 09:41:02 -07:00
Dan Field d45ad057b4
Handle git dependencies, roll packages to get transitive deps of flutter_gallery (#61064) 2020-07-07 22:21:19 -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
Dan Field 33aa457604
Roll packages (#61034)
Roll packages, update XML deprecations.
2020-07-07 16:40:33 -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
Pierre-Louis 0bc4368233
Typo sweep (#60693) 2020-07-02 13:08:02 -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
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 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
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 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
Christopher Fujino ca32668b0b
port devicelab from idevice_id -> xcdevices (#59907) 2020-06-23 14:37:14 -07:00
Jenn Magder c8e53b3859
Add null safety options to build ios-framework (#60111) 2020-06-23 14:35:45 -07:00
Jonah Williams 30d97d89e0
[flutter_tools] separate target platform, host platform, and architecutre (#60119)
separate target platform, host platform, and architecture
2020-06-23 13:51:17 -07:00
Jonah Williams 2a1c078b76
[flutter_tools] add null safety argument to unbreak frob (#60102) 2020-06-23 11:20:49 -07:00
Jenn Magder d82ef3517c
Use assemble build system directly for build ios-framework (#60041) 2020-06-22 18:44:27 -07:00
Jenn Magder 6a2bc2617e
Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867) 2020-06-22 18:43:04 -07:00
Jenn Magder 2c538be421
Parse build ios framework build mode from params (#59874) 2020-06-22 17:13:03 -07:00
Jonah Williams 55abbb6be6
[flutter_tools] track null safety usage (#59822)
* [flutter_tools] track null safety usage

* Update flutter_command_test.dart

* cleanups
2020-06-22 17:05:01 -07:00
Jonah Williams 8e9b78728f
[flutter_tools] switch linux desktop feature on (#60018)
Enable linux desktop feature on dev channel
2020-06-22 17:04:01 -07:00
Anna Gringauze aac836c6ad
Enabled expression evaluation by default (#59826) 2020-06-19 15:23:03 -07:00
Jonah Williams fbdc79e448
[versions] update all versions (#59832)
Fixes #59718

Update all versions, specifically dwds which has a hot restart fix
2020-06-19 14:48:57 -07:00
Michael Goderbauer e48b7e99cd
More word substiturions (#59497) 2020-06-19 13:43:02 -07:00
Jonah Williams dec7423b44
Revert "Add the ability to ignore lines depending on comments (#58656)" (#59813)
This reverts commit df02518dc9.
2020-06-18 17:15:50 -07:00
Jenn Magder f41f795640
Clean up PollingDeviceDiscovery dispose (#59709) 2020-06-18 16:38:02 -07:00
Chris Bracken e0f60918d4
Roll the engine from 965fbbe to b5f5e63 (#59804)
This rolls the engine from:
965fbbed1776545ee681cb57f3fb1d0c2000bbcb to
b5f5e6332cb4987e9e38ffaa267733ec0a8705ba. A Dart SDK roll in this range
changed the format of the compileExpression RPC VMService endpoint,
necessitating a tool patch.
2020-06-18 16:12:54 -07:00
James D. Lin bdbe6774a3
[flutter tools] Change the desktop device names and IDs (#58812)
In google3, the Linux device is always available, and it has confused
people who run the Flutter doctor and see
"• Linux • Linux • linux-x64 • Linux" listed.

Rename the Linux device name to "Linux desktop" and the device ID to
be "linux". Make similar changes to the Windows and macOS
devices for consistency.  This is also  consistent with the web
devices.

The device ID change shouldn't be break -d usage since that does a
case-insensitive prefix match.
2020-06-18 15:30:00 -07:00
stuartmorgan e85655c48e
Specify encoding for vswhere output (#59607)
On Windows, Process.run assumes the output uses the system codepage by default. This allows specifying it in our wrapper, and sets the encoding for vswhere to UTF-8 since we're passing a flag that forces it to use UTF-8 output.

Fixes #53515
2020-06-18 14:00:46 -07:00
Jonah Williams 01e09ea8af
[flutter_tools] add missing null-safety flags (#59773)
Some of the null-safety commands were missing - plumb them through. Ensure that verbose mode shows their output, and clean up the messaging around sound-null-safety.

Fixes #59769

Adds a test that validate each of the null safety supporting build commands has everything plumbed through.
2020-06-18 12:34:35 -07:00
Jonah Williams 5e77083b8d
[flutter_tools] make parent logger optional (#59786)
The addition of the non-optional parent logger broke the google3 roll. Make it optional so we can roll
2020-06-18 11:44:29 -07:00
Pasindu De Silva df02518dc9
Add the ability to ignore lines depending on comments (#58656)
https://github.com/dart-lang/coverage - 0.14.0 added the ability to be able to ignore coverage depending on comments.

// coverage:ignore-line to ignore one line.
// coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive.
// coverage:ignore-file to ignore the whole file.
2020-06-18 10:34:42 -07:00
Jonah Williams 447e3d3f38
[flutter_tools] remove globals from compilers (#59184)
Refactors KernelCompiler and ResidentCompiler to no longer use globals (except as a fallback for g3 migration). Improves the compilation error when running flutter test on a package without a flutter_test dependency.

Updates machine mode to output trace text to stderr
2020-06-18 10:33:17 -07:00
Jonah Williams e1f4cfb4f4
[flutter_tools] add toggle b and service extension to change platform brightness (#59571)
A frequent request from the last Flutter developer survey was for an easier method of testing light/dark mode changes. Currently, a user needs to manually change the theme settings or adjust phone settings to see the difference. Instead we should add a toggle from the CLI, and eventually devtools/Intellij/Vscode that allows developers to override the current setting.

Fixes #59495

Adds flutter.ext.brightnessOverride service protocol which either queries the current platform brightness, or overrides it to a new value. This accepts either Brightness.light or Brightness.dark as a value.

Adds a CLI toggle b which allows the setting to be toggled manually.

Requires an update to the MediaQuery, to conditionally use a debug override when not in release mode
2020-06-18 10:32:43 -07:00
Chris Bracken f39ab52221
Revert "Manual engine roll to update format of compileExpression RPC response (#59717)" (#59774)
Failing dev/integration_tests/ui/test_driver/keyboard_resize_test.dart
Also timing out on new_gallery_ios__transition_perf

This reverts commit c7a37c72c2.
2020-06-18 09:52:44 -07:00
Ben Konyi c7a37c72c2
Manual engine roll to update format of compileExpression RPC response (#59717) 2020-06-18 09:18:03 -07:00
Jonah Williams 719ea5a8c0
[flutter_tools] make expando on vm service null safe to handle web stuff (#59624) 2020-06-18 08:18:04 -07:00
Jonah Williams 802c4b0f12
[flutter_tools] handle NPE in list views method(#59626)
Fixes #59608

The VmService getter can be null, handle that in the listViews method. NNBD when
2020-06-17 10:53:54 -07:00
Jenn Magder b8c64d7014
Don't crash when pubspec isn't a map (#59632) 2020-06-17 10:33:02 -07:00
stuartmorgan 61c198e766
Switch Linux to the GTK embedding (#59287)
Updates the tooling to use the GTK embedding, rather than the GLFW embedding:
- Adds new requirements to `doctor`
- Updates the app and plugin templates to make GTK-based runners and plugins
- Stops downloading and installing the GLFW artifacts

Final part of #54860, other than cleanup.
2020-06-16 13:31:24 -07:00
Jonah Williams 15154b115f
[flutter_tools] deprecate build aot (#59487)
This command was previously used by the re-entrant build scripts in xcode_backend.sh and build.gradle. These have since been refactored to use flutter assemble.

Deprecation the command in preparation for removal in a future release of flutter. The only current use is a test on HHH
2020-06-16 13:00:11 -07:00
Diego Henrique Domingues 95ee633f66
[flutter_tools] fix the event attribute used to skip waiting (#59568) 2020-06-16 11:15:02 -07:00
Jenn Magder 5a4bb5050d
Remove last references to ideviceinstaller (#59508) 2020-06-16 10:25:10 -07:00
Jonah Williams 958f7c5b55
[flutter_tools] ensure generated entrypoint matches test and web entrypoint language version (#59291)
Ensure that the language version of the test/web generated entrypoint matches the language version of the test file to run, or the overall package language version if no annotation is provided.
2020-06-16 09:17:12 -07:00
Michael Goderbauer 584fd5f913
Word substitutions (#59484)
* Word substitutions

* ++
2020-06-16 09:15:43 -07:00
duzenko c79de78237
LG debugging/logcat fixed (#58670) 2020-06-15 09:35:07 -07:00
James D. Lin c21b3233e4
[flutter tools] Don't return success if we trigger runZoned's error callback (#58474) 2020-06-15 09:35:04 -07:00
Ian Hickson 6202476691
Remove license statements in template files. (#57268) 2020-06-15 09:30:05 -07:00
Jenn Magder 0093c6a4c6
Add Podfile migration warning to support federated plugins (#59201) 2020-06-12 12:44:14 -07:00
Danny Tuppeny 96711b00ce
Don't crash on requests for invalid package URLs (#59250) 2020-06-12 09:25:04 -07:00
Jonah Williams bf94520644
[versions] Update all the versions (#59283) 2020-06-11 16:40:22 -07:00
Marcus Tomlinson 1fe0f22645
Remove use of BundleUtilities in Linux build (#59080)
* Explicitly install the Flutter library

* Publish ${FLUTTER_LIBRARY} to parent scope

* Bundle plugin libraries

* Bundle <plugin_name>_bundled_libraries too

* BUNDLED_LIBRARIES -> PLUGIN_BUNDLED_LIBRARIES

* Update Linux plugin test

* Address review comments
2020-06-11 22:00:28 +01:00
Jenn Magder 222c2cb0cc
Deprecate make-host-app-editable (#59217) 2020-06-11 11:37:15 -07:00
Gary Roumanis d25b9c80a4
Do not depend on embedded (#59210) 2020-06-11 09:31:05 -07:00
Jenn Magder 75fd73d818
Revert "[flutter_tools] inject output preferences at the top level (#58875)" (#59197)
This reverts commit dca6320fe4.
2020-06-10 13:49:35 -07:00
Jonah Williams dca6320fe4
[flutter_tools] inject output preferences at the top level (#58875)
The tool was setting the output preferences in a sub-context. Originally these were not injected before the arg parsers were created, though that was fixed by the lazy command creation. Once local engine is removed, the inner flutter_command Zone can be removed.
2020-06-10 12:13:06 -07:00
Jonah Williams e7b4d2b80e
[flutter_tools] remove globals from proxy validator (#59175)
Remove global Platfrom from proxy validator. move tests to new file, and update asserts to cover message contents.
2020-06-10 12:12:35 -07:00
Jonah Williams d911eadf95
[flutter_tools] create NotifyingLogger at the top level when running flutter run --machine or flutter attach --machine (#59087)
Removes dependency on injecting additional logger with zones
2020-06-09 15:39:27 -07:00
Jonah Williams 6067571fab
[flutter_tools] support flutter run -d edge (#56173)
Support Microsoft Edge as a device for flutter run when web is enabled. Currently this only works on Windows, and does not include a validator for edge.

Fixes #55322
2020-06-09 12:03:51 -07:00
Jonah Williams e54f8f523f
[flutter_tools] include dart-defines in cached kernel name (#59083)
This prevents using a cached kernel file with different defines, since --initialize-from-dill does not handle this correctly.

Fixes #58976
2020-06-09 12:03:28 -07:00
Christopher Fujino cf7e4a0b90
[flutter_tools] Fix slow ios_device_start_prebuilt_test (#59026) 2020-06-09 11:22:31 -07:00
Helin Shiah e62c1f6954
Send text error in JSON and print in tools (#59018) 2020-06-09 11:18:03 -07:00
Jonah Williams ec4049e781
[flutter_tools] support bundle-sksl-path on all desktop and mobile targets (#58879)
Adds support for --bundle-sksl-path to windows, linux, macOS, and iOS.

Fixes #53115
2020-06-09 11:15:52 -07:00
Jonah Williams 01e60a1ca4
[flutter_tools] Reland: use correct sdk path for analysis (#59081)
flutter analyze was unconditionally using the cached dart-sdk for analysis, and was not running with the built SDK during local engine. This broke when trying to update the analyzer for null safety, since it required us to wait for the dart change to roll into the framework first.
2020-06-09 10:47:21 -07:00
Jonah Williams 5e3e5a2a1a
Revert "[flutter_tools] use correct sdk path for analysis (#58871)" (#59035)
This reverts commit 9ed3e5bea6.
2020-06-08 17:38:23 -07:00
Jonah Williams 9ed3e5bea6
[flutter_tools] use correct sdk path for analysis (#58871)
flutter analyze was unconditionally using the cached dart-sdk for analysis, and was not running with the built SDK during local engine. This broke when trying to update the analyzer for null safety, since it required us to wait for the dart change to roll into the framework first.
2020-06-08 17:21:33 -07:00
Jenn Magder 5eb4917d73
Release cache lock for commands after required artifacts are downloaded (#59012) 2020-06-08 17:18:02 -07:00
Jenn Magder 023532d991
Revert "Build iOS apps using Swift Packages (#59009)" (#59025)
This reverts commit 43e28084fc.
2020-06-08 15:45:10 -07:00
Jenn Magder 43e28084fc
Build iOS apps using Swift Packages (#59009) 2020-06-08 13:53:01 -07:00
Jonah Williams 80ea454288
[flutter_tools] change service worker load to NOTICES (#58890)
update flutter_service_worker.js to NOTICES
2020-06-08 12:33:31 -07:00
Jonah Williams 0620cfa770
Revert "Send text error in JSON and print in tools (#58994)" (#59002)
This reverts commit f0174b176a.
2020-06-08 11:56:23 -07:00
Jenn Magder 886313393f
Support work profiles and multiple Android users for run, install, attach, drive (#58815) 2020-06-08 11:28:02 -07:00
Helin Shiah f0174b176a
Send text error in JSON and print in tools (#58994)
* Revert "Revert "Send text error in JSON and print in tools (#58284)" (#58872)"

This reverts commit c2d5e18cb2.

* Put streamListen in try/catch if extension events already listened for
2020-06-08 11:24:23 -07:00
Jonah Williams 70a88c3b83
[flutter_tools] fix capitalization in build commands (#58842) 2020-06-08 11:20:28 -07:00
Jonah Williams 4f88ed1d3c
[flutter_tools] only restrict devices based on arch + buildMode, not emulator status (#58887)
instead of restricting profile/release mode based on whether the tool thinks the device is an emulator, restrict based on the device target architecture and the requested build mode. Notably, this enables release mode on x86_64 Android emulators, but not x86 emulators since we do not support that as an AOT target.

This does not add release mode support for simulators, since this requires us to build and upload artifacts for simulator/x86_64
2020-06-08 11:20:15 -07:00
Jonah Williams 206ccc3632
[flutter_tools] rename library to be less absurd (#58891)
Instead of targets/dart.dart -> targets/common.dart
2020-06-08 11:19:53 -07:00
Jonah Williams 64538f4d78
[flutter_tools] disable dartdev when calling snapshots directly (#58830) 2020-06-06 14:48:03 -07:00
Jonah Williams c2d5e18cb2
Revert "Send text error in JSON and print in tools (#58284)" (#58872)
This reverts commit cce6b3c5ae.
2020-06-06 10:35:58 -07:00
Helin Shiah cce6b3c5ae
Send text error in JSON and print in tools (#58284)
* Send text error in JSON and print in tools

* Add test for error text

* Fix analysis issues

* Move streamListen to try/catch and use global.printStatus

* Extract print error fn and listen for events in web runner

* Add extension listen request to test

* Update packages/flutter_tools/lib/src/resident_runner.dart

Co-authored-by: Jonah Williams <jonahwilliams@google.com>

* Rename error parsing method

* Allow crash if listen for extension stream fails

* Add test for error and non-error extension events

* Fix formatting for TextTreeRenderer

* Use shorter message for second exceptions

* Specify types for map

* Add empty JSON for resident_web_runner test

* Move stream listen to vmservice and add vmservice test

* Fix stream type

* Move structured error log definition to vmservice

* Use correct test matcher isNot

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2020-06-05 19:07:37 -07:00
Jonah Williams 5722adf11d
[flutter_tools] remove deprecation warning on flutter format (#58817)
So that we have a release where both are available without a deprecation warning.
2020-06-05 12:40:02 -07:00
Jonah Williams 72f81f4167
remove unused completer (#58804) 2020-06-05 11:53:01 -07:00
Jonah Williams 1e4d9f8502
[flutter_tools] add --write-sksl-on-exit to flutter drive (#58743)
Allow dumping sksl files on driver exit when a file path is provided to drive's --write-sksl-on-exit
2020-06-05 11:01:23 -07:00
Jonah Williams d0abf7f90f
[flutter_tools] don't use verbose when in doctor or help command (#58798) 2020-06-05 10:12:11 -07:00
stuartmorgan 94b7ff241e
Don't require a specific Windows 10 SDK (#58713)
Current versions of the Windows desktop build files don't require a specific Windows 10 SDK version, but doctor still checks for one since vswhere doesn't allow for flexible queries. This has been a common source of issues for people setting up on Windows for the first time, because the current VS installer by default only includes a newer version of the SDK than what doctor is looking for.

This removes the vswhere SDK check, and instead uses a manual check for SDKs. Since this uses undocumented (although fairly widely used, so relatively unlikely to change) registry information, the check is non-fatal, so that builds can progress even if the SDK isn't found by doctor; in practice, it's very unlikely that someone would install the C++ Windows development workload but remove the selected-by-default SDK from the install.

Now that all requirements are default, the instructions when missing VS have been simplified so that they no longer list individual components, and instead just say to include default items.

Fixes #50487
2020-06-04 18:53:00 -07:00
Jonah Williams f5de6aadd4
[flutter_tools] remove zone level overrides of verbose and daemon logging (#57448)
Make it possible for all FlutterCommands to be global free, by moving instantiation to inside the Zone context. Additionally, provide VerboseLogger and NotifyLogger (daemon) at the top level and remove from command-specific overrides.

This allows removing a work around where web devices needed to look up directly from the context in non-test code.

Technically the output preferences are still zone injected, but these will be moved soon as they were not being used correctly by the top level command (the injection comes after ArgParser reads the overflow values, causing numerous wrap issues)
2020-06-04 16:35:36 -07:00
Jonah Williams 3b0c84b906
Revert "use Expand-Archive and Compress-Archive in windows os utils (#58390)" (#58719)
This reverts commit bbe18f7580.
2020-06-04 14:22:10 -07:00
Jonah Williams bbe18f7580
use Expand-Archive and Compress-Archive in windows os utils (#58390)
Work towards removal of package:archive and ideally more stable unzipping of artifacts. These commands are available in Powershell 5+, which we already require for windows.
2020-06-04 14:00:33 -07:00
Jonah Williams eae77804fe
[flutter_tools] use -f when fetching tags (#58703)
use -f to overwrite local tags on master branch
2020-06-04 13:54:32 -07:00
Jonah Williams abfb6cb7eb
[flutter_tools] unbreak g3 usage of installHook (#58711) 2020-06-04 13:36:21 -07:00
Jonah Williams 3bc4a82605
[flutter_tools] avoid serving files outside of expected paths (#58653) 2020-06-04 11:53:04 -07:00
Jonah Williams e934c2fc0a
[flutter_tools] reland: copy dill after startup (#58455)
* [flutter_tools] only copy cached dill after startup

* shared code

* cleanup artifact directory

* do not copy if dillOutputPath is given
2020-06-04 10:17:43 -07:00
Jonah Williams 8b5326a9cf
[flutter_tools] unbreak g3 roll (#58688) 2020-06-04 10:17:21 -07:00
Jonah Williams b1d75fc99d
[flutter_tools] add flag for sound-null-safety, unify with experiments (#58533)
Also combines experiments into extraGenSnapshot/ExtraFrontEndOptions. Allows providing --no-sound-null-safety to allow out of order migration and running.
2020-06-03 21:02:07 -07:00
JustWe 6c8d7b00ff
Show unsupported devices when no supported devices are connected (#56531) 2020-06-03 16:14:38 -07:00
Jonah Williams 0734db62ca
[flutter_tools] remove handling of error that is fixed (#58557)
The linked error has been fixed, removed work around. Updates the test cases to only test for exit instead of error message

#33050
2020-06-03 13:27:47 -07:00
Jonah Williams 7e942b6229
[flutter_tools] iOS VM Service logs should include stderr (#58551) 2020-06-03 12:53:02 -07:00
Jenn Magder e72e7f9fb0
Don't elapse real time during IOSDevice.startApp tests (#58538) (#58622) 2020-06-03 12:43:02 -07:00
Jonah Williams e216eec7b4
[flutter_tools] Allow the tool to suppress compilation errors. (#58539)
Suppress compilation errors on startup so they are not duplicated from the native build step.
2020-06-03 12:00:03 -07:00
Jenn Magder 37bc900860
Revert "Don't elapse real time during IOSDevice.startApp tests (#58538)" (#58618)
This reverts commit 27186c784f.
2020-06-03 11:26:29 -07:00
Jenn Magder 27186c784f
Don't elapse real time during IOSDevice.startApp tests (#58538) 2020-06-03 09:33:02 -07:00
Jonah Williams 01b9bf8ea6
[flutter_tools] deprecate flutter generate and codegen (#58328) 2020-06-03 09:28:02 -07:00
Jenn Magder 2ece1c3a17
Revert "Build iOS apps using Swift Packages (#58522)" (#58549)
This reverts commit 2054f37aaf.
2020-06-02 19:00:12 -07:00
Jenn Magder 2054f37aaf
Build iOS apps using Swift Packages (#58522) 2020-06-02 17:57:11 -07:00
Jonah Williams 37a86c483c
Revert "[flutter_tools] Put a heap size limit on the frontend_server" (#58525)
* Revert "[flutter_tools] Put a heap size limit on the frontend_server (#58039)"
2020-06-02 17:52:20 -07:00
Jonah Williams 6135091de9
Revert "[flutter_tools] only copy cached dill after startup (#58188)" (#58454)
This reverts commit 39d1e4b7e9.
2020-06-01 17:17:03 -07:00
Jonah Williams 39d1e4b7e9
[flutter_tools] only copy cached dill after startup (#58188)
Remove copying from the shutdown stage since that seems risky. If the tool copies the first compilation there will still be a decent dill for initialization.
2020-06-01 16:31:27 -07:00
Jonah Williams 4845df906a
[flutter_tools] do not include material icon incorrectly (#58335)
If a dependency specified uses-material-design: true and the main pubspec specifies uses-material-design: false, then the MaterialIcons font would be included in the font manifest, but not in the AssetManifest or final bundle. Remove it from the FontManifest if this occurs
2020-06-01 16:30:43 -07:00
Jonah Williams 584e4f2534
[flutter_tools] cleanup to devfs Operations (#58332)
removes globals from devFS operations and cleans up testing to be context free. Removes unused and unnecessarily temp directory in testing.
2020-06-01 15:28:38 -07:00
Jenn Magder f4d26a3b85
Change iOS device discovery from polling to long-running observation (#58137) 2020-06-01 12:33:01 -07:00
Ekaterina Gerasimova 3115c14e43
Fix typo in error message in flutter doctor (#58421) 2020-06-01 11:23:02 -07:00
stuartmorgan a3b9e20a6b
Fix non-local-engine Linux release builds (#58372) 2020-06-01 11:03:02 -07:00
Jenn Magder b0c98b6651
Detect USB/network interface from iOS devices (#58257) 2020-05-29 15:50:23 -07:00
Jonah Williams 6d8ec35014
Revert "Revert "[flutter_tools] always initialize the resident runner from di…" (#58208) 2020-05-29 15:43:03 -07:00
Marcus Tomlinson 5ee5490a63
[flutter_tools] Support profile and release builds on Linux (#57135) 2020-05-29 15:38:02 -07:00
Jonah Williams d9144bf8fc
[flutter_tools] rename output LICENSE file to NOTICES and support loading either (#57871)
Work towards #16723

This is only safe to land after #58131 lands in google3. Only build NOTICES in asset manfiest, and load either LICENSE or NOTICES from pubspec dependencies.
2020-05-29 11:55:02 -07:00
Jonah Williams a1636b6fef
Revert "[flutter_tools] always initialize the resident runner from dill (#52497)" (#58193) 2020-05-28 16:28:02 -07:00
stuartmorgan 9989c54cb1
Add release and profile support for Windows (#57749)
Builds and bundles an 'app.so' containing AOT data, and downloads and packages the release/profile artifacts for those builds, rather than always using the debug artifacts.

Fixes https://github.com/flutter/flutter/issues/38477
Fixes https://github.com/flutter/flutter/issues/39664
2020-05-28 12:17:56 -07:00
Jonah Williams 7cdf26d0dc
[flutter_tools] forward flutter format to dart format and deprecate (#57829) 2020-05-28 11:28:08 -07:00
Jim Graham 3373a4042a
print checksum differences when detected by --verify-only (#58064) 2020-05-27 10:31:15 -07:00
Zachary Anderson 29736f6fea
[flutter_tools] Put a heap size limit on the frontend_server (#58039) 2020-05-27 10:12:24 -07:00
Jonah Williams 8432204194
[flutter_tools] throw if asked to build release for x86_64 (#57874) 2020-05-27 10:11:15 -07:00
Jonah Williams a926715dac
[flutter_tools] URI encode dart-define values (#57873) 2020-05-27 10:11:04 -07:00
Jonah Williams ba847d54f0
[flutter_tools] validate android arch and build number (#57830) 2020-05-27 10:10:51 -07:00
Jonah Williams 600338286f
[flutter_tools] add vm service method to pull SkSL (#57813) 2020-05-27 10:10:41 -07:00
Jonah Williams f640ad6914
[flutter_tools] ensure emulator command does not crash with missing avdmanager (#57703) 2020-05-27 10:10:30 -07:00
Jonah Williams ffc56ff735
[flutter_tools] hide all development tools (#57690) 2020-05-27 10:10:19 -07:00
Neevash Ramdial 428ce0815b
[flutter_tools] Support latest IntelliJ via Jetbrain toolbox (#57963) 2020-05-27 10:07:28 -07:00
James D. Lin c6f7792311
[flutter tools] Improve messages when we fail to connect to the Observatory (#57355) 2020-05-21 17:47:02 -07:00
Jonah Williams 359daf4f73
[flutter_tools] reland: remove globals from android device/testing (#57614) 2020-05-20 13:21:22 -07:00
Jenn Magder adead099a6
Always show diagnostics (#57532) 2020-05-19 18:17:03 -07:00
Jonah Williams b70e7a9b65
[flutter_tools] fix incorrect comment on web runner (#57450) 2020-05-19 18:07:04 -07:00
Jonah Williams 5e33ecee46
Revert "[flutter_tools] remove globals/context for android testing (#57445)" (#57611)
This reverts commit 602d8baf34.
2020-05-19 13:06:14 -07:00
Jonah Williams 602d8baf34
[flutter_tools] remove globals/context for android testing (#57445) 2020-05-19 12:37:07 -07:00
Jonah Williams d0d9da832b
[flutter_tools] prevent wildcard assets from causing build invalidation issues (#56472) 2020-05-19 12:37:04 -07:00
Jonah Williams 91ec439348
[flutter_tools] handle missing null check in manifest parser (#57400) 2020-05-18 12:47:29 -07:00
Jonah Williams 70b889a9a3
[flutter_tools] reland: integrate l10n tool into hot reload/restart/build (#57510)
Reland: #56167
2020-05-18 12:47:18 -07:00
Jonah Williams 27a6705aa4
[flutter_tools] chunk the hashing of large files (#57506)
For files larger than 250 KB (roughly the size of framework.dart), chunk the conversion. This may be important for large assets like images.
2020-05-18 12:45:20 -07:00
Jonah Williams 8e765c7f6a
[flutter_tools] put system clock on globals (#57447) 2020-05-18 09:56:22 -07:00
Jonah Williams 49ad67ccf0
[flutter_tools] minor cleanups to try catch (#57446)
- OsError now implements exception, remove workaround.
- Prefer is check to catching TypeError
2020-05-18 09:38:22 -07:00
stuartmorgan 30d405c794
Temporarily allow pluginClass: none on desktop (#57498)
Treats 'pluginClass: none' as equivalent to having no 'pluginClass'
entry on the desktop platforms, to satisy stable channel plugin
validation of Dart-only desktop plugin implementations. See
issue for full details.

Part of https://github.com/flutter/flutter/issues/57497
2020-05-18 09:26:37 -07:00
Tianguang 5a3104b36a
Update flutter_gallery_assets to ^0.2.0 (#57328)
* Bump flutter_gallery_assets version to ^0.2.0.

* Run `flutter update-packages --force-upgrade`.

* Add comment.

* Remove duplicate key.
2020-05-18 18:26:18 +02:00
stuartmorgan 25e9d0494b
Add Linux GTK artifacts to unpack list (#57452)
To simplify development of the in-progress GTK embedding, which will
replace the GLFW embedding on Linux, add the GTK artifacts to the unpack
list. This means that until the transition, both the GLFW and GTK
artifacts will be unpacked.

Part of #54860
2020-05-18 09:26:07 -07:00
stuartmorgan f991308e3e
Fix CMake invocation for 3.10 compat (#57415)
The -S/-B format of specifying source and build directories wasn't added
until 3.13. For 3.10 compatibility, use the older form of having the
working directory as the build directory, and the last argument as the
source directory.

Fixes #57409
2020-05-18 09:25:28 -07:00
Jonah Williams b19b744bb7
[flutter_tools] check for Runner.sln when parsing for plugins (#57392)
Throw a toolExit if the windows plugin logic runs on an invalid windows project. Update the supported project check to validate the existence of a Runner.sln file
2020-05-18 09:24:51 -07:00
Jim Graham 5c78e723fb
Protect the deletion of the local engine temp dir in case it is already deleted (#57345) 2020-05-18 02:37:03 -07:00
stuartmorgan 8abf0a6d8c
Switch to CMake for Linux desktop (#57238)
Updates the Linux templates to use CMake+ninja, rather than Make, and updates the tooling to generate CMake support files rather than Make support files, and to drive the build using cmake and ninja.

Also updates doctor to check for cmake and ninja in place of make.

Note: While we could use CMake+Make rather than CMake+ninja, in testing ninja handled the tool_backend.sh call much better, calling it only once rather than once per dependent target. While it does add another dependency that people are less likely to already have, it's widely available in package managers, as well as being available as a direct download. Longer term, we could potentially switch from ninja to Make if it's an issue.

Fixes #52751
2020-05-16 15:07:34 -07:00
Jonah Williams 631087d83b
[flutter_tools] cache-bust in service worker (#56786) 2020-05-16 14:57:04 -07:00
Jonah Williams afdc440840
[flutter_tools] surface missing assets originating package (#55701) 2020-05-16 14:52:04 -07:00
Jesse 2da08f4c10
Fix typo in 'flutter create --list-samples' help (#57005) 2020-05-14 14:37:03 -07:00
Zachary Anderson 533cd7a6d1
[flutter_tools] Delete system temp entries on fatal signals (#55513) 2020-05-14 14:27:02 -07:00
Jonah Williams bd47262183
[flutter_tools] fix period in URL for androidX incompat (#57182) 2020-05-14 12:32:03 -07:00
Jonah Williams a801496701
[flutter_tools] allow adb to fail to unforward without crashing (#57173) 2020-05-14 12:27:01 -07:00