Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify engineDirs and toolsDir in Cache of Flutter Tools. #7644

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

goderbauer
Copy link
Member

The zip files downloaded from cloud storage are not clearly separated into engine artifacts and tools anyways.

Also, because of this unclear separation, we were downloading linux-x64/artifacts.zip twice before.

@abarth
Copy link
Contributor

abarth commented Jan 25, 2017

/cc @tvolkert

Test?

@Hixie
Copy link
Contributor

Hixie commented Jan 25, 2017

The real fix here is to only download the files we need when we need them. See #6491

'android-arm',
'android-arm-profile',
'android-arm-release',
'android-x64',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to android-x64 and android-x86?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

];

List<List<String>> get _iosBinaryDirs => <List<String>>[
<String>['ios', 'android-arm/artifacts.zip'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not android

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

List<List<String>> get _iosBinaryDirs => <List<String>>[
<String>['ios', 'android-arm/artifacts.zip'],
<String>['ios-profile', 'ios-profile/artifacts.zip'],
<String>['ios-release', 'os-release/artifacts.zip'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ios

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

List<List<String>> get _osxToolsDirs => <List<String>>[
List<List<String>> get _osxBinaryDirs => <List<String>>[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the cache directory basename is repeated in the artifact portion of every one of these entries, we should strip it from the artifact portion and just update download() accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the change. However, I don't really like it. It makes the download logic more complicated for very little benefit.

Maybe I misunderstood what you meant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice there were cases with subfolders in the cache dir, which makes the login in download() less clear than I had envisioned...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

@goderbauer goderbauer force-pushed the fixDownload branch 2 times, most recently from 422959e to 43a6cc5 Compare January 26, 2017 00:05
The zip files downloaded from cloud storage are not clearly separated
into engine artifacts and tools anyways.

Also, because of this unclear separation, we were downloading
`linux-x64/artifacts.zip` twice before.
@goderbauer
Copy link
Member Author

Re:Test - To properly test this, a new abstraction for the downloader would be required. I think that's outside the scope of the PR.

@tvolkert
Copy link
Contributor

LGTM

@goderbauer goderbauer merged commit f3f2747 into flutter:master Jan 26, 2017
@goderbauer goderbauer deleted the fixDownload branch February 24, 2017 01:43
@goderbauer goderbauer added the platform-windows Building on or for Windows specifically label Oct 17, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-windows Building on or for Windows specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants