Go 1.10 with build and test caching, running Windows and Linux Docker containers side-by-side with LCOW.
It’s been 6 months again since 1.9 was released, so as scheduled we’ve now got Go 1.10. The big headlining feature of this release is probably the build and test caching. While similar in name, these two do slightly different things so let’s have a quick look at them.
Build caching means that
go build has a cache of recently built packages, and checks when you run
go build if these packages have been updated or if it can pull them from its cache. This even applies to packages that aren’t installed locally, and because of that
go install will no longer install dependencies for the packages you install.
Personally though, I’m more interested in the test caching. What this does is that it checks code changes between runs of
go test and only runs tests that may have been impacted. Everything else, provided it passed originally, will get the same result shown and a mark of (cached) instead of the time it took to run.
The result of this is that if you have a big project, running all the tests shouldn’t have a performance penalty anymore1 as only what you changed will be run. As a side effect, I suspect this means you can clearly see what parts of the code are affected by your changes.
Of course, these are far from the only changes and a comprehensive list of everything new and improved can be found in the release notes.
Docker for Windows LCOW
A couple weeks ago I mentioned that Docker for Windows2 has support for Kubernetes, but it turns out there is another big feature coming. While still marked as experimental Docker will be able to run Linux containers through LCOW3.
Up until now, you had to choose one of 3 modes for your containers on Windows: Windows, Linux, or LCOW. As you can expect from the name, LCOW was already aimed at running Linux which means there were two options for that. The big difference between the two is that Linux mode uses a VM while LCOW uses LinuxKit similar to how it works on the Mac.
What has changed now is that LCOW is built into the Windows mode. This means that you can run your containers in a single mode, regardless of whether they’re Windows or Linux4. This is a big usability win for Windows containers and the people using them. Right now the VM Linux mode will still be available due to the experimental nature of LCOW, but as soon as that’s deemed stable the Linux mode will disappear and there will just be a single way of running your containers on Windows.
Read more like this:
- Week 43, 2019 - CloudWatch Anomaly Detection; Some AWS Container Updates
- Week 26, 2019 - AWS App Mesh and Cloud Map; IAM Access Advisor; Azure Bastion
- Week 16, 2019 - Black Hole Photo; Google's Anthos and Cloud Run
- Week 13, 2019 - Kubernetes 1.14; EKS Supports 1.12; Istio 1.1; AWS App Mesh
- Week 44, 2018 - AWS Minor Feature Love for Databases; Containers; and Lambda
Or always get the latest by subscribing through RSS, Twitter, or email!