这是indexloc提供的服务,不要输入任何密码
Skip to content

[flutter_tools] only copy cached dill after startup #58188

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

Merged
merged 3 commits into from
Jun 1, 2020

Conversation

jonahwilliams
Copy link
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 zanderso and aam May 28, 2020 20:09
@@ -434,6 +435,15 @@ class _ResidentWebRunner extends ResidentWebRunner {
return 1;
}
device.generator.accept();
globals.logger.printTrace('caching compiled dill...');
Copy link
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
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
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?

Copy link
Contributor Author

@jonahwilliams jonahwilliams Jun 1, 2020

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
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
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
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