aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/proto
Commit message (Collapse)AuthorAge
* Remove the strict_proto_deps attribute from the build language.Gravatar Googler2017-05-15
| | | | | RELNOTES: proto_library.strict_proto_deps no longer exists. PiperOrigin-RevId: 155900531
* Automated g4 rollback of commit bcd23553f38f54fd4846aa507c827a4ee40cfab4.Gravatar ajmichael2017-04-26
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 154315543
* proto_library: Pass exec path to protoc. Fixes #2265Gravatar Jakob Buchgraber2017-04-26
| | | | | | | | When passing the paths of the proto files to protoc we need to use the exec path in order to also have correct paths for generated files. Change-Id: Id85b959829a0b159d30814314af631a90a4bd296 PiperOrigin-RevId: 154272610
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Strict proto deps: handle direct protos in external repositories.Gravatar carmi2017-03-31
| | | | | | RELNOTES: None PiperOrigin-RevId: 151786403
* A flag to control the outputs that cc_proto_library expects from proto-compiler.Gravatar Carmi Grushko2017-03-28
| | | | | | -- PiperOrigin-RevId: 151381769 MOS_MIGRATED_REVID=151381769
* Ignore --reuseJavaCompileActionsFromProtoLibrary now that it is rolled out.Gravatar Carmi Grushko2017-03-24
| | | | | | -- PiperOrigin-RevId: 151037295 MOS_MIGRATED_REVID=151037295
* --Gravatar Carmi Grushko2017-03-22
| | | | | PiperOrigin-RevId: 150810735 MOS_MIGRATED_REVID=150810735
* --Gravatar Carmi Grushko2017-03-14
| | | | | PiperOrigin-RevId: 150019356 MOS_MIGRATED_REVID=150019356
* Document the descriptor set output of proto_library.Gravatar Carmi Grushko2017-03-10
| | | | | | -- PiperOrigin-RevId: 149659956 MOS_MIGRATED_REVID=149659956
* Remove mention of the ignored flag "--output_descriptor_set".Gravatar Carmi Grushko2017-02-24
| | | | | | -- PiperOrigin-RevId: 148405662 MOS_MIGRATED_REVID=148405662
* Expose proto_library, java_lite_proto_library, java_proto_library and ↵Gravatar Carmi Grushko2017-02-24
| | | | | | | | | | cc_proto_library to the outside world. RELNOTES: New rules in Bazel: proto_library, java_lite_proto_library, java_proto_library and cc_proto_library -- PiperOrigin-RevId: 148394617 MOS_MIGRATED_REVID=148394617
* Remove 'allowReturnsNone=true' from the ProtoSourcesProvider methods for ↵Gravatar Googler2017-02-22
| | | | | | | | | | descriptors these fields currently can't return null/None (since the @AutoValue will reject it) and there doesn't seem to be a reason to think that they might in the future so i think this is safe to remove. -- PiperOrigin-RevId: 148099927 MOS_MIGRATED_REVID=148099927
* Rollback of commit 4b73e972d909bcd533f2f9940f95a00b9b73bdde.Gravatar Dmitry Lomov2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/ *** Original change description *** Roll forward execroot change RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Cust... -- PiperOrigin-RevId: 147833177 MOS_MIGRATED_REVID=147833177
* --proto_compiler points at @com_google_protobuf//:protocGravatar Carmi Grushko2017-02-17
| | | | | | | | This allows proto_library to be used out of the box by adding a repository entry that points to the protobuf distro in one's WORKSPACE file. -- PiperOrigin-RevId: 147808147 MOS_MIGRATED_REVID=147808147
* Roll forward execroot changeGravatar Kristina Chodorow2017-02-16
| | | | | | | | | | | | | | | | | RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Custom crosstools that hardcode external/<repo> paths will have to be updated. Issue #1262. -- PiperOrigin-RevId: 147726370 MOS_MIGRATED_REVID=147726370
* Rollback of commit 03d1255df1805ed1e5f7512bf0336f71c595791b.Gravatar Googler2017-02-15
| | | | | | | | | | *** Reason for rollback *** Vanilla roll forward -- PiperOrigin-RevId: 147512649 MOS_MIGRATED_REVID=147512649
* Rollback of commit 51d245879ed2729f15c6c6a35b319a4277e7cd64.Gravatar Carmi Grushko2017-02-14
| | | | | | -- PiperOrigin-RevId: 147416635 MOS_MIGRATED_REVID=147416635
* --Gravatar Carmi Grushko2017-02-09
| | | | | PiperOrigin-RevId: 146926312 MOS_MIGRATED_REVID=146926312
* proto_library: saner descriptor setsGravatar Carmi Grushko2017-02-02
| | | | | | | | | | | | | 1. proto_library exposes a direct descriptor set (built from its 'srcs') and a nested set of transitive descriptor (from all of its dependencies). 2. Alias libraries (=no 'srcs') produce empty files as their descriptor sets. 3. The direct descriptor set depends on the transitive ones, ensuring that building a top-most proto validates all of its dependencies are also valid protos. 4. The wire format of protos allows to concatenate the outputs to get a valid serialized proto that contains all of the descriptor sets in the proto tree. RELNOTES: proto_library: alias libraries produce empty files for descriptor sets. -- PiperOrigin-RevId: 146300520 MOS_MIGRATED_REVID=146300520
* Remove unused --use_toolchain_for_java_proto flag.Gravatar Carmi Grushko2017-02-02
| | | | | | -- PiperOrigin-RevId: 146293197 MOS_MIGRATED_REVID=146293197
* Inline --output_descriptor_set=true.Gravatar Carmi Grushko2017-02-02
| | | | | | -- PiperOrigin-RevId: 146284737 MOS_MIGRATED_REVID=146284737
* Do not crash when a strict proto_library depends on a non-strict one.Gravatar Carmi Grushko2017-02-01
| | | | | | | | | | (strictness in the sense of strict proto deps) The reason for the crash was that a non-strict proto_library would put 'null' in its SupportData.protosInDirectDeps, and then a strict proto_library that consumes it would choke on the null. This rearranges things so that protosInDirectDeps will never be null. -- PiperOrigin-RevId: 146210040 MOS_MIGRATED_REVID=146210040
* Incremental dexing for java_lite_proto_librariesGravatar Googler2017-01-27
| | | | | | -- PiperOrigin-RevId: 145744124 MOS_MIGRATED_REVID=145744124
* Use a NestedSet for proto_library check deps sourcesGravatar Liam Miller-Cushon2017-01-23
| | | | | | -- PiperOrigin-RevId: 145122327 MOS_MIGRATED_REVID=145122327
* Description redacted.Gravatar Carmi Grushko2017-01-20
| | | | | | -- PiperOrigin-RevId: 145030082 MOS_MIGRATED_REVID=145030082
* Description redacted.Gravatar Vladimir Moskva2017-01-19
| | | | | | -- PiperOrigin-RevId: 144965845 MOS_MIGRATED_REVID=144965845
* --Gravatar Carmi Grushko2017-01-18
| | | | | PiperOrigin-RevId: 144839489 MOS_MIGRATED_REVID=144839489
* If --strict_proto_deps=default and a proto_library didn't specify ↵Gravatar Carmi Grushko2017-01-18
| | | | | | | | strict_proto_deps, then strictness is enforced. -- PiperOrigin-RevId: 144836042 MOS_MIGRATED_REVID=144836042
* Manually add periods to documentation strings where needed.Gravatar John Cater2017-01-03
| | | | | | | | -- Change-Id: I9ec3209a69ba5a51943b334f278ba93d67d4f9f4 Reviewed-on: https://cr.bazel.build/8090 PiperOrigin-RevId: 143470915 MOS_MIGRATED_REVID=143470915
* Do not crash when there's an error in the rule.Gravatar Carmi Grushko2016-12-23
| | | | | | | | | | | In ProtoCompileActionBuilder.registerActions(), we check for rule errors immediately after retrieving the value of :proto_compiler. However, this picks-up existing errors, not necessarily from retrieving the value of :proto_compiler. -- PiperOrigin-RevId: 142777231 MOS_MIGRATED_REVID=142777231
* Move the descriptorset output to the ProtoSourcesProvider and expose it to ↵Gravatar Googler2016-12-22
| | | | | | | | | | | | | skylark. This does mean that the type name 'ProtoSourcesProvider' is a little inaccurate, since descriptorSet() is an output. Alternatively we could expose the DescriptorSetProvider to skylark. RELNOTES: expose proto_library descriptor set to skylark via <dep>.proto.descriptor_set -- PiperOrigin-RevId: 142680666 MOS_MIGRATED_REVID=142680666
* proto_library can depend on proto_library's from external repos.Gravatar Carmi Grushko2016-12-22
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2039. -- PiperOrigin-RevId: 142672678 MOS_MIGRATED_REVID=142672678
* Make sure that --proto_toolchain_for_cc works in the HOST configuration.Gravatar Carmi Grushko2016-12-15
| | | | | | -- PiperOrigin-RevId: 142074257 MOS_MIGRATED_REVID=142074257
* Strict proto deps: .proto files are allowed to import other .proto files in ↵Gravatar Carmi Grushko2016-12-12
| | | | | | | | the same srcs as they are. -- PiperOrigin-RevId: 141604925 MOS_MIGRATED_REVID=141604925
* Clean up after transition of java_xxx_proto_library rules to proto-toolchains.Gravatar Carmi Grushko2016-12-07
| | | | | | | | | This hardcodes usage of proto-toolchains, which triggers strict-proto-deps. Since strict-proto-deps relies on a proto-compiler feature which doesn't exist yet, I've also changed the default of --strict_proto_deps to 'default', which won't trigger the check unless specifically requested. -- PiperOrigin-RevId: 141347426 MOS_MIGRATED_REVID=141347426
* When a strict proto dep violation occurs, tell the user what they should fix.Gravatar Carmi Grushko2016-12-05
| | | | | | -- PiperOrigin-RevId: 140912072 MOS_MIGRATED_REVID=140912072
* Initial commit of cc_proto_library.Gravatar Carmi Grushko2016-12-01
| | | | | | | RELNOTES: cc_proto_library generates C++ code from proto_library rules. -- MOS_MIGRATED_REVID=140680034
* Default behavior of proto_library's strict-proto-deps is now determined by ↵Gravatar Carmi Grushko2016-11-30
| | | | | | | | | the value of a flag. Used to be hardcoded to "yes, check for strict proto deps" because the value of the "strict_proto_deps" attributes was "true". -- MOS_MIGRATED_REVID=140538461
* Make it easier to use protos in Bazel out of the box.Gravatar Carmi Grushko2016-11-29
| | | | | | | | | java_xxx_proto_library rules now look for toolchains in the external repo @com_google_protobuf_xxx//:xxx_toolchain This still requires getting protobuf's GitHub repository to build with Bazel. -- MOS_MIGRATED_REVID=140420903
* Strict deps for proto_library.Gravatar Carmi Grushko2016-11-24
| | | | | | | | | In other words, all imported protos must be declared as BUILD dependencies. RELNOTES: proto_library supports strict proto deps. -- MOS_MIGRATED_REVID=140078632
* Alias proto_library's produce a descriptor set that contains all srcs of its ↵Gravatar Carmi Grushko2016-11-23
| | | | | | | | | | | dependencies. (alias proto_library's are those with a deps attribute but no srcs attribute) RELNOTES: Alias proto_library's produce a descriptor set that contains all srcs of its dependencies. -- MOS_MIGRATED_REVID=139940475
* ProtoCompileActionBuilder can create strict-deps-checking command lines.Gravatar Carmi Grushko2016-11-21
| | | | | | | No behavior changes, for now. -- MOS_MIGRATED_REVID=139614509
* Remove unused SupportData.getUsedDirectDeps().Gravatar Carmi Grushko2016-11-18
| | | | | -- MOS_MIGRATED_REVID=139514666
* proto_library now produces a descriptor set, when built on the command-line.Gravatar Carmi Grushko2016-11-16
| | | | | | | RELNOTES: proto_library now produces a descriptor set, when built on the command-line. -- MOS_MIGRATED_REVID=139288944
* Blacklists for proto_lang_toolchain() no longer have to be proto_library's.Gravatar Carmi Grushko2016-11-11
| | | | | | | | | | The intention is to use filegroup's instead. The motivation is to avoid materializing the transitive srcs of a proto_library, which might be large. Using a filegroup makes it explicit that we only take the listed files into account. RELNOTES: Blacklists for proto_lang_toolchain() no longer have to be proto_library's. -- MOS_MIGRATED_REVID=138784908
* Rollback of commit b043fafb957ae8038088e427ff27a5c9f951c979.Gravatar Carmi Grushko2016-11-08
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Use proto_lang_toolchain() in java_proto_library, after fixing breakage. Verified on Jenkins, http://ci.bazel.io/job/Gerrit-bazel-tests/169/ *** Original change description *** Automated [] rollback of commit a396b070ae36032a973672e11145533621c39edc. *** Reason for rollback *** Breaks tests on latest, as proto_lang_toolchain didn't make it into the 0.4.0 release see http://ci.bazel.io/job/bazel-tests/306/BAZEL_VERSION=latest,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Use proto_lang_toolchain() in java_proto_library. -- MOS_MIGRATED_REVID=138432193
* Progress on migrating java_lite_proto_library to Skylark.Gravatar Irina Iancu2016-11-08
| | | | | -- MOS_MIGRATED_REVID=138391269
* Rollback of commit a396b070ae36032a973672e11145533621c39edc.Gravatar Klaus Aehlig2016-11-07
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks tests on latest, as proto_lang_toolchain didn't make it into the 0.4.0 release see http://ci.bazel.io/job/bazel-tests/306/BAZEL_VERSION=latest,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Use proto_lang_toolchain() in java_proto_library. -- MOS_MIGRATED_REVID=138372522
* Use proto_lang_toolchain() in java_proto_library.Gravatar Carmi Grushko2016-11-04
| | | | | -- MOS_MIGRATED_REVID=138161512