forked from bazel-contrib/rules_go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gazelle now generates proto_library, go_proto_library, and go_grpc_library rules. proto_library will contain .proto files in a directory. go_{proto,grpc}_library are buildable libraries, linked with the proto_library. A go_library rules embeds the go_{proto,grpc}_library and includes an extra .go sources (but .pb.go files are excluded). The new proto rule generation is turned on by default in packages that don't have existing proto rules. If there are existing rules, proto rule generation will either follow previous behavior (if go_proto_library.bzl is loaded) or will be disabled (if go_proto_library is loaded from some other repo). The proto mode can be selected explicitly with the -proto command line flag or with the '# gazelle:proto' directive. Legacy rules can be migrated with 'gazelle fix'. Limitations: * Gazelle still only allows one package per directory. Gazelle infers package name and import path from .proto files. These must match other files in the directory. * Import resolution is fairly crude and is just a guess, based on the import string. * There's no way to import protos from other repositories, except for Well Known Types. Fixes bazel-contrib#808
- Loading branch information
Jay Conrod
committed
Oct 3, 2017
1 parent
51d6a4c
commit 4c930b4
Showing
35 changed files
with
2,222 additions
and
774 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.