Skip to content

Commit 9bb7b2e

Browse files
authored
Upgrade from makego (#3553)
1 parent 33d2db4 commit 9bb7b2e

File tree

26 files changed

+2877
-2743
lines changed

26 files changed

+2877
-2743
lines changed

make/go/buf.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ bufbreaking: $(BUF)
6262
postlint:: bufbreaking
6363
endif
6464
endif
65+
66+
.PHONY: updatebufversion
67+
updatebufversion:
68+
$(SED_I) -E "s/BUF_VERSION \?=.*/BUF_VERSION ?= v${RELEASE_BUF_VERSION}/" "make/go/dep_buf.mk"
69+
$(SED_I) -E "s/\# https\:\/\/github.com\/bufbuild\/buf\/releases.*/\# https\:\/\/github.com\/bufbuild\/buf\/releases $(shell date "+%Y%m%d") checked $(shell date "+%Y%m%d")/" "make/go/dep_buf.mk"

make/go/dep_buf.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS)
77
$(call _assert_var,CACHE_BIN)
88

99
# Settable
10-
# https://github.com/bufbuild/buf/releases 20240911 checked 20240916
11-
BUF_VERSION ?= v1.41.0
10+
# https://github.com/bufbuild/buf/releases 20241114 checked 20241114
11+
BUF_VERSION ?= v1.47.2
1212
# Settable
1313
#
1414
# If set, this path will be installed every time someone depends on $(BUF)

make/go/dep_golangci_lint.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
# Must be set
44
$(call _assert_var,MAKEGO)
55
$(call _conditional_include,$(MAKEGO)/base.mk)
6-
$(call _conditional_include,$(MAKEGO)/dep_jq.mk)
76
$(call _assert_var,CACHE_VERSIONS)
87
$(call _assert_var,CACHE_BIN)
98

109
# We want to ensure we rebuild golangci-lint every time we require a new Go minor version.
1110
# Otherwise, the cached version may not support the latest language features.
12-
GOLANGCI_LINT_GO_VERSION := $(shell go mod edit -json | jq -r .Go | cut -d'.' -f1-2)
11+
GOLANGCI_LINT_GO_VERSION := $(shell go list -m -f '{{.GoVersion}}' | cut -d'.' -f1-2)
1312

1413
# Settable
15-
# https://github.com/golangci/golangci-lint/releases 20240909 checked 20240916
14+
# https://github.com/golangci/golangci-lint/releases 20241110 checked 20241113
1615
# Contrast golangci-lint configuration with the one in https://github.com/connectrpc/connect-go/blob/main/.golangci.yml when upgrading
17-
GOLANGCI_LINT_VERSION ?= v1.61.0
16+
GOLANGCI_LINT_VERSION ?= v1.62.0
1817

1918
GOLANGCI_LINT := $(CACHE_VERSIONS)/golangci-lint/$(GOLANGCI_LINT_VERSION)-go$(GOLANGCI_LINT_GO_VERSION)
2019
$(GOLANGCI_LINT):

make/go/dep_jq.mk

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ JQ_VERSION ?= 1.7.1
1414

1515
ifeq ($(UNAME_OS),Darwin)
1616
JQ_OS := macos
17+
else ifeq ($(UNAME_OS),Linux)
18+
JQ_OS := linux
19+
endif
20+
1721
ifeq ($(UNAME_ARCH),x86_64)
1822
JQ_ARCH := amd64
1923
else
2024
JQ_ARCH := $(UNAME_ARCH)
2125
endif
22-
endif
2326

24-
ifeq ($(UNAME_ARCH),x86_64)
25-
ifeq ($(UNAME_OS),Linux)
26-
JQ_OS := linux
27-
JQ_ARCH := amd64
28-
endif
29-
endif
3027
JQ := $(CACHE_VERSIONS)/jq/$(JQ_VERSION)
3128
$(JQ):
3229
@rm -f $(CACHE_BIN)/jq

make/go/dep_protoc.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ $(call _assert_var,CACHE_INCLUDE)
1010
$(call _assert_var,CACHE_BIN)
1111

1212
# Settable
13-
# https://github.com/protocolbuffers/protobuf/releases 20240523 checked 20240527
13+
# https://github.com/protocolbuffers/protobuf/releases 20241204 checked 20241217
1414
# NOTE: Set to version compatible with genproto source code (only used in tests).
15-
PROTOC_VERSION ?= 27.0
15+
PROTOC_VERSION ?= 29.1
1616

1717
# Google adds a dash to release candidate versions in the name of the
1818
# release artifact, i.e. v27.0-rc1 -> v27.0-rc-1

make/go/dep_protoc_gen_go.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $(call _assert_var,CACHE_VERSIONS)
77
$(call _assert_var,CACHE_BIN)
88

99
# Settable
10-
# https://github.com/protocolbuffers/protobuf-go/releases 20241216 checked 20241216
10+
# https://github.com/protocolbuffers/protobuf-go/releases 20241216 checked 20241217
1111
PROTOC_GEN_GO_VERSION ?= v1.36.0
1212

1313
GO_GET_PKGS := $(GO_GET_PKGS) \

make/go/dep_yq.mk

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ YQ_VERSION ?= v4.44.1
1414

