workspace: support workspace-relative embeds in rules_go
rules_go constrains itself by default to includes from the same
directory or its subdirectories, just like the standard Go compiler.
With Bazel however including things from other packages is very common.
Aliases don't help as Bazel doesn't actually copy the artifacts for
efficiency.
This patches rules_go to also accept Bazel-style embeds.
Change-Id: I8fc9479492da00e463297e11b99ff2a9b88bbfde
Reviewed-on: https://review.monogon.dev/c/monogon/+/820
Tested-by: Jenkins CI
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
diff --git a/WORKSPACE b/WORKSPACE
index 222586b..6a47504 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -31,6 +31,10 @@
http_archive(
name = "io_bazel_rules_go",
sha256 = "685052b498b6ddfe562ca7a97736741d87916fe536623afb7da2824c0211c369",
+ patch_args = ["-p1"],
+ patches = [
+ "//third_party/go/patches:rules_go_absolute_embedsrc.patch",
+ ],
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip",