Commit graph

63 commits

Author SHA1 Message Date
Jonah Williams 302e992ca7
[flutter_tools] throw a tool exit if pub cannot be run (#83293) 2021-05-24 14:34:02 -07:00
Alexandre Ardhuin df3662b15e
use throwsA (#82238) 2021-05-11 10:19:01 -07:00
Phil Quitslund 61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Jenn Magder 8d5f08fe02
Migrate pub in flutter_tools to null safety (#80548) 2021-04-16 17:23:00 -07:00
Jenn Magder 56c0002c47
Adopt FakeProcessManager.empty (#80480) 2021-04-15 14:19:02 -07:00
Jenn Magder e11a1a83af
Remove mocks from fucshia_pm_test, reduce createMockProcess usage (#80321) 2021-04-13 13:53:18 -07:00
Sam Rawlins 68492c5b69
Remove "unnecessary" imports. (#78664) 2021-04-06 11:19:02 -07:00
Jenn Magder d018c24bb8
MockProcessUtils->FakeProcessManager in version_test (#77985) 2021-03-12 16:38:04 -08:00
Jonah Williams d65c98b4a2
[flutter_tools] replace some mock file/directories with new op handle (#76268) 2021-02-17 21:26:03 -08:00
Jonah Williams 021311ed8a
Revert "[flutter_tools] move process manager into tool (#75350)" (#75639)
This reverts commit 8b6baae44c.
2021-02-08 09:21:46 -08:00
Jonah Williams 8b6baae44c
[flutter_tools] move process manager into tool (#75350)
Our current top crasher is an unclear error when ProcessManager fails to resolve an executable path. To fix this, we'd like to being adjusting the process resolution logic and adding more instrumentation to track failures. In order to begin the process, the ProcessManager has been folded back into the flutter tool
2021-02-04 13:19:11 -08:00
Jenn Magder 6ecb8cbcfa
Replace MockUsage with TestUsage (#74946) 2021-01-28 18:49:04 -08:00
Jonah Williams 74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams fb28ee2860
[flutter_tools] reland: cache pub invocations (#70180)
Disabled caching of pub invocations on flutter drive.
2020-11-10 13:56:36 -08:00
Jonah Williams 1c4b50ecf1
Revert "[flutter_tools] restore pub caching functionality (#70133)" (#70144)
This reverts commit ff953e4f83.
2020-11-09 16:38:07 -08:00
Jonah Williams ff953e4f83
[flutter_tools] restore pub caching functionality (#70133)
Necessary to work around #70013 (this looks like it will be fixed, but should protect us in the future)

Restores some notion of skipping pub, with differences from the prior implementation:

Off by default, and only used by the flutter command automatic pub get
A single check parameter. Uses the framework version cached per-project instead of a timestamp of the tool, to avoid cases where downloading a prebuilt framework would cause this check to no longer work.
2020-11-09 16:11:55 -08:00
Jonah Williams f1cdf2e6f3
Revert "[flutter_tools] restore pub caching functionality on run/test (#70056)" (#70132)
This reverts commit 6e5845f025.
2020-11-09 13:31:01 -08:00
Jonah Williams 6e5845f025
[flutter_tools] restore pub caching functionality on run/test (#70056) 2020-11-09 12:52:22 -08:00
Jonah Williams cb67513f29
[flutter_tools] Reland: simplify pub cache logic (#67589)
There have been some more additional reports of a missing 'package:characters' import after upgrading flutter. This has me concerned that our pub caching logic is incorrect. Instead of the tool attempting to guess when pub should be run, always delegate to pub.

Also takes an opportunity to fix the kernel snapshot depending on the .packages or package_config. Due to the generated: date field this causes extra rebuilds. Instead when pub get is run, write out an additional file with just the package contents and version.

Fixes #66777
Fixes #65723
2020-10-23 10:00:56 -07:00
Jonah Williams a4e0e2a8ee
Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572)
This reverts commit 76cbc462d2.
2020-10-07 15:30:46 -07:00
Jonah Williams 76cbc462d2
[flutter_tools] remove all pub caching logic (#66776)
There have been some more additional reports of a missing 'package:characters' import after upgrading flutter, as well as problems with detecting the correct language version. This has me concerned that our pub caching logic is incorrect. Instead of the tool attempting to guess when pub should be run, always delegate to pub.
2020-10-07 13:11:07 -07:00
Jonah Williams 13bf341584
[flutter_tools] update build rules to depend on subset of package_config contents (#67165)
Split from #66776

Even if pub does not change the packge_config contents, it will still update a timestamp in one of the fields. This causes unnecessary rebuilds. To fix this, generate an additional file when running pub get that only contains the relevant fields and then update the KernelSnapshot rule to depend on it only.
2020-10-07 08:46:11 -07:00
Michael R Fairhurst 7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -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 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
Jonah Williams 8a77381e58
[flutter_tools] do not set timestamp of package_config file (#57077) 2020-05-14 11:12:08 -07:00
Zachary Anderson 6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Jonah Williams 8df0d68633
[flutter_tools] remove globals from pub (#55412) 2020-04-22 16:34:12 -07:00
Jenn Magder f6a55125d2
Add usage event for failed iOS project migration (#51879) 2020-03-06 12:14:29 -08:00
Zachary Anderson 6c408a0567
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#52021)
* Reland: [flutter_tool] Where possible, catch only subtypes of Exception

* Add armv7f to getIOSArchForName
2020-03-06 10:22:12 -08:00
Alexandre Ardhuin c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
Jenn Magder cbbb7ec5a7
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774)" (#51960)
This reverts commit 57c6721cd5.
2020-03-04 12:40:15 -08:00
Flutter GitHub Bot 57c6721cd5
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51774) 2020-03-04 11:41:02 -08:00
Zachary Anderson b32ee2f15c
Revert "Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567)" (#51616)
This reverts commit 9de7787f25.
2020-02-27 22:57:13 -08:00
Zachary Anderson 9de7787f25
Reland: [flutter_tool] Where possible, catch only subtypes of Exception (#51567) 2020-02-27 22:46:23 -08:00
Zachary Anderson 483f49962c
Revert "[flutter_tool] Where possible, catch only subtypes of Exception (#51440)" (#51539)
This reverts commit f1cd47ef5c.
2020-02-26 23:42:19 -08:00
Zachary Anderson f1cd47ef5c
[flutter_tool] Where possible, catch only subtypes of Exception (#51440) 2020-02-26 21:45:02 -08:00
Zachary Anderson b9ecebf101
Reland: [flutter_tools] Disable analytics for more bots (#50641) 2020-02-12 10:58:02 -08:00
Zachary Anderson 1903ce012e
Revert "[flutter_tools] Disable analytics for more bots (#50579)" (#50622)
This reverts commit 0a38f29c0d.
2020-02-11 22:47:41 -08:00
Zachary Anderson 0a38f29c0d
[flutter_tools] Disable analytics for more bots (#50579) 2020-02-11 15:48:02 -08:00
Dan Field 8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Anthony b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Alexandre Ardhuin 003541499b use isA<Xxx>() matcher (#48482) 2020-01-16 12:43:03 -08:00
Zachary Anderson 23a3d1014f
[flutter_tool] Make BotDetector context free (#48605) 2020-01-13 10:12:06 -08:00
Jonah Williams ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable (#47398) 2020-01-06 11:04:20 -08:00
Dan Field d7c347f027 make pub get test shufflable (#48095) 2020-01-03 08:13:03 -08:00
Ian Hickson 449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Alexandre Ardhuin 980f14e0c5
implicit-casts:false on flutter_tools (#45153)
* implicit-casts:false on flutter_tools

* use castStringKeyedMap

* address review comments

* address review comments

* fix issues after rebase
2019-11-24 06:54:43 +01:00
Jonah Williams a192e29603
check for instanceof instead of runtimeType and wait for testbed (#43870) 2019-10-31 19:31:42 -07:00
Jonah Williams 4c677e4148
Extra defensive programming for pub modification time assert (#43315) 2019-10-22 22:05:00 -07:00