Skip to content

Commit b3d57d8

Browse files
authored
Merge pull request #154 from rules-proto-grpc/fix-options
4.0.1 Release
2 parents 093ffe3 + 3a3a883 commit b3d57d8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

docs/changelog.rst

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
Changelog
77
=========
88

9+
4.0.1
10+
-----
11+
12+
General
13+
*******
14+
15+
- Fixed label specific values in ``options`` attr being ignored
16+
17+
918
4.0.0
1019
-----
1120

internal/compile.bzl

+2-4
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,14 @@ def proto_compile(ctx, options, extra_protoc_args, extra_protoc_files):
107107
# Convert options dict to label keys
108108
plugin_labels = [plugin.label for plugin in plugins]
109109
per_plugin_options = {
110+
# Dict of plugin label to options string list
110111
Label(plugin_label): opts
111112
for plugin_label, opts in options.items()
112113
if plugin_label != "*"
113114
}
114115

115-
# If plugin options are provided, check they are only for the plugins available or *
116-
per_plugin_options = {} # Dict of plugin label to options string list
117-
all_plugin_options = [] # Options applied to all plugins, from the '*' key
118-
119116
# Only allow '*' by itself
117+
all_plugin_options = [] # Options applied to all plugins, from the '*' key
120118
if "*" in options:
121119
if len(options) > 1:
122120
fail("The options attr on target {} cannot contain '*' and other labels. Use either '*' or labels".format(ctx.label))

0 commit comments

Comments
 (0)