Skip to content

[flutter_tools] remove all globals from cache and cache_test#69505

Merged
jonahwilliams merged 4 commits intoflutter:masterfrom
jonahwilliams:android_sdk_globals
Nov 6, 2020
Merged

[flutter_tools] remove all globals from cache and cache_test#69505
jonahwilliams merged 4 commits intoflutter:masterfrom
jonahwilliams:android_sdk_globals

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Oct 31, 2020

Description

Removes globals from cache and cache_test (except for gradle dependency downloader).

Most of this change is plumbing for platform, filesystem. To avoid tons of boilerplate for the update/updateInner functions, I've changed these to pass in the interfaces (similar to how ArtifactUpdater was used).

This also allowed a few of the static cache members to become instance members, which will eventually allow removing the inconsistent and confusing use of locking in command tests.

I did disable two tests which required creating real lockfiles in the Cache, since this is not implemented in the memory filesystem. While the unit test coverage is nice here, the locking functionality is indirectly covered in almost every flutter devicelab test and integration test, so I'm not really concerned about regressions.

@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Oct 31, 2020
@google-cla google-cla bot added the cla: yes label Oct 31, 2020
@jonahwilliams jonahwilliams marked this pull request as ready for review November 4, 2020 17:48
@jonahwilliams
Copy link
Contributor Author

frob failures are due to the flutterRoot change which has already landed

@jonahwilliams
Copy link
Contributor Author

I'm going to try to sync and re-run just to be sure

@jonahwilliams
Copy link
Contributor Author

Fixed the remaining google3 issues

@jonahwilliams jonahwilliams merged commit 2fb53d8 into flutter:master Nov 6, 2020
@jonahwilliams jonahwilliams deleted the android_sdk_globals branch November 6, 2020 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants