@@ -63,7 +63,7 @@ Require these rules your `WORKSPACE`:
6363git_repository(
6464 name = " org_pubref_rules_protobuf" ,
6565 remote = " https://github.com/pubref/rules_protobuf" ,
66- tag = " v0.3.5 " ,
66+ tag = " v0.4.0 " ,
6767)
6868```
6969
@@ -158,8 +158,8 @@ your sourcefiles as they appear in your workspace, with an additional
158158
159159This has implications for import statements in your protobuf
160160sourcefiles, if you use them. The two cases to consider are imports
161- * within* your workspace (referred to here as 'internal' imports), and
162- imports of other protobuf files in an external workspace.
161+ * within* your workspace (referred to here as * 'internal' imports* ), and
162+ imports of other protobuf files in an external workspace ( * external imports * ) .
163163
164164### Internal Imports
165165
@@ -179,11 +179,12 @@ order to (1) trigger generation of the `common.pb.{h,cc}` files AND
179179compiling the object files.
180180
181181Additional ` --proto_path ` (` -I ` ) arguments can be supplied via the
182- ` imports = [] ` attribute common to all rules.
182+ ` imports = [] ` attribute common to all rules if needed .
183183
184184### External Imports
185185
186- The same logic applied to external imports. The two questions to answer are
186+ The same logic applied to external imports. The two questions to
187+ answer are:
187188
1881891 . * Can protoc "see" the imported file?* In order to satisfy this
189190 requirement, pass in the full path of the required file relative to
@@ -200,21 +201,22 @@ java_proto_library(
200201)
201202```
202203
203- ...given that the file
204+ ...if imported as ` import "google/protobuf/descriptor.proto" ` given
205+ that the file
204206` @com_github_google_protobuf/src/google/protobuf/descriptor.proto ` is
205207in the package ` google.protobuf ` .
206208
207- 2 . * Can the ` {LANG}_proto_library ` rule "see" the generated protobuf
208- files (in this case ` descripttor .pb.{h,cc}` . Just because the file
209- was imported does not imply that protoc will generate outputs for
210- it, so somewhere in the ` cc_library ` rule dependency chain these
211- files must be present. This could be via another
212- ` cc_proto_library ` rule defined elswhere, or a some other filegroup
213- or label list. If the source is another ` cc_proto_library ` rule,
214- specify that in the ` deps ` attribute to the calling
215- ` cc_proto_library ` rule. Otherwise, pass it to the ` cc_srcs ` or
216- perhaps ` cc_deps ` attribute to the calling ` cc_proto_library ` rule.
217- Hopefully that made sense. It's tricky.
209+ 2 . * Can the ` cc_proto_library ` rule "see" the generated protobuf files *
210+ (in this case ` descriptor .pb.{h,cc}` . Just because the file was
211+ imported does not imply that protoc will generate outputs for it,
212+ so somewhere in the ` cc_library ` rule dependency chain these files
213+ must be present. This could be via another ` cc_proto_library ` rule
214+ defined elswhere, or a some other filegroup or label list. If the
215+ source is another ` cc_proto_library ` rule, specify that in the
216+ ` deps ` attribute to the calling ` cc_proto_library ` rule.
217+ Otherwise, pass it to the ` cc_srcs ` or perhaps ` cc_deps ` attribute
218+ to the calling ` cc_proto_library ` rule. Hopefully that made sense .
219+ It's tricky.
218220
219221# Contributing
220222
0 commit comments