Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[flutter_tools] only copy cached dill after startup#58188

Merged
jonahwilliams merged 3 commits into
flutter:masterfrom
jonahwilliams:copy_after_startup
Jun 1, 2020
Merged

[flutter_tools] only copy cached dill after startup#58188
jonahwilliams merged 3 commits into
flutter:masterfrom
jonahwilliams:copy_after_startup

Conversation

@jonahwilliams

Copy link
Copy Markdown
Contributor

Description

remove copying from the shutdown stage since that seems risky (and Android Studio behavior is unlikely to change). If we copy the first compilation we'll still get a decent dill for initialization.

Fixes #58109 (indirectly)

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 28, 2020
@jonahwilliams jonahwilliams requested review from aam and zanderso May 28, 2020 20:09
return 1;
}
device.generator.accept();
globals.logger.printTrace('caching compiled dill...');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of duplicated here and in the hot runner, can this be inherited by both from the base class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

trackWidgetCreation: trackWidgetCreation,
));
}
artifactDirectory.deleteSync(recursive: true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Didn't this deletion pre-exist the cache.dill optimization? Why is it no longer needed?

@jonahwilliams jonahwilliams Jun 1, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

since it is a temp dir it gets cleaned up automatically right? Or should we still clean it out manually?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer still making an effort to do manual clean-up. The automatic cleanup doesn't work in all situations, for example if the tool is killed by a signal on Windows after preExit() runs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, will add it back

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

Ensure that frontend_server has successfully exited before copying cached.dill

5 participants