Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

Fixes #74772

stale files from previous SDKs were getting left in the cache, confusing the analyzer.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 27, 2021
@google-cla google-cla bot added the cla: yes label Jan 27, 2021
@jonahwilliams jonahwilliams requested review from zanderso and removed request for zanderso January 27, 2021 16:58
@jonahwilliams
Copy link
Contributor Author

oof, that doesn't work

@jonahwilliams
Copy link
Contributor Author

Right, because we have some shared directories....

@jonahwilliams
Copy link
Contributor Author

now I think it is working...

_ensureExists(location);

try {
print(tempFile.path);
Copy link
Member

Choose a reason for hiding this comment

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

stray print

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

tempFile.fileSystem.path.basenameWithoutExtension(tempFile.path)
);
if (destination.existsSync()) {
destination.deleteSync(recursive: true);
Copy link
Member

Choose a reason for hiding this comment

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

What should/will happen if this throws an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, I'm not really sure. I don't know if - say there was a missing permission, would the unzip fail anyway? I can rethrow a tool exit to start?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, the ones we care about should go to error handling io, for the others we can let it crash.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like deleteSync is already covered by the ErrorHandlingFileSystem. Additionally it looks like this:

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/error_handling_io.dart#L74

covers some additional cases that might be useful here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jonahwilliams jonahwilliams merged commit 91437a0 into flutter:master Jan 27, 2021
@jonahwilliams jonahwilliams deleted the delete_zips branch January 27, 2021 20:56
christopherfujino pushed a commit to chris-forks/flutter that referenced this pull request Feb 3, 2021
…lutter#74818)

Fixes flutter#74772

stale files from previous SDKs were getting left in the cache, confusing the analyzer.
christopherfujino added a commit that referenced this pull request Feb 3, 2021
…#75303)

* Only show devtools deep links for render overflow errors (#74916)

* Add fixes for nullOk changes (#74866)

* [flutter_tools] delete old directories when unzipping ontop of them (#74818)

Fixes #74772

stale files from previous SDKs were getting left in the cache, confusing the analyzer.

* Make flutter create --smaple null-safe (#74844)

* Suppress 'Info: Compiling without sound null safety' message when building flutter_tools (#74740)

The CFE now logs to stdout by default when compiling a program which has
non-null-safe dependencies. Since flutter_tools has not yet migrated, we
need to suppress this message when compiling the tool.

Fixes #74366

* Split tools_tests subshards into separate shards to support sub-sub-sharding (#75033)

* Adopt tool_test shard builders (#75171)

* Adopt subshard naming convention in build_tests (#75179)

* Mark tool_integration_tests not flaky (#75273)

* roll flutter/plugins to ToT to fix analysis error

* update engine hash

Co-authored-by: Kenzie Schmoll <[email protected]>
Co-authored-by: Kate Lovett <[email protected]>
Co-authored-by: Jonah Williams <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Ben Konyi <[email protected]>
Co-authored-by: Jenn Magder <[email protected]>
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.

flutter_tool doesn't clean up old artifacts

2 participants