From 63af63dfa832a2fa3616c854ca7535cf79d86424 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Aug 2024 18:38:10 +0200 Subject: [PATCH 1/2] lnrpc: avoid needing to download Golang Because the Go version used to run the `go list` commands is below the minimum version specified in the main go.mod file, every time the `make rpc` command is executed, the Golang runtime is downloaded twice, which looks like this and takes a couple of seconds at least: go: downloading go1.21.4 (linux/amd64) go: downloading go1.21.4 (linux/amd64) We fix this by using the correct minimum version. --- lnrpc/gen_protos_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnrpc/gen_protos_docker.sh b/lnrpc/gen_protos_docker.sh index c5263bcd8..edf97e06b 100755 --- a/lnrpc/gen_protos_docker.sh +++ b/lnrpc/gen_protos_docker.sh @@ -6,7 +6,7 @@ set -e DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" # golang docker image version used in this script. -GO_IMAGE=docker.io/library/golang:1.21.0-alpine +GO_IMAGE=docker.io/library/golang:1.21.4-alpine PROTOBUF_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \ go list -f '{{.Version}}' -m google.golang.org/protobuf) From 94b9b50a4283ed2eb754acd0e8afb497546fc0b8 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 7 Aug 2024 09:16:37 +0200 Subject: [PATCH 2/2] mod: update comment what to change on Go version bump --- go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 65dd1ded7..0e628d18b 100644 --- a/go.mod +++ b/go.mod @@ -204,8 +204,8 @@ replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 // allows us to specify that as an option. replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display -// If you change this please also update .github/pull_request_template.md and -// docs/INSTALL.md. +// If you change this please also update .github/pull_request_template.md, +// docs/INSTALL.md and GO_IMAGE in lnrpc/gen_protos_docker.sh. go 1.21.4 retract v0.0.2