aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java
Commit message (Collapse)AuthorAge
* Add exports attribute to proto_library.Gravatar twerth2018-08-14
| | | | | | | Note that it is currently only used by the java_proto_library family of rules (if enabled per flag). RELNOTES: None PiperOrigin-RevId: 208601730
* [Reland] Accept proto paths relative to proto_source_root as direct ↵Gravatar Googler2018-07-09
| | | | | | | | | | | | | | | dependencies. This is a reland of https://github.com/bazelbuild/bazel/commit/5deca4cf88f5568771f2c836a9b8c693b88bd749. This will make protoc see as direct dependencies the .proto files that were included using the proto_source_root flag. Until now, Bazel passed to protoc the direct dependencies of a target as the path relative to the WORKSPACE, which made it fail when a shorter path, relative to the package was used. Progress on #4544. RELNOTES: None. PiperOrigin-RevId: 203808292
* Automated rollback of commit f43df1e29765f75e02838e4139417e914b3ee812.Gravatar cparsons2018-03-06
| | | | | | | | | | | | | *** Reason for rollback *** Breaks external cc_proto_library. See https://github.com/bazelbuild/bazel/issues/4780 RELNOTES: None. *** Original change description *** Fixing issue with external j2objc protos PiperOrigin-RevId: 188041921
* Fixing issue with external j2objc protosGravatar Mike Lewis2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. This seems to be a regression, so maybe should go into the 0.8.0 branch? Note: Work at Square and we have a signed CLA with google Note, without this fix we get errors like ``` ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.m' was not created ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.h' was not created ``` Closes #4058. PiperOrigin-RevId: 187480864
* Expose ProtoSourcesProvider.transitive_proto_path_flags to Skylark.Gravatar elenairina2018-02-27
| | | | | | | Progress on #4544. RELNOTES: None. PiperOrigin-RevId: 187179454
* PiperOrigin-RevId: 186532302Gravatar ahumesky2018-02-21
|
* Accept proto paths relative to proto_source_root as direct dependencies.Gravatar elenairina2018-02-20
| | | | | | | | | | | This will make protoc see as direct dependencies the .proto files that were included using the proto_source_root flag. Until now, Bazel passed to protoc the direct dependencies of a target as the path relative to the WORKSPACE, which made it fail when a shorter path, relative to the package was used. Progress on #4544. RELNOTES: None. PiperOrigin-RevId: 186294997
* Add "proto_source_root" flag to proto_library.Gravatar elenairina2018-02-16
| | | | | | | Fixes #4544. RELNOTES: Add "proto_source_root" flag to proto_library. PiperOrigin-RevId: 185997723
* Rename Root to ArtifactRoot.Gravatar tomlu2018-01-16
| | | | | | This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath. PiperOrigin-RevId: 182082367
* Wrap runtime jars and proto sources going into runfiles in a stable order ↵Gravatar tomlu2017-09-19
| | | | | | | | nested set. This saves memory, as the nested set would otherwise become flattened. Assuming the jars don't have duplicates files with the same root relative path in the same runfiles tree this won't make any semantic difference. PiperOrigin-RevId: 169234428
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* 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
* --Gravatar Carmi Grushko2017-03-22
| | | | | PiperOrigin-RevId: 150810735 MOS_MIGRATED_REVID=150810735
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Add the repository name as a parameter to the output path functionsGravatar Kristina Chodorow2016-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything yet, it's in preparation for the execroot rearranging change. The execroot will have one bazel-out per repo, so it'll look like: execroot/ repo1/ bazel-out/ local-fastbuild/ bin/ repo2/ bazel-out/ local-fastbuild/ bin/ genfiles/ repo3/ bazel-out/ local-fastbuild/ testlogs/ and so on. Thus, any output path (getBinDirectory() & friends) needs to know what the repo name is. This changes so many places in the code I thought it would be good to do separately, then just flip the functionality in the execroot-rearranging commit. While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes. `bazel info` and similar just return roots for the main repository. The only "change" is passing around a target label in the Java rules. Continues work on #1262. -- MOS_MIGRATED_REVID=129985336
* Add a --legacy_external_runfiles optionGravatar Kristina Chodorow2016-04-25
| | | | | | | | This isn't hooked up to anything yet, but is another piece of getting #848 rolled forward. -- MOS_MIGRATED_REVID=120582973
* Automated [] rollback of commit 857cda2c45a5cc68c3fa398311c48c571a64915d and ↵Gravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e. *** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
* Move the runfiles for external repositories to under the x.runfiles/ directoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | | | This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
* Change ProtoSourcesProvider to only export direct sources. Add a method, ↵Gravatar Michael Thvedt2015-11-10
| | | | | | | getCheckDepsProtoSources(), to get any indirect sources from alias library cases. -- MOS_MIGRATED_REVID=107395192
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Move common proto functions into a new open-source class, ProtoCommon, in ↵Gravatar Michael Thvedt2015-09-02
preperation for BazelProtoLibrary. -- MOS_MIGRATED_REVID=102070904