Commit Graph

9434 Commits

Author SHA1 Message Date
David L. Jones
c2c770e7ea
[Bazel/C++] Factor out stubs, io, and testing libraries. (#9980)
This change creates packages under src/google/protobuf/{io,stubs,testing} and moves build definitions there. Future changes will handle .../util and .../compiler, and finally src/google/protobuf.
2022-05-17 13:26:46 -07:00
zhangskz
e235147407
Delete legacy update_version.py script, which is replaced with internal update_versions library (#9983) 2022-05-17 13:49:20 -04:00
David L. Jones
b3199d62be
[Python] Handle user-provided --link-objects and --library-dirs. (#9968)
If the user provides a `--link-objects` (or `-O`) flag that looks like it points to libprotobuf, use that for static linking instead of using the hard-coded path `../src/.libs/libprotobuf.a`. (Also, if we see such a flag, assume they want to link it statically, even if they don't provide `--compile_static_extension`.)

Similarly, if they provide a `--library-dirs=` (or `-L`), assume that is the location to search, and don't add the hard-coded path `../src/.libs`.
2022-05-16 17:21:28 -07:00
David L. Jones
4e5b920625
[Bazel/macOS] Use the constructed environment when running libtool. (#9965)
This fixes errors like: `SDKROOT: unbound variable` when building a cc_dist_library rule.
2022-05-16 16:11:09 -07:00
deannagarcia
088281d84b
Merge pull request #9964 from protocolbuffers/main-202205131806
Merge 21.x back to main
2022-05-16 09:06:11 -07:00
Vassil Kovatchev
9d7a449e5c Fix failing FieldMask.Merge for well-known wrapper field types 2022-05-16 15:12:19 +01:00
deannagarcia
6da9b69efe
Merge pull request #9967 from deannagarcia/LF
Fix c# Kokoro errors
2022-05-13 16:40:04 -07:00
Joshua Haberman
9be7dd1c81
Merge pull request #9963 from johnnyshields/ruby-x64-mingw-ucrt-support
Ruby: Support x64-mingw-ucrt platform
2022-05-13 15:04:04 -07:00
Deanna Garcia
4049efc7b0 Move to LF 2022-05-13 21:09:51 +00:00
Nikhil Benesch
448d421250
Various fixups to warnings flags (#9344)
* Don't drop parser warnings on the floor

Fix #9343.

* Convert "missing syntax" warning to an actual warning

For some reason this warning was emitted as a log message rather than a
structured warning. Convert it to use the AddWarning API so that it gets
emitted with a file and line number by protoc, and is visible via the
error collection interface during programmatic use.

* Remove CaptureTestStderr() call

CaptureTestStderr() and GetCapturedTestStderr() have to be paired with each other.

* Adjust tests for new warnings

A few tests now produce warnings that they didn't before, but were
expecting not to see any stderr output. Adjust the tests accordingly.

Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-05-13 12:32:38 -07:00
Deanna Garcia
193da6c8a9 Merge release branch 21.x into main 2022-05-13 18:07:04 +00:00
deannagarcia
380a9104b0
Merge pull request #9962 from protocolbuffers/21.x-202205131655
Update version.json to: 21.0-dev
2022-05-13 10:59:04 -07:00
johnnyshields
9254853796 Ruby: support x64-mingw-ucrt platform, which is the new platform which Windows Ruby Installer uses as of Ruby 3.1 2022-05-14 02:56:12 +09:00
deannagarcia
366cb84282
Merge pull request #9959 from zyp/add_protanium
Reserve extension id for Protonium
2022-05-13 10:00:42 -07:00
Deanna Garcia
08473bbe26 Update version.json to: 21.0-dev 2022-05-13 16:56:18 +00:00
Vegard Storheil Eriksen
b23ab61719 Reserve extension id for Protonium 2022-05-13 18:54:29 +02:00
Jon Skeet
c32d7ec2ab Helper method on Any to allow an any to be unpacked more easily
We already have the TypeRegistry abstraction for JSON parsing, so it lends itself well to this.

Note that this is much more useful than it would have been before C# gained pattern matching support: it's easy to imagine a switch statement/expression using pattern matching with the result of this, with cases for a set of known message types, for example.
2022-05-13 16:09:12 +01:00
David L. Jones
b3cbea18ea
[Bazel] Move Python rules to //python (#9952) 2022-05-12 19:48:58 -07:00
Deanna Garcia
bb7e5824b2 Pin googleapis-common-protos to most recent version 2022-05-12 20:39:50 +00:00
Deanna Garcia
43b1427c18 Update python doc gen versions 2022-05-12 18:12:55 +00:00
deannagarcia
1978a6f723
Merge pull request #9946 from boscosiu/install-endian-h
Add endian.h to includes list
2022-05-12 10:44:05 -07:00
Deanna Garcia
20d9a4fed5 Update protoc version for doc publishing 2022-05-12 17:34:06 +00:00
Deanna Garcia
e9987578ac Update protoc version for doc publishing 2022-05-12 17:31:31 +00:00
David L. Jones
d60c0d2d35
Expose generated files from proto_gen via DefaultInfo, and change to new provider syntax. (#9951)
* Switch to new provider syntax instead of structs.
* Expose files via `DefaultInfo`, and use that for `py_proto_library`.
* Several changes from buildifier.
2022-05-11 19:13:56 -07:00
David L. Jones
b64cd5ac64
Switch C++ test protos to use the normal cc_proto_library rules. (#9950) 2022-05-11 16:45:17 -07:00
David L. Jones
87c5475687
[Kokoro] Add dist check build for linux+cmake (#9939)
The cmake tests are expected to fail for now due to Abseil sources missing from the distribution artifact. The tests are structured as expected failures.
2022-05-11 13:33:29 -07:00
Elliotte Rusty Harold
309e24e86a
Run kotlin tests on JDK 8 *and later* (#9949)
@deannagarcia fixes #9870
2022-05-11 16:50:10 +00:00
boscosiu
f91b078abf
Add endian.h to includes list
Client code is breaking due to missing include.  (endian.h was added in 9e09343 but didn't make it into this list, so it wasn't getting installed)
2022-05-10 18:40:36 -07:00
Deanna Garcia
3cede25cef change configure.ac to use c++ version 2022-05-10 23:41:41 +00:00
Joshua Haberman
b2a51f8525
Merge pull request #9621 from bshaffer/remove-class-aliases
feat: [PHP] remove legacy generate class file
2022-05-10 13:36:47 -07:00
Deanna Garcia
9a31dea61e update changelog 2022-05-10 18:57:45 +00:00
Protobuf Team
d259bd3287 Updating version.json and repo version numbers to: 21.0-rc1 2022-05-10 11:34:07 -07:00
Protobuf Team
bf5e800447 Updating version.json to: 22-dev 2022-05-10 11:34:06 -07:00
Joshua Haberman
7303304585
Merge pull request #9941 from haberman/toolchain-flags
Updated toolchain to support optimization flags, and updated to the latest upb
2022-05-10 10:10:34 -07:00
Joshua Haberman
6018e9edef Minor CHANGES.txt fix and pulled one more upb commit. 2022-05-10 16:28:53 +00:00
Joshua Haberman
915d439df0 Updated the release notes and the upb version.
Also removed the obsolete PROTOBUF_VERSION variable now that
upb is updated.
2022-05-10 06:31:57 +00:00
Joshua Haberman
14803e6f63 Optimization is now working. 2022-05-10 02:06:31 +00:00
Joshua Haberman
1f3c00eaac Added default flags for all of the compilation modes. 2022-05-10 00:46:34 +00:00
David L. Jones
354aba886e
Add a test for bazel-built dist archives (#9929)
This also fixes some packaging rules that are needed for the result to be buildable.
2022-05-09 16:32:59 -07:00
Adam Cozzette
b180b2809f
Use __constinit only in GCC 12.2 and up (#9936)
Fixes #9916. GCC appears to have a bug preventing our use of __constinit
from working correctly, but this bug will be fixed in GCC 12.2.
2022-05-09 13:15:44 -07:00
deannagarcia
32d99bb00a
Merge pull request #9928 from veblush/cmake-abseil
Added cmake abseil include guard
2022-05-09 09:19:12 -07:00
Esun Kim
b6ee841d7c Added cmake abseil include guard 2022-05-06 15:09:13 -07:00
David L. Jones
637a699969
[Bazel] Move conformance test targets to //conformance. (#9922) 2022-05-06 13:30:48 -07:00
David L. Jones
52655b1f5e
[Bazel] Move C++ build-related logic into //build_defs (#9921)
These are all "toolchain-y" things, like copts, link_opts, and config_settings. These are very different from what is in //toolchain, though, so I chose the somewhat common name build_defs for the package. For now, I am only using this package for purely internal things. (Most public "defs"-type things should come from rules_proto/rules_cc, anyhow.)
2022-05-06 12:11:46 -07:00
deannagarcia
e305932431
Merge pull request #9891 from deannagarcia/osx_toolchain
Add macosx action environment variable
2022-05-06 11:17:34 -07:00
Adam Cozzette
4ebe8ffef4
Merge pull request #9927 from acozzette/sync-stage
Integrate from Piper for C++, Java, and Python
2022-05-06 10:22:09 -07:00
Joshua Haberman
d8b0884442
Merge pull request #9536 from bshaffer/patch-2
chore: [PHP] fix phpdoc for MapField keys
2022-05-06 10:21:35 -07:00
Adam Cozzette
f026a14caa Merge tag 'refs/tags/sync-piper' into sync-stage 2022-05-06 16:14:57 +00:00
Adam Cozzette
48cb9d10fe Sync from Piper @447000875
PROTOBUF_SYNC_PIPER
2022-05-06 16:14:57 +00:00
zhangskz
0e6ac3d789
Increment python major version in version.json for python upb (#9926) 2022-05-06 11:47:21 -04:00