-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] delete old directories when unzipping ontop of them #74818
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
Conversation
|
oof, that doesn't work |
|
Right, because we have some shared directories.... |
|
now I think it is working... |
| _ensureExists(location); | ||
|
|
||
| try { | ||
| print(tempFile.path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray print
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
covers some additional cases that might be useful here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…lutter#74818) Fixes flutter#74772 stale files from previous SDKs were getting left in the cache, confusing the analyzer.
…#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]>
Fixes #74772
stale files from previous SDKs were getting left in the cache, confusing the analyzer.