This adds logic to generate files with lists of files in cmake and automake syntax. This will allow Bazel to serve as the single Source of Truth for library sources, with cmake and automake using Bazel-derived definitions.
The definition files are not yet generated or checked in, but that will be a fairly straightforward set of follow-up changes.
When generating, it isn't uncommon to have generate >1 file at a time, and it is
likely that one file will include another. So cache the results as the
calculation is done so the work isn't repeated.
The previous pruning method didn't have any concept of tracking already done
work, this changes the algorithm to avoid the repeated work to make things more
minimal on the way up.
Some extremely deep proto graphs, this takes the generation time from around 15
min to under 45 seconds.
* Rollback pull request #9852, which will break clients who don't IWYU and depend on us for these STL headers
* Rolling forward https://github.com/protocolbuffers/protobuf/pull/9852 after confirming it doesn't break google internals
This avoids conflicting names in a couple of cases.
1. Within google, we want to sync files but not name them BUILD (since the structure doesn't match).
2. On case-insensitive filesystems, `build` may be used for a build directory. Naming `BUILD.bazel` avoids potentioal conflicts.
These filenames stutter, but are still being used by some users. So, these forward to the correct header. They should eventually be deprecated and removed.
Start reducing our reliance on autotools
This commit updates a few of our CI scripts to build protoc using Bazel
instead of autotools. I also updated the setuptools and Rake build
configs to look for protoc under bazel-bin/ so that they will
preferentially use a Bazel-built protoc binary. The goal is to start
chipping away at our use of autotools in preparation for eventually
dropping autotools support.
* Eliminated git_repository() in favor of HTTP archives.
Also factored out logic for github archives into its own macro.
* Sorted entries and ran buildifier.
* Removed the import of git_repository.
- Run for all Apple configurations/platforms.
- Limit the action to only run when the ObjC source change.
- Document why the CocoaPods doesn't run the tests during the validation.
The kokoro objectivec_cocoapods_integration configuration can likely be retired
by retiring this.
* WIP.
* Restore deleted __init__.py files.
* Updated version of upb.
* Moved upb from a submodule to a Bazel dep.
* Updated to new upb which can tolerate missing system_python.
* Updated to a new upb.
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.
These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:
1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](https://github.com/bazelbuild/rules_pkg/pull/577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.