1515
ifeq ($(UNAME_OS),Darwin)
1616
YQ_OS := darwin
17-
ifeq ($(UNAME_ARCH),x86_64)
18-
YQ_ARCH := amd64
19-
endif
20-
ifeq ($(UNAME_ARCH),arm64)
21-
YQ_ARCH := arm64
22-
endif
17+
else ifeq ($(UNAME_OS),Linux)
18+
YQ_OS := linux
2319
endif
2420

2521
ifeq ($(UNAME_ARCH),x86_64)
26-
ifeq ($(UNAME_OS),Linux)
27-
YQ_OS := linux
2822
YQ_ARCH := amd64
23+
else ifeq ($(UNAME_ARCH),arm64)
24+
YQ_ARCH := arm64
25+
else ifeq ($(UNAME_ARCH),aarch64)
26+
YQ_ARCH := arm64
27+
else
28+
YQ_ARCH := $(UNAME_ARCH)
2929
endif
30-
endif
30+
3131

3232
YQ := $(CACHE_VERSIONS)/yq/$(YQ_VERSION)
3333
$(YQ):

make/go/go.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GO_GET_PKGS ?=
2222
# Settable
2323
GO_MOD_VERSION ?= 1.22
2424
# Settable
25-
GO_MOD_TOOLCHAIN ?= 1.23.2
25+
GO_MOD_TOOLCHAIN ?= 1.23.4
2626
# Settable
2727
GO_ALL_REPO_PKGS ?= ./cmd/... ./internal/...
2828
# Settable

private/buf/bufprotopluginexec/bufprotopluginexec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ const (
4040
// defaultMajorVersion is the default major version.
4141
defaultMajorVersion = 5
4242
// defaultMinorVersion is the default minor version.
43-
defaultMinorVersion = 27
43+
defaultMinorVersion = 29
4444
// defaultPatchVersion is the default patch version.
45-
defaultPatchVersion = 0
45+
defaultPatchVersion = 1
4646
// defaultSuffixVersion is the default suffix version.
4747
defaultSuffixVersion = ""
4848
)

private/bufpkg/bufimage/bufimageutil/testdata/any/c1.txtar

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ option objc_class_prefix = "GPB";
4646
option optimize_for = SPEED;
4747
message FeatureSet {
4848
optional FieldPresence field_presence = 1 [
49-
edition_defaults = { value: "EXPLICIT", edition: EDITION_PROTO2 },
49+
edition_defaults = { value: "EXPLICIT", edition: EDITION_LEGACY },
5050
edition_defaults = { value: "IMPLICIT", edition: EDITION_PROTO3 },
5151
edition_defaults = { value: "EXPLICIT", edition: EDITION_2023 },
5252
feature_support = { edition_introduced: EDITION_2023 },
@@ -55,38 +55,38 @@ message FeatureSet {
5555
targets = TARGET_TYPE_FILE
5656
];
5757
optional EnumType enum_type = 2 [
58-
edition_defaults = { value: "CLOSED", edition: EDITION_PROTO2 },
58+
edition_defaults = { value: "CLOSED", edition: EDITION_LEGACY },
5959
edition_defaults = { value: "OPEN", edition: EDITION_PROTO3 },
6060
feature_support = { edition_introduced: EDITION_2023 },
6161
retention = RETENTION_RUNTIME,
6262
targets = TARGET_TYPE_ENUM,
6363
targets = TARGET_TYPE_FILE
6464
];
6565
optional RepeatedFieldEncoding repeated_field_encoding = 3 [
66-
edition_defaults = { value: "EXPANDED", edition: EDITION_PROTO2 },
66+
edition_defaults = { value: "EXPANDED", edition: EDITION_LEGACY },
6767
edition_defaults = { value: "PACKED", edition: EDITION_PROTO3 },
6868
feature_support = { edition_introduced: EDITION_2023 },
6969
retention = RETENTION_RUNTIME,
7070
targets = TARGET_TYPE_FIELD,
7171
targets = TARGET_TYPE_FILE
7272
];
7373
optional Utf8Validation utf8_validation = 4 [
74-
edition_defaults = { value: "NONE", edition: EDITION_PROTO2 },
74+
edition_defaults = { value: "NONE", edition: EDITION_LEGACY },
7575
edition_defaults = { value: "VERIFY", edition: EDITION_PROTO3 },
7676
feature_support = { edition_introduced: EDITION_2023 },
7777
retention = RETENTION_RUNTIME,
7878
targets = TARGET_TYPE_FIELD,
7979
targets = TARGET_TYPE_FILE
8080
];
8181
optional MessageEncoding message_encoding = 5 [
82-
edition_defaults = { value: "LENGTH_PREFIXED", edition: EDITION_PROTO2 },
82+
edition_defaults = { value: "LENGTH_PREFIXED", edition: EDITION_LEGACY },
8383
feature_support = { edition_introduced: EDITION_2023 },
8484
retention = RETENTION_RUNTIME,
8585
targets = TARGET_TYPE_FIELD,
8686
targets = TARGET_TYPE_FILE
8787
];
8888
optional JsonFormat json_format = 6 [
89-
edition_defaults = { value: "LEGACY_BEST_EFFORT", edition: EDITION_PROTO2 },
89+
edition_defaults = { value: "LEGACY_BEST_EFFORT", edition: EDITION_LEGACY },
9090
edition_defaults = { value: "ALLOW", edition: EDITION_PROTO3 },
9191
feature_support = { edition_introduced: EDITION_2023 },
9292
retention = RETENTION_RUNTIME,

0 commit comments

Comments
 (0)