From 9a6e4686464ac4258226f4bf3533d78d1b4ec566 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 23 May 2024 16:28:15 -0700 Subject: [PATCH] Update go.mod and go.work for go 1.22 Go 1.22 is more strict about GOPROXY=off, so we need to update the go.work file to point at local copies of dependencies. Bug: 330574836 Test: Presubmits Change-Id: I37dbc821f138fe8977636316ebe3e7986ccdfa0e --- tools/compliance/go.mod | 28 +++++----------------------- tools/compliance/go.sum | 2 -- tools/compliance/go.work | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 tools/compliance/go.sum create mode 100644 tools/compliance/go.work diff --git a/tools/compliance/go.mod b/tools/compliance/go.mod index bd040774b1..532efd486e 100644 --- a/tools/compliance/go.mod +++ b/tools/compliance/go.mod @@ -1,29 +1,11 @@ +go 1.22 + module android/soong/tools/compliance -require google.golang.org/protobuf v0.0.0 - -replace google.golang.org/protobuf v0.0.0 => ../../../../external/golang-protobuf - require ( - android/soong v0.0.0 github.com/google/blueprint v0.0.0 + android/soong v0.0.0 + google.golang.org/protobuf v0.0.0 github.com/spdx/tools-golang v0.0.0 + github.com/google/go-cmp v0.0.0 ) - -replace github.com/spdx/tools-golang v0.0.0 => ../../../../external/spdx-tools - -require golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect - -replace android/soong v0.0.0 => ../../../soong - -replace github.com/google/blueprint => ../../../blueprint - -// Indirect deps from golang-protobuf -exclude github.com/golang/protobuf v1.5.0 - -replace github.com/google/go-cmp v0.5.5 => ../../../../external/go-cmp - -// Indirect dep from go-cmp -exclude golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 - -go 1.21 diff --git a/tools/compliance/go.sum b/tools/compliance/go.sum deleted file mode 100644 index cbe76d9187..0000000000 --- a/tools/compliance/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= diff --git a/tools/compliance/go.work b/tools/compliance/go.work new file mode 100644 index 0000000000..a24d2ea541 --- /dev/null +++ b/tools/compliance/go.work @@ -0,0 +1,18 @@ +go 1.22 + +use ( + . + ../../../../build/blueprint + ../../../../build/soong + ../../../../external/go-cmp + ../../../../external/golang-protobuf + ../../../../external/spdx-tools +) + +replace ( + github.com/google/blueprint v0.0.0 => ../../../../build/blueprint + android/soong v0.0.0 => ../../../../build/soong + github.com/google/go-cmp v0.0.0 => ../../../../external/go-cmp + google.golang.org/protobuf v0.0.0 => ../../../../external/golang-protobuf + github.com/spdx/tools-golang v0.0.0 => ../../../../external/spdx-tools +)