aboutsummaryrefslogtreecommitdiffhomepage
path: root/protobuf.bzl
Commit message (Collapse)AuthorAge
* Merge pull request #3981 from fahhem/patch-3Gravatar Adam Cozzette2018-07-02
|\ | | | | Handle srcs in generated files by cd'ing in and out
* \ Merge pull request #4168 from jin/masterGravatar Feng Xiao2018-06-22
|\ \ | | | | | | Use versions module from Skylib for version checking
* | | remove PACKAGE_NAME and REPOSITORY_NAME deprecated usage (#4650)Gravatar Ittai Zeidman2018-05-21
| | |
| | * Fix moving generated files onto themselvesGravatar Fahrzin Hemmati2018-05-07
| | |
| | * Only use realpath when in gendir, and use the original ctx.action if not in ↵Gravatar Fahrzin Hemmati2018-05-07
| | | | | | | | | | | | gendir
| | * Track outputs correctlyGravatar Fahrzin Hemmati2018-05-07
| | |
| | * Handle multiple outs per input (for plugins)Gravatar Fahrzin Hemmati2018-05-07
| | |
| | * Strip trailing / from pathGravatar Fahrzin Hemmati2018-05-07
| | |
| | * Handle srcs in generated files by cd'ing in and outGravatar Fahrzin Hemmati2018-05-07
| |/ |/|
* | Output *_pb2_grpc.py when use_grpc_plugin=TrueGravatar Mateusz Matejczyk2018-03-11
| | | | | | Start outputting missing *_pb2_grpc.py files when use_grpc_plugin is set to True for py_proto_library.
* | Replace //:protoc and similar default macro arguments withGravatar James O'Kane2018-03-08
| | | | | | | | | | | | | | @com_google_protobuf prefixed versions. This allows them to work in 3rd party repositories. Fix a bad visibility rule. :hidden does not exist, but :private does.
| * Use versions module from Skylib for version checkingGravatar Jingwen Chen2018-01-12
|/
* Add a check_protobuf_required_bazel_version() for use in WORKSPACEsGravatar Fahrzin Hemmati2017-12-04
|
* Make .bzl files compatible with future versions of BazelGravatar Vladimir Moskva2017-08-07
|
* Adding default shell envGravatar Marco A. Harrendorf2017-04-03
| | | | | | | I am adding default shell environment, so that protobuf compilation makes use of set LD_LIBRARY_PATH and so on. In this way, also non-default gcc installations (e.g. not in /usr/lib) can be used to compile protobuf. This would fix the following issue: https://github.com/bazelbuild/bazel/issues/2515
* Bazel can build protobuf when it's not in the rootGravatar cgrushko2017-02-08
| | | That is, Bazel can now build protobuf when the latter resides in a subdirectory of a project.
* Update genfiles paths to work with a different execroot arrangementGravatar Kristina Chodorow2017-01-25
| | | | | | Bazel is changing the way the execution root is organized (see https://github.com/bazelbuild/bazel/issues/1681 for details) and this updates the protobuf path logic to work with both old and new versions of Bazel.
* Merge pull request #2403 from google/down-integrate-with-msvc-fixGravatar Adam Cozzette2016-11-23
|\ | | | | Integrated internal changes from Google
* | Support grpc plugin in py_proto_libraryGravatar Wiktor Tomczak2016-11-22
| |
| * Merge branch 'master' into down-integrate-with-msvc-fixGravatar Adam Cozzette2016-11-17
| |\ | |/ |/|
| * Integrated internal changes from GoogleGravatar Adam Cozzette2016-11-17
| |
* | Merge pull request #1959 from abergmeier-dsfishlabs/feature/cppGravatar Feng Xiao2016-10-13
|\ \ | |/ |/| Need to expose generated protobuf C++ headers
* | Declare all inputs of protoc actionGravatar Florian Weikert2016-10-12
| | | | | | | | | | ctx.executable.plugin must be in the inputs of protoc's action when using a plugin, otherwise the action will fail. This bug has been hidden by a bug in Bazel: for every ctx.action, Bazel used to automatically add the runfiles of all executable inputs of the RULE instead of using the inputs of the specific ACTION. Consequently, we could get away with underspecifying the inputs of the action.
* | Resolved a conflictGravatar Vladimir Moskva2016-09-12
|\ \
* | | Compatibility with the new version of Bazel.Gravatar Vladimir Moskva2016-09-09
| | | | | | | | | Global variable HOST_CFG is deprecated and will not be supported soon.
| | * Need to expose generated protobuf C++ headers so they can actually be ↵Gravatar Andreas Bergmeier2016-08-15
| |/ |/| | | | | accessed from other libraries.
| * Generalize plugin support in Bazel Skylark ruleGravatar Yuki Yugui Sonoda2016-06-01
|/ | | | | It helps users to support their own plugins in a manner consistent to cc_proto_library and py_proto_libary in their skylark rules
* Bazel build: Keep generated sources and Python runtime in the same directory.Gravatar David Z. Chen2016-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users often encounter a Python import error when trying to build Python protos if protobuf is installed locally on the machine. In this case, Python ends up looking in the wrong directory when importing files (see bazelbuild/bazel#1209 and tensorflow/tensorflow#2021). It seems that the problem is caused by Python getting confused when there are Python source files that are meant to be part of the same package but are in separate directories. Prior to #1233, the Bazel build setup would copy the Python runtime sources and all generated sources for the builtin protos into the root directory (assuming that the protobuf tree is vendored in a google/protobuf directory). With #1233, the two sets of sources are kept in their respective directories but both `src/` and `python/` are added to the `PYTHONPATH` using the new `imports` attribute of the Bazel Python rules. However, both the runtime sources and the generated sources are under the same package: `google.protobuf`, causing Python to become confused when trying to import modules that are in the other directory. This patch adds a workaround to the Bazel build to add a modified version of the original `internal_copied_filegroup` macro to copy the `.proto` files under `src/` to `python/` before building the `py_proto_library` targets for the builtin protos. This ensures that the generated sources for the builtin protos will be in the same directory as the corresponding runtime sources. This patch was tested with the following: * All Python tests in protobuf * All Python tests in tensorflow * All tests in [Skydoc](https://github.com/bazelbuild/skydoc) * Importing protobuf as `//google/protobuf` * Importing and binding targets under `//external` * Importing protobuf as `//third_party/protobuf`
* pass correct args to protoc for java wellknown protos when used as an ↵Gravatar Steven Parkes2016-03-10
| | | | external repository
* Remove hack for building Python support with Bazel.Gravatar David Z. Chen2016-02-25
| | | | | | | | | | | | | | | | This change makes use of new imports attribute for Bazel's Python rules, which enable adding directories to the PYTHONPATH. This allows us to remove the hack for building protobuf's Python support with Bazel and now allows projects to include protobuf using a Bazel external repository rather than requiring it to be imported directly into the source tree as //google/protobuf. This change also updates the protobuf BUILD file to use a named repository, @python//, for including Python headers rather than //util/python. This allows projects to specify their own package for Python headers when including protobuf with an external repository. Fixes #1230
* Fixed grpc C++ plugin support.Gravatar Manjunath Kudlur2016-02-25
| | | | | | | | | | grpc C++ plugin generates additional files, namely .grpc.pb.cc and .grpc.pb.h. Adding these files to the outs of the _proto_gen rule, so dependents don't complain about undeclared inclusions. Also, compiling the .grpc.pb.cc requires additional header files from the grpc library, so added //external:grpc_lib to the deps of the cc_library. Clients are expected to declare that in their bazel WORKSPACE, pointing it to @grpc//:grpc++{_unsecure}.
* Added grpc plugin support to cc_proto_library.Gravatar Manjunath Kudlur2016-02-22
| | | | | | | | cc_proto_library now supports use_grpc_plugin flag that passes --plugin=protoc-gen-grpc=grpc_cpp_plugin to protoc compiler invocation. grpc_cpp_plugin is assumed to be present as //external:grpc_cpp_plugin, so clients can setup their WORKSPACE files appropriately to point to grpc location using bind.
* Make protobuf Skylark extension appends the workspace rootGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | | | | | | | This change make protobuf skylark extension works when using remote repository. Note that this make the Skylark extension unusable prior to Bazel 0.1.4 because the workspace_root is not available on prior version. Tested with Bazel 0.1.4rc2. Fixes https://github.com/bazelbuild/bazel/issues/784.
* Making _genproto rules public.Gravatar Martin Maly2015-12-04
| | | | | This enables other xx_proto_library targets to depend on xx_proto_library targets in different packages, and specifically on xx_wkt_protos.
* Build protoc for host platform to enable cross-compilation.Gravatar Andrew Harp2015-11-03
| | | This is necessary to run protoc on the host as a dependency for Android BUILD targets with Bazel.
* add warning notes for cc|py_proto_library rules.Gravatar Jisi Liu2015-11-02
| | | | | To mention that the interface may change or be removed when bazel has support it natively.
* add default_runtime attribute to cc|py rules.Gravatar Jisi Liu2015-10-27
| | | | This adds implicit dependencies to the coressponding runtime libraries.
* Use && for internal_copied_filegroup.Gravatar Jisi Liu2015-10-21
| | | | So that the rule fails if one or more files cannot be copied.
* Rename copeid_src to internal_copied_filegroupGravatar Jisi Liu2015-10-20
|
* fix sources for python target and add needed dependencies.Gravatar Jisi Liu2015-10-20
|
* Change the impl rule include to includes.Gravatar Jisi Liu2015-10-20
| | | | | We need to use the list to indicate field presense. The field must only contain 0 or 1 string element.
* Change default value of protoc on xx_proto_library rules.Gravatar Jisi Liu2015-10-20
|
* Support python for bazel.Gravatar Jisi Liu2015-10-19
|
* Python bazel support.Gravatar Jisi Liu2015-10-19
|
* Allow include to be None.Gravatar Jisi Liu2015-10-19
| | | | | | | | | | This enables the use case where all the paths are relative to the workspace root, e.g. foo/bar/BUILD /foo.proto -- package foo.bar would generate the message correctly.
* Change prefix to include, and add docsGravatar Jisi Liu2015-10-16
|
* Rename deps/proto_deps to cc_libs/depsGravatar Jisi Liu2015-10-16
|
* style/naming fixGravatar Jisi Liu2015-10-15
|
* make cc_out and py_out internal.Gravatar Jisi Liu2015-10-14
|
* Format code.Gravatar Jisi Liu2015-10-14
|