-
Notifications
You must be signed in to change notification settings - Fork 0
/
import.patch
26 lines (26 loc) · 958 Bytes
/
import.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git proto/def.bzl proto/def.bzl
index 6a2a2d72..61db45ec 100644
--- proto/def.bzl
+++ proto/def.bzl
@@ -123,8 +123,12 @@ def _go_proto_library_impl(ctx):
imports = get_imports(ctx.attr, go.importpath),
importpath = go.importpath,
))
+ importpath = None
+ if ctx.attr.overrideimportpath:
+ importpath = ctx.attr.overrideimportpath
library = go.new_library(
go,
+ importpath = importpath,
resolver = _proto_library_to_source,
srcs = go_srcs,
)
@@ -164,6 +168,7 @@ go_proto_library = rule(
"importpath": attr.string(),
"importmap": attr.string(),
"importpath_aliases": attr.string_list(), # experimental, undocumented
+ "overrideimportpath": attr.string(),
"embed": attr.label_list(providers = [GoLibrary]),
"gc_goopts": attr.string_list(),
"compiler": attr.label(providers = [GoProtoCompiler]),
--