Skip to content

Commit

Permalink
Remove go.mod replace for golang.org/x/exp (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev authored Dec 15, 2023
1 parent affe34d commit f2e64d7
Show file tree
Hide file tree
Showing 12 changed files with 302 additions and 178 deletions.
4 changes: 0 additions & 4 deletions ebpf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ require (
)

replace (
// Changed slices.SortFunc signature, which breaks dependencies:
// https://github.com/golang/exp/commit/302865e7556b4ae5de27248ce625d443ef4ad3ed
golang.org/x/exp => golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1

// x/sys: v0.14.0 removes definition of BPF_F_KPROBE_MULTI_RETURN in unix/zerrors_linux.go
// https://github.com/golang/go/issues/63969
golang.org/x/sys => golang.org/x/sys v0.13.0
Expand Down
9 changes: 6 additions & 3 deletions ebpf/symtab/elf/elfmmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ func TestElfSymbolComparison(t *testing.T) {
})
}

cmp := func(a, b TestSym) bool {
cmp := func(a, b TestSym) int {
if a.Start == b.Start {
return strings.Compare(a.Name, b.Name) < 0
return strings.Compare(a.Name, b.Name)
} else if a.Start < b.Start {
return -1
} else {
return 1
}
return a.Start < b.Start
}
slices.SortFunc(mySymbols, cmp)
slices.SortFunc(genuineSymbols, cmp)
Expand Down
21 changes: 11 additions & 10 deletions ebpf/symtab/elf/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ func GetELFSymbolsFromSymtab(elfFile *elf.File) []TestSym {
}

add(symtab)
slices.SortFunc(symbols, func(a, b TestSym) bool {

symCmp := func(a, b TestSym) int {
if a.Start == b.Start {
return strings.Compare(a.Name, b.Name) < 0
return strings.Compare(a.Name, b.Name)
} else if a.Start < b.Start {
return -1
} else {
return 1
}
return a.Start < b.Start
})
}

slices.SortFunc(symbols, symCmp)
add(dynsym)
slices.SortFunc(symbols, func(a, b TestSym) bool {
if a.Start == b.Start {
return strings.Compare(a.Name, b.Name) < 0
}
return a.Start < b.Start
})
slices.SortFunc(symbols, symCmp)
return symbols
}

Expand Down
46 changes: 21 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/gogo/status v1.1.1
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.5.9
github.com/google/go-cmp v0.6.0
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.0
Expand Down Expand Up @@ -66,7 +66,7 @@ require (
golang.org/x/sys v0.14.0
golang.org/x/text v0.14.0
golang.org/x/time v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
Expand All @@ -92,7 +92,7 @@ require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.44.321 // indirect
github.com/aws/aws-sdk-go v1.45.25 // indirect
github.com/aws/aws-sdk-go-v2 v1.18.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.27 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.26 // indirect
Expand All @@ -106,7 +106,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/baidubce/bce-sdk-go v0.9.138 // indirect
github.com/benbjohnson/clock v1.3.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
Expand All @@ -120,13 +119,13 @@ require (
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/strfmt v0.21.7 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
Expand All @@ -135,9 +134,9 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/hashicorp/consul/api v1.22.0 // indirect
github.com/hashicorp/consul/api v1.25.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
Expand All @@ -159,20 +158,21 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/go-httpheader v0.3.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/ncw/swift v1.0.53 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/alertmanager v0.25.1 // indirect
github.com/prometheus/alertmanager v0.26.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect
Expand All @@ -190,28 +190,27 @@ require (
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
go.mongodb.org/mongo-driver v1.11.7 // indirect
go.mongodb.org/mongo-driver v1.12.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect
go.opentelemetry.io/otel v1.18.0 // indirect
go.opentelemetry.io/otel/metric v1.18.0 // indirect
go.opentelemetry.io/otel/trace v1.18.0 // indirect
go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect
go.opentelemetry.io/collector/semconv v0.87.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/tools v0.15.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.139.0 // indirect
google.golang.org/api v0.147.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.28.0-rc.0 // indirect
k8s.io/apimachinery v0.28.0-rc.0 // indirect
k8s.io/client-go v0.28.0-rc.0 // indirect
)

replace (
Expand All @@ -221,14 +220,11 @@ replace (
// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet.
github.com/hashicorp/memberlist => github.com/grafana/memberlist v0.3.1-0.20220708130638-bd88e10a3d91
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.45.0
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.48.1

// Replaced with fork, to allow prefix listing, see https://github.com/simonswine/objstore/commit/84f91ea90e721f17d2263cf479fff801cab7cf27
github.com/thanos-io/objstore => github.com/grafana/objstore v0.0.0-20231121154247-84f91ea90e72

// Changed slices.SortFunc signature, which breaks dependencies:
// https://github.com/golang/exp/commit/302865e7556b4ae5de27248ce625d443ef4ad3ed
golang.org/x/exp => golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
// gopkg.in/yaml.v3
// + https://github.com/go-yaml/yaml/pull/691
// + https://github.com/go-yaml/yaml/pull/876
Expand Down
Loading

0 comments on commit f2e64d7

Please sign in to comment.