Skip to content

Commit

Permalink
build(devcontainer): get git LTS from apt instead of compiling sources
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
petermetz committed Feb 15, 2024
1 parent 895f172 commit 28e1f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 28e1f9b

Please sign in to comment.