From a54221e3228d0baea1c6694e02e4902a9da9fd59 Mon Sep 17 00:00:00 2001 From: Lam Tran Date: Sat, 10 Feb 2024 14:44:57 +0700 Subject: [PATCH] chore(deps): upgrade rules_go --- README.md | 2 +- WORKSPACE | 9 ++++----- api/gen/money/v1/money.pb.go | 2 +- api/go.mod | 4 ++-- api/go.sum | 6 ++---- bar/Dockerfile | 2 +- bar/go.mod | 2 +- buf.gen.yaml | 4 ++-- deps.bzl | 9 ++++----- foo/Dockerfile | 2 +- foo/go.mod | 2 +- go.work | 2 +- lib/go.mod | 2 +- 13 files changed, 22 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 674f775..18de3db 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Prerequisites -- Go 1.21+ +- Go 1.22+ - Bazelisk ## Using Go Workspace diff --git a/WORKSPACE b/WORKSPACE index b3a93a5..c72cbcf 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,10 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "6734a719993b1ba4ebe9806e853864395a8d3968ad27f9dd759c196b3eb3abe8", + sha256 = "80a98277ad1311dacd837f9b16db62887702e9f1d1c4c9f796d0121a46c8e184", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.45.1/rules_go-v0.45.1.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip", ], ) @@ -18,7 +18,6 @@ http_archive( ], ) - load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") @@ -35,7 +34,7 @@ go_dependencies() go_rules_dependencies() -go_register_toolchains(version = "1.21.6") +go_register_toolchains(version = "1.22.0") gazelle_dependencies() diff --git a/api/gen/money/v1/money.pb.go b/api/gen/money/v1/money.pb.go index 4671f77..3569030 100644 --- a/api/gen/money/v1/money.pb.go +++ b/api/gen/money/v1/money.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: money/v1/money.proto diff --git a/api/go.mod b/api/go.mod index e947484..76c9879 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,5 +1,5 @@ module api -go 1.21 +go 1.22.0 -require google.golang.org/protobuf v1.31.0 +require google.golang.org/protobuf v1.32.0 diff --git a/api/go.sum b/api/go.sum index 9ea5597..5361bc7 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,8 +1,6 @@ -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/bar/Dockerfile b/bar/Dockerfile index ec6d6f9..d56342e 100644 --- a/bar/Dockerfile +++ b/bar/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.21 AS build +FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS build WORKDIR /src diff --git a/bar/go.mod b/bar/go.mod index 67e213d..4e6ca93 100644 --- a/bar/go.mod +++ b/bar/go.mod @@ -1,5 +1,5 @@ module bar -go 1.21 +go 1.22.0 require github.com/gorilla/mux v1.8.1 diff --git a/buf.gen.yaml b/buf.gen.yaml index aaaa8c1..27bbbd3 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -11,11 +11,11 @@ plugins: out: api/gen opt: - paths=source_relative - - plugin: buf.build/protocolbuffers/go:v1.31.0 + - plugin: buf.build/protocolbuffers/go:v1.32.0 out: api/gen opt: - paths=source_relative - - plugin: buf.build/grpc-ecosystem/gateway:v2.18.1 + - plugin: buf.build/grpc-ecosystem/gateway:v2.19.1 out: api/gen opt: - paths=source_relative diff --git a/deps.bzl b/deps.bzl index 7c6bc23..b104de2 100644 --- a/deps.bzl +++ b/deps.bzl @@ -22,13 +22,12 @@ def go_dependencies(): sum = "h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=", version = "v0.5.5", ) - go_repository( name = "com_github_gorilla_mux", build_file_proto_mode = "disable_global", importpath = "github.com/gorilla/mux", - sum = "h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=", - version = "v1.8.0", + sum = "h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=", + version = "v1.8.1", ) go_repository( name = "com_github_pmezard_go_difflib", @@ -69,8 +68,8 @@ def go_dependencies(): name = "org_golang_google_protobuf", build_file_proto_mode = "disable_global", importpath = "google.golang.org/protobuf", - sum = "h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=", - version = "v1.31.0", + sum = "h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=", + version = "v1.32.0", ) go_repository( name = "org_golang_x_xerrors", diff --git a/foo/Dockerfile b/foo/Dockerfile index f9918d1..62f8571 100644 --- a/foo/Dockerfile +++ b/foo/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.21 AS build +FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS build WORKDIR /src diff --git a/foo/go.mod b/foo/go.mod index 9ce15e0..f446cf8 100644 --- a/foo/go.mod +++ b/foo/go.mod @@ -1,6 +1,6 @@ module foo -go 1.21 +go 1.22.0 require github.com/stretchr/testify v1.8.4 diff --git a/go.work b/go.work index 2de8077..5144c42 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.21 +go 1.22.0 use ( ./api diff --git a/lib/go.mod b/lib/go.mod index b407875..63052b2 100644 --- a/lib/go.mod +++ b/lib/go.mod @@ -1,6 +1,6 @@ module lib -go 1.21 +go 1.22.0 require github.com/stretchr/testify v1.8.4