[flutter_tools] only copy cached dill after startup#58188
Conversation
| return 1; | ||
| } | ||
| device.generator.accept(); | ||
| globals.logger.printTrace('caching compiled dill...'); |
There was a problem hiding this comment.
Instead of duplicated here and in the hot runner, can this be inherited by both from the base class?
| trackWidgetCreation: trackWidgetCreation, | ||
| )); | ||
| } | ||
| artifactDirectory.deleteSync(recursive: true); |
There was a problem hiding this comment.
Didn't this deletion pre-exist the cache.dill optimization? Why is it no longer needed?
There was a problem hiding this comment.
since it is a temp dir it gets cleaned up automatically right? Or should we still clean it out manually?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Makes sense, will add it back
This reverts commit 39d1e4b.
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)