Commit graph

2481 commits

Author SHA1 Message Date
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
David Iglesias 8fce4ce974
[flutter_tools] Add web support through MethodChannels. (#60116) 2020-06-23 13:53:01 -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 e34c591252
[flutter_tools] fix root directory tests (#60060)
* fix test compiler test
* fix project test
* fix flutter_platform_test
* fix cocoapods test
2020-06-23 11:14:38 -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
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 09f1764d14
[flutter_tools] android test cleanups (#59996)
Fixes several tests that were failing under tester. Minor style cleanups otherwise
2020-06-22 17:04:39 -07:00
Jonah Williams a734693ff5
[flutter_tools] cleanup iOS test (#59999)
The test needs to look up HOME, but one wasn't provided. This would end up using the real home directory, crashing on windows
2020-06-22 17:04:17 -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
Jonah Williams 2cd205bb5a
[flutter_tools] cleanup fuchsia tests (#59997)
Cleanup fuchsia tests that failed under tester.
2020-06-22 16:47:28 -07:00
Anna Gringauze aac836c6ad
Enabled expression evaluation by default (#59826) 2020-06-19 15:23:03 -07:00