Skip to content

Commit

Permalink
Use Go 1.21
Browse files Browse the repository at this point in the history
Go 1.22 was released, so 1.21 is now the oldest supported version.

PiperOrigin-RevId: 617159143
Change-Id: Ib6f4c077c07ec05fb40aeeabc1e35bcc15ffdc3e
  • Loading branch information
morambro authored and copybara-github committed Mar 19, 2024
1 parent 76c9cff commit 600bc93
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 31 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bazel_dep(

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")

go_sdk.download(version = "1.20.13")
go_sdk.download(version = "1.21.8")

go_sdk.nogo(nogo = "@//:tink_nogo")

Expand Down
30 changes: 10 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,28 @@ workspace(name = "tink_go_awskms")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Release from 2023-12-21
http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
integrity = "sha256-gKmCd60TEdrNg3+bFttiiHcC6fHRxMn3ltASGkbI4YQ=",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.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",
],
)

# Release from 2023-12-21
http_archive(
name = "bazel_gazelle",
sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809",
integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
],
)

# Tink Go AWS KMS Deps.
load("@bazel_gazelle//:deps.bzl", "go_repository", "gazelle_dependencies")

# This is needed because Gazelle fetches golang.org/x/[email protected] for this project, while
# io_bazel_rules_go requires golang.org/x/[email protected] [2].
#
# [1] https://github.com/tink-crypto/tink-go-awskms/blob/e8e21693ac1fe8ad9c3a9bb2448e351b76b1f96b/deps.bzl#L145
# [2] https://github.com/bazelbuild/rules_go/blob/58534a2cda8e546a4dec6ea9c6b64eb0bfe824dd/go/private/repositories.bzl#L66
go_repository(
name = "org_golang_x_tools",
importpath = "golang.org/x/tools",
sum = "h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=",
version = "v0.7.0",
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

Expand All @@ -46,7 +36,7 @@ go_rules_dependencies()

go_register_toolchains(
nogo = "@//:tink_nogo",
version = "1.20.10",
version = "1.21.8",
)

gazelle_dependencies()
9 changes: 0 additions & 9 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ def tink_go_awskms_dependencies():
sum = "h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=",
version = "v1.1.0",
)

go_repository(
name = "com_github_golang_protobuf",
importpath = "github.com/golang/protobuf",
sum = "h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=",
version = "v1.5.0",
)

go_repository(
name = "com_github_google_go_cmp",
importpath = "github.com/google/go-cmp",
Expand All @@ -46,7 +44,6 @@ def tink_go_awskms_dependencies():
sum = "h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=",
version = "v1.5.1",
)

go_repository(
name = "com_github_pmezard_go_difflib",
importpath = "github.com/pmezard/go-difflib",
Expand All @@ -59,14 +56,12 @@ def tink_go_awskms_dependencies():
sum = "h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=",
version = "v0.1.0",
)

go_repository(
name = "com_github_tink_crypto_tink_go_v2",
importpath = "github.com/tink-crypto/tink-go/v2",
sum = "h1:QXFBguwMwTIaU17EgZpEJWsUSc60b1BAGTzBIoMdmok=",
version = "v2.1.0",
)

go_repository(
name = "in_gopkg_check_v1",
importpath = "gopkg.in/check.v1",
Expand All @@ -79,7 +74,6 @@ def tink_go_awskms_dependencies():
sum = "h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=",
version = "v2.2.8",
)

go_repository(
name = "org_golang_google_protobuf",
importpath = "google.golang.org/protobuf",
Expand All @@ -92,14 +86,12 @@ def tink_go_awskms_dependencies():
sum = "h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=",
version = "v0.14.0",
)

go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=",
version = "v0.17.0",
)

go_repository(
name = "org_golang_x_sys",
importpath = "golang.org/x/sys",
Expand All @@ -118,7 +110,6 @@ def tink_go_awskms_dependencies():
sum = "h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=",
version = "v0.13.0",
)

go_repository(
name = "org_golang_x_xerrors",
importpath = "golang.org/x/xerrors",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tink-crypto/tink-go-awskms/v2

go 1.20
go 1.21

require (
github.com/aws/aws-sdk-go v1.49.21
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
Expand Down

0 comments on commit 600bc93

Please sign in to comment.