Closed mickmister closed 2 years ago
@hanzei This PR is actually currently a draft. I'm not sure how to implement this correctly. I would like to cache any artifacts that Go uses to make subsequent runs of go run
quicker, just like how the server can quickly restart locally. This is crucial to make the resume of the workspace near-instant. This would make it so a developer can see the running application within seconds of the workspace being created from a workspace prebuild.
Depending on where the cached artifacts are stored, they may not be persisted in the workspace during the initial build. I'm still trying to figure this out.
The goal of this PR is to make it so
make run-server
runs very quickly on the second run of the command. This way the server starts up very quickly on workspace resume. This will be particularly useful when using prebuilds. I'm not entirely sure whatgo
commands are the most appropriate here.