From 28e1f9b7b0bf17f880292ce8b0b7725ff521785a Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Fri, 9 Feb 2024 12:19:02 -0800 Subject: [PATCH] build(devcontainer): get git LTS from apt instead of compiling sources 1. Setting the git version to LTS makes it so that the VSCode dev container feature that we use for installing git does not fetch the source code of a specific version and then compiles it but instead of that it just does an apt install git which has 100x faster execution time compared to the full compilation. 2. The downside of this approach is that we no longer guaranteed a specific version of git and this could cause issues because LTS is a moving target, e.g. a form of auto-upgrade which is something Peter's been always on a crusade against, but trade-offs have to be made sometimes. 3. The reasoning why trade-off is appropriate is that the dev container is one of first things that new contributors encounter/use as they ramp up with the project and it makes a big difference if the container can be built in a few minutes vs. a few dozen minutes. Signed-off-by: Peter Somogyvari --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d374803242..e4fe94b4a1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ }, "ghcr.io/devcontainers/features/git:1": { "ppa": true, - "version": "2.40.1" + "version": "lts" }, "ghcr.io/devcontainers/features/go:1": { "version": "1.20.6"