From 5f099d30a5bf6a005a1dc79f904438fcacc15108 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Fri, 21 Aug 2026 21:52:42 +0100 Subject: [PATCH] Cache protoc-gen-connect-go Go version --- make/go/dep_protoc_gen_connect_go.mk | 5 +++-- make/go/dep_protoc_gen_go.mk | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/make/go/dep_protoc_gen_connect_go.mk b/make/go/dep_protoc_gen_connect_go.mk index 2632a17..191c29d 100644 --- a/make/go/dep_protoc_gen_connect_go.mk +++ b/make/go/dep_protoc_gen_connect_go.mk @@ -15,7 +15,8 @@ GO_GET_PKGS := $(GO_GET_PKGS) \ PROTOC_GEN_CONNECT_GO := $(CACHE_BIN)/protoc-gen-connect-go -$(CACHE_VERSIONS)/connect-go/protoc-gen-connect-go-$(CONNECT_VERSION): +# Keyed by GO_VERSION: the plugin formats its output with go/format +$(CACHE_VERSIONS)/connect-go/protoc-gen-connect-go-$(CONNECT_VERSION)-go$(GO_VERSION): @rm -f $(PROTOC_GEN_CONNECT_GO) @rm -rf $(dir $@) @mkdir -p $(dir $@) @@ -24,7 +25,7 @@ $(CACHE_VERSIONS)/connect-go/protoc-gen-connect-go-$(CONNECT_VERSION): @test -x $@ @touch $@ -$(PROTOC_GEN_CONNECT_GO): $(CACHE_VERSIONS)/connect-go/protoc-gen-connect-go-$(CONNECT_VERSION) +$(PROTOC_GEN_CONNECT_GO): $(CACHE_VERSIONS)/connect-go/protoc-gen-connect-go-$(CONNECT_VERSION)-go$(GO_VERSION) @mkdir -p $(dir $@) @ln -sf $< $@ diff --git a/make/go/dep_protoc_gen_go.mk b/make/go/dep_protoc_gen_go.mk index a69508b..e6041b9 100644 --- a/make/go/dep_protoc_gen_go.mk +++ b/make/go/dep_protoc_gen_go.mk @@ -16,9 +16,7 @@ GO_GET_PKGS := $(GO_GET_PKGS) \ PROTOC_GEN_GO := $(CACHE_BIN)/protoc-gen-go -# The cache key includes GO_VERSION: protoc-gen-go formats its output with go/format, so -# the code it generates depends on the toolchain that built it, and we want to rebuild the -# plugin whenever that toolchain changes. +# Keyed by GO_VERSION: the plugin formats its output with go/format $(CACHE_VERSIONS)/protoc-gen-go/protoc-gen-go-$(PROTOC_GEN_GO_VERSION)-go$(GO_VERSION): @rm -f $(PROTOC_GEN_GO) @rm -rf $(dir $@)