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

Remove ephemeral directories during flutter clean #37966

Merged
merged 1 commit into from
Aug 10, 2019

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Aug 9, 2019

Description

Remove ephemeral directories used by modules during flutter clean

Related Issues

Fixes #37909.

Tests

Updated "removes build and .dart_tool and ephemeral directories"

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@jmagman jmagman requested a review from jonahwilliams August 9, 2019 21:09
@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 9, 2019
@jmagman jmagman self-assigned this Aug 9, 2019
@jmagman jmagman added a: existing-apps Integration with existing apps via the add-to-app flow and removed cla: yes labels Aug 9, 2019
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Aug 9, 2019

Codecov Report

Merging #37966 into master will increase coverage by 1.3%.
The diff coverage is 91.42%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #37966     +/-   ##
=========================================
+ Coverage   54.74%   56.05%   +1.3%     
=========================================
  Files         194      194             
  Lines       18170    18169      -1     
=========================================
+ Hits         9948    10185    +237     
+ Misses       8222     7984    -238
Flag Coverage Δ
#flutter_tool 56.05% <91.42%> (+1.3%) ⬆️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/commands/clean.dart 95.23% <100%> (+17.96%) ⬆️
packages/flutter_tools/lib/src/project.dart 81.87% <86.36%> (ø) ⬆️
...kages/flutter_tools/lib/src/commands/precache.dart 50% <0%> (-41.67%) ⬇️
packages/flutter_tools/lib/src/version.dart 90.73% <0%> (-1.96%) ⬇️
packages/flutter_tools/lib/src/device.dart 55.42% <0%> (-1.81%) ⬇️
packages/flutter_tools/lib/src/cache.dart 41.74% <0%> (-0.98%) ⬇️
...utter_tools/lib/src/build_system/build_system.dart 93.01% <0%> (+0.53%) ⬆️
packages/flutter_tools/lib/src/base/process.dart 80.46% <0%> (+0.78%) ⬆️
packages/flutter_tools/lib/src/base/os.dart 29.83% <0%> (+1.61%) ⬆️
packages/flutter_tools/lib/src/template.dart 96.66% <0%> (+1.66%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3dbefd...143fec5. Read the comment docs.

@jmagman jmagman merged commit 0a58610 into flutter:master Aug 10, 2019
@jmagman jmagman deleted the clean-ephem branch August 10, 2019 00:26
void _deleteFile(FileSystemEntity file) {
final String path = file.path;
printStatus("Deleting '$path${fs.path.separator}'.");
if (file.existsSync()) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: flip the sense of the if and un-indent, like:

if (!file.existsSync()) {
  return;
}
try {
  ...
}
...

you might also move the printStatus() after checking that the object exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow 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 clean should remove platform ephemeral directories
6 participants