Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade go-git #1935

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions bazel/external/circl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
diff --git a/dh/x25519/BUILD.bazel b/dh/x25519/BUILD.bazel
index 403c628..f26de71 100644
--- a/dh/x25519/BUILD.bazel
+++ b/dh/x25519/BUILD.bazel
@@ -13,7 +13,9 @@ go_library(
"doc.go",
"key.go",
"table.go",
+ "//math/fp25519:fp_amd64.h",
],
+ cgo = True,
importpath = "github.com/cloudflare/circl/dh/x25519",
visibility = ["//visibility:public"],
deps = [
diff --git a/dh/x448/BUILD.bazel b/dh/x448/BUILD.bazel
index 6a0e5f4..8ec7a95 100644
--- a/dh/x448/BUILD.bazel
+++ b/dh/x448/BUILD.bazel
@@ -13,7 +13,9 @@ go_library(
"doc.go",
"key.go",
"table.go",
+ "//math/fp448:fp_amd64.h",
],
+ cgo = True,
importpath = "github.com/cloudflare/circl/dh/x448",
visibility = ["//visibility:public"],
deps = [
diff --git a/math/fp25519/BUILD.bazel b/math/fp25519/BUILD.bazel
index 9129a64..5b0308e 100644
--- a/math/fp25519/BUILD.bazel
+++ b/math/fp25519/BUILD.bazel
@@ -1,6 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@px//bazel:pl_build_system.bzl", "pl_go_test")

+exports_files(["fp_amd64.h"], ["//visibility:public"])
+
go_library(
name = "fp25519",
srcs = [
@@ -11,6 +13,7 @@ go_library(
"fp_generic.go",
"fp_noasm.go",
],
+ cgo = True,
importpath = "github.com/cloudflare/circl/math/fp25519",
visibility = ["//visibility:public"],
deps = [
diff --git a/math/fp448/BUILD.bazel b/math/fp448/BUILD.bazel
index af6ced8..7e4567a 100644
--- a/math/fp448/BUILD.bazel
+++ b/math/fp448/BUILD.bazel
@@ -1,6 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@px//bazel:pl_build_system.bzl", "pl_go_test")

+exports_files(["fp_amd64.h"], ["//visibility:public"])
+
go_library(
name = "fp448",
srcs = [
@@ -11,6 +13,7 @@ go_library(
"fp_generic.go",
"fp_noasm.go",
],
+ cgo = True,
importpath = "github.com/cloudflare/circl/math/fp448",
visibility = ["//visibility:public"],
deps = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this patch? Does this work around the fact that our go toolchain is old?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, newer bazel tooling will make the patching easier, but the main issue is that circl has a odd cgo setup that gazelle doesn't handle automatic build file generation for. So we have to patch what gazelle generates.

See bazel-contrib/bazel-gazelle#1543 and google/go-github#2932 for other folks who ran into this.

44 changes: 25 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require (
github.com/fatih/color v1.14.1
github.com/gdamore/tcell v1.3.0
github.com/getsentry/sentry-go v0.20.0
github.com/go-git/go-git/v5 v5.12.0
github.com/go-openapi/runtime v0.19.26
github.com/go-openapi/strfmt v0.21.3
github.com/gofrs/uuid v4.0.0+incompatible
Expand Down Expand Up @@ -66,7 +67,7 @@ require (
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
github.com/txn2/txeh v1.2.1
github.com/vbauerster/mpb/v4 v4.11.0
github.com/zenazn/goji v0.9.1-0.20160507202103-64eb34159fe5
Expand All @@ -75,20 +76,19 @@ require (
go.etcd.io/etcd/client/v3 v3.5.8
go.etcd.io/etcd/server/v3 v3.5.8
go.uber.org/zap v1.24.0
golang.org/x/mod v0.9.0
golang.org/x/net v0.17.0
golang.org/x/mod v0.12.0
golang.org/x/net v0.22.0
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.14.0
golang.org/x/term v0.14.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.18.0
golang.org/x/term v0.18.0
golang.org/x/time v0.3.0
gonum.org/v1/gonum v0.11.0
google.golang.org/api v0.111.0
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
google.golang.org/grpc v1.53.0
gopkg.in/launchdarkly/go-sdk-common.v2 v2.5.0
gopkg.in/launchdarkly/go-server-sdk.v5 v5.8.1
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.26.2
Expand All @@ -103,12 +103,14 @@ require (
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/VividCortex/ewma v1.1.1 // indirect
github.com/a8m/envsubst v1.3.0 // indirect
github.com/alecthomas/participle/v2 v2.0.0-beta.5 // indirect
Expand All @@ -118,6 +120,7 @@ require (
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cockroachdb/apd v1.1.0 // indirect
github.com/cockroachdb/errors v1.8.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
Expand All @@ -126,6 +129,7 @@ require (
github.com/containerd/continuity v0.2.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand All @@ -137,14 +141,16 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/elliotchance/orderedmap v1.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fvbommel/sortorder v1.0.1 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
Expand All @@ -163,7 +169,7 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
Expand All @@ -186,9 +192,9 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/launchdarkly/ccache v1.1.0 // indirect
Expand All @@ -209,7 +215,6 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
Expand All @@ -229,21 +234,23 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/segmentio/backo-go v1.0.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
Expand All @@ -266,11 +273,11 @@ require (
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand All @@ -282,7 +289,6 @@ require (
gopkg.in/launchdarkly/go-server-sdk-evaluation.v1 v1.5.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.2 // indirect
Expand Down
Loading
Loading