[flutter_tools] remove all globals from cache and cache_test#69505
Merged
jonahwilliams merged 4 commits intoflutter:masterfrom Nov 6, 2020
Merged
[flutter_tools] remove all globals from cache and cache_test#69505jonahwilliams merged 4 commits intoflutter:masterfrom
jonahwilliams merged 4 commits intoflutter:masterfrom
Conversation
zanderso
approved these changes
Nov 5, 2020
Contributor
Author
|
frob failures are due to the flutterRoot change which has already landed |
Contributor
Author
|
I'm going to try to sync and re-run just to be sure |
Contributor
Author
|
Fixed the remaining google3 issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
staticcache 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.