Commit Graph

9370 Commits

Author SHA1 Message Date
David L. Jones
3c5ad8c524
Remove references to //:composer.json and JS compiler. (#9910) 2022-05-04 13:38:16 -07:00
Ryan VanderMeulen
a1fca10ddc
Use PROTOBUF_CONSTEXPR instead of constexpr for kRepHeaderSize. (#9885)
Fixes "no matching function for call to 'CalculateReserveSize'" compiler errors with older clang versions.
2022-05-04 13:02:12 -07:00
deannagarcia
f2a126e349
Merge pull request #9909 from deannagarcia/ktDuplicates
Remove duplicate java generated code
2022-05-03 14:16:31 -07:00
David L. Jones
24ec0b9ffb
Add Starlark utilities to generate files with lists of files (#9882)
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.
2022-05-03 13:33:12 -07:00
Deanna Garcia
7bd1da828b Remove duplicate java generated code 2022-05-03 20:13:11 +00:00
Thomas Van Lenten
35e2f8cd5a ObjC: Revise the minimal extension deps algorithm.
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.
2022-05-03 15:55:04 -04:00
Thomas Van Lenten
0a73ec7e88 Remove the support for the kokoro cocoapods integration tests. 2022-05-03 15:34:36 -04:00
Adam Cozzette
c03eb88a87
Merge pull request #9907 from acozzette/sync-stage
Integrate from Piper for C++, Java, and Python
2022-05-03 11:42:16 -07:00
mkruskal-google
d93d6cc295
Rollforward of #9852 (#9886)
* 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
2022-05-03 11:35:28 -07:00
Adam Cozzette
5718cfc757 Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts:
#	BUILD.bazel
2022-05-03 17:43:12 +00:00
Adam Cozzette
c693ba3c87 Sync from Piper @446230931
PROTOBUF_SYNC_PIPER
2022-05-03 17:41:54 +00:00
Adam Cozzette
5eafa23c98
Update CHANGES.txt (#9897) 2022-05-03 10:26:36 -07:00
zhangskz
b37b613436
Update protobuf_version.bzl to separate protoc and per-language java major version (#9900) 2022-05-03 11:58:31 -04:00
Adam Cozzette
ec91c0e929 Sync from Piper @446048300
PROTOBUF_SYNC_PIPER
2022-05-02 22:49:53 +00:00
Adam Cozzette
cdc11c2d2d
Remove cuda.list from apt sources (#9896)
This will fix the collect_all_artifacts.sh script, which was broken
recently when NVidia stopped publishing Cuda packages for Ubuntu 16.04.
2022-05-02 15:46:43 -07:00
David L. Jones
95da0ba5b4
Rename all BUILD files to BUILD.bazel (#9892)
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.
2022-04-29 17:57:55 -07:00
FaBrand
cd4a8156fa
Be explicit with empty globs (#9890)
There are empty globs that prevent to use com_google_protobuf with
--incompatible_disallow_empty_glob

Introduced in https://github.com/bazelbuild/bazel/issues/8195
2022-04-29 13:12:35 -07:00
David L. Jones
7d48c4accd
Add forwarding lang_generator.h headers for cpp, java, and python. (#9883)
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.
2022-04-29 12:14:16 -07:00
FaBrand
244bbd6f95
Make genrule portable for windows (#9889)
* Make genrule portable for windows

Using this does remove a user dependency on a bash under windows

* Use portable genrule for zlib dependency
2022-04-29 10:24:10 -07:00
David L. Jones
c4ddd84918
Factor out MSVC-only version.rc logic, and ensure other variables are always initialized (#9880) 2022-04-28 15:17:51 -07:00
David L. Jones
4e5e8d325a
Specify full path to proto files. (#9881)
This makes proto path handling more uniform with other source files.
2022-04-28 14:01:34 -07:00
Elliotte Rusty Harold
e22db322e4
Fail JDK 17 build when unit tests fail (#9878) 2022-04-28 19:10:12 +00:00
Adam Cozzette
860f8ad171
Remove the JavaScript implementation (#9874)
This implementation is about to be split out into a separate Git repo.
2022-04-28 12:08:26 -07:00
Elliotte Rusty Harold
1927520278
Include JDK11 in error message on first run (#9866)
* update error message on first run
* sync braces
* grammar
* spelling
2022-04-28 15:55:28 +00:00
Elliotte Rusty Harold
868ab1469f
build_java without conformance tests (#9873)
* build_java without conformance tests
2022-04-28 11:09:39 +00:00
deannagarcia
cd1baaec08
Merge pull request #9871 from protocolbuffers/updateUPB
Update UPB version
2022-04-27 13:34:48 -07:00
Deanna Garcia
d62c6240c3 Update UPB version 2022-04-27 18:56:45 +00:00
Adam Cozzette
9c8c3dea30
Start reducing our reliance on autotools (#9824)
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.
2022-04-27 10:40:01 -07:00
Elliotte Rusty Harold
d2b669a4dd
more descriptive error messages and exceptions (#9868)
* more descriptive error messages and exceptions
* Travis --> Kokoro
2022-04-27 17:02:01 +00:00
Joshua Haberman
37b782198c
Merge pull request #9864 from haberman/update-upb
Updated upb.
2022-04-27 16:24:47 +00:00
Joshua Haberman
4152d8d160 Updated upb.
As of this update, you can test Python/upb with:

```
$ bazel test @upb//python/...
```
2022-04-27 00:37:30 +00:00
Elliotte Rusty Harold
ece5ef6b9b
Fail on unit tests failure (#9862)
* make sure JDK17 tests fail as needed
* set -e to fail on error
2022-04-26 22:30:07 +00:00
Joshua Haberman
ec79d0d328
Merge pull request #9859 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2022-04-26 19:40:16 +00:00
Joshua Haberman
01691f6092
Eliminated git_repository() in favor of HTTP archives. (#9861)
* 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.
2022-04-26 12:27:59 -07:00
Dave MacLachlan
2c5863ecde Remove a bunch of clang-tidy warnings about missing use of explicit on single arg ctors. 2022-04-26 14:38:32 -04:00
mkruskal-google
20a30c675a
Rollback pull request #9852, which will break clients who don't IWYU and depend on us for these STL headers (#9860) 2022-04-26 13:57:16 -04:00
Joshua Haberman
dc4aad931e Sync from Piper @444600173
PROTOBUF_SYNC_PIPER
2022-04-26 17:38:22 +00:00
Joshua Haberman
65236e967e Merge tag 'refs/tags/sync-piper' into sync-stage 2022-04-26 17:38:22 +00:00
cui fliter
ac25235fa7
fix some typos (#9771)
* fix some typos

Signed-off-by: cuishuang <imcusg@gmail.com>

* fix typo

Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-26 10:29:00 -07:00
Noah Dietz
4d56f2d83c
Change enum string name for reserved words (#9780)
* Change enum string name for reserved words

Update PHP descriptor protos

* conditionally generate value compat code
2022-04-26 09:44:39 -07:00
Thomas Van Lenten
35fcbfd298
Add a github action workflow to run CocoaPods validation. (#9800)
- 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.
2022-04-26 09:43:54 -07:00
David L. Jones
125dfd343e
Update more code to use standard int types. (#9851) 2022-04-26 09:28:24 -07:00
David Benjamin
089e09168b
Remove various unused includes (#9852)
These headers pull in STL headers without actually using anything from
the STL.
2022-04-26 09:27:14 -07:00
Tamarous
6718fa9dcc
fix: misspelling (#9857) 2022-04-26 09:25:01 -07:00
Elliotte Rusty Harold
4f552e36bd
Fix typos (#9847)
@pzd
2022-04-26 11:18:51 +00:00
Joshua Haberman
a6901f057e
Added a Bazel dependency for upb (#9812)
* 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.
2022-04-25 15:00:57 -07:00
Dave MacLachlan
6888c031a4 Remove 2 more unnecessary header includes from objectivec sources.
These were missed from #a52e5ad5bb60655c683a12072a6eb7bcb99391d2.
2022-04-25 17:17:48 -04:00
Elliotte Rusty Harold
f53fd52d7b
Add Kokoro config for JDK 17 (#9845)
* add config for OpenJDK11

* update paths

* add JDK17 build
2022-04-25 20:49:58 +00:00
Dave MacLachlan
a52e5ad5bb Remove some unnecessary header includes from objectivec sources. 2022-04-25 15:09:37 -04:00
David L. Jones
d76f8c868c
Add source distribution packaging rules (#9835)
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.
2022-04-22 16:58:16 -07:00