summaryrefslogtreecommitdiffhomepage
path: root/tools/bazel_gazelle_noise.patch
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-02-02 09:34:29 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-02 09:37:09 -0800
commit3817c7349de2dde950fd65dcab1f4859c095eeaf (patch)
treed50e24f2443a517c425e28e188e5dc797e778f39 /tools/bazel_gazelle_noise.patch
parent00d21b9ae0e379caba54720c71f200596100c8f0 (diff)
Remove go_tool_library references.
This is required only for the built-in bazel nogo functionality. Since we roll these targets manually via the wrappers, we don't need to use go_tool_library. The inconsistent use of these targets leads to conflicting instantiations of go_default_library and go_tool_library, which both contain the same output files. PiperOrigin-RevId: 355184975
Diffstat (limited to 'tools/bazel_gazelle_noise.patch')
-rw-r--r--tools/bazel_gazelle_noise.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/bazel_gazelle_noise.patch b/tools/bazel_gazelle_noise.patch
new file mode 100644
index 000000000..e35f38933
--- /dev/null
+++ b/tools/bazel_gazelle_noise.patch
@@ -0,0 +1,24 @@
+diff -r -u2 a/language/go/resolve.go b/language/go/resolve.go
+--- a/language/go/resolve.go 2020-10-02 14:22:18.000000000 -0700
++++ b/language/go/resolve.go 2020-11-17 19:40:59.770648029 -0800
+@@ -20,5 +20,4 @@
+ "fmt"
+ "go/build"
+- "log"
+ "path"
+ "regexp"
+@@ -80,5 +79,5 @@
+ resolve = ResolveGo
+ }
+- deps, errs := imports.Map(func(imp string) (string, error) {
++ deps, _ := imports.Map(func(imp string) (string, error) {
+ l, err := resolve(c, ix, rc, imp, from)
+ if err == skipImportError {
+@@ -95,7 +94,4 @@
+ return l.String(), nil
+ })
+- for _, err := range errs {
+- log.Print(err)
+- }
+ if !deps.IsEmpty() {
+ if r.Kind() == "go_proto_library" {