Commit Graph

8988 Commits

Author SHA1 Message Date
Ivo List
15add1af49
Selectively add source or gen dir to includes. (#9438)
When both directories are added this results in protoc emitting a
"warning: directory does not exist.". This makes sense because when
there are no inputs from the other directory, it is also not present
n the sandbox where protoc is executed.
2022-01-28 16:44:42 -08:00
Adam Cozzette
fa57149caa
Merge pull request #9452 from acozzette/merge-3.19.x
Merge 3.19.x into master
2022-01-28 16:44:20 -08:00
Elliotte Rusty Harold
749243db7e
Must build project before running benchmarks (#9454)
* Must build project before running benchmarks

That is, it does not test the version downloaded from Maven central.

* Update README.md
2022-01-28 21:50:35 +00:00
Adam Cozzette
18521f6055 Merge branch '3.19.x' into merge-3.19.x 2022-01-28 17:42:21 +00:00
Jon Skeet
b926a7d209 Add ToProto() method to all C# descriptor classes
Fixes #9425.
2022-01-28 14:17:56 +00:00
Adam Cozzette
22d0e265de
Update protobuf version for 3.19.4 (#9449)
I also updated the PHP release notes in
php/ext/google/protobuf/package.xml.
2022-01-27 19:35:56 -08:00
Joshua Haberman
afeb6d8181
Merge pull request #9451 from haberman/ruby-dataloss-bugfix
Fixed data loss bug in Ruby extension
2022-01-27 18:20:42 -08:00
Joshua Haberman
98b8e055d5 Merge branch '3.19.x' into ruby-dataloss-bugfix 2022-01-27 18:17:23 -08:00
Joshua Haberman
eb301e1a33
Merge pull request #9450 from haberman/php-dataloss-bugfix
Fixed data loss bug in PHP C extension
2022-01-27 18:02:14 -08:00
Joshua Haberman
aceff710f4 Fixed data loss bug in Ruby extension. 2022-01-27 17:29:12 -08:00
Joshua Haberman
35a21c1249 Added CHANGES.txt entry. 2022-01-27 17:14:07 -08:00
Joshua Haberman
67995fb4e9 Fixed data loss bug with PHP C extension. 2022-01-27 17:06:41 -08:00
Adam Cozzette
779b97260d
Update CHANGES.txt for 3.19.4 release (#9448) 2022-01-27 16:27:45 -08:00
Joshua Haberman
b48ba578dd
Merge pull request #9422 from ngg/disable-musttail-winx86
Disable [[clang::musttail]] attribute on Windows x86
2022-01-27 13:51:31 -08:00
Elliotte Rusty Harold
a30167f016
simplify mergeable UI messages (#9445)
No "Please"

see https://docs.google.com/document/d/1mIHBZQXI3F5VEPPmR54PySixl8wSsdwVciSENJ0Unxg/edit#heading=h.vvb6vlxagbv8 for justification

also make the and clause a little simpler. That is, this is now "Include release notes: yes AND at least a language label" instead of "Please include release notes: yes AND Please include at least a language label"
2022-01-27 13:07:30 -05:00
Maximilian
82372d8fe6
Use proper SPDX license identifier (#9441)
The previously used term "3-Clause BSD License" is not properly
standarized. A common standard is SPDX, therefore "3-Clause BSD License"
is substituted with "BSD-3-Clause" which is a SPDX identifier.

`grep -rl "3-Clause BSD License" | xargs -n1 sed -i "s/3-Clause BSD
License/BSD-3-Clause/g"`
2022-01-27 00:23:14 +00:00
Adam Cozzette
a035bd0882
Make libprotobuf symbols local on OSX (#8346) (#9435)
@gnossen gave a great overview in https://github.com/grpc/grpc/pull/24992 of the overall problem.

If a python process using both protobuf _and_ another native library linking in libprotobuf
frequently can cause crashes.  This seems to frequently affect tensorflow as well:

tensorflow/tensorflow#8394,
tensorflow/tensorflow#9525 (comment)
tensorflow/tensorflow#24976,
tensorflow/tensorflow#35573,
https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/contrib/makefile/rename_protobuf.sh,
tensorflow/tensorflow#16104

Testing locally this fixes both crashes when linking in multiple versions of protobuf
and fixes `DescriptorPool` clashes as well (e.g. Python and Native code import different versions of the same message).

Co-authored-by: Roy Williams <roy.williams.iii@gmail.com>
2022-01-25 08:24:12 -08:00
Joshua Haberman
b696347f80
Merge pull request #9436 from haberman/ruby-upb2
Updated Ruby to the current version of upb
2022-01-24 20:40:12 -08:00
David Geldreich
f180289c46
link with correct C runtime on MSVC (#9437)
when using CMake >= 3.15, we use CMAKE_MSVC_RUNTIME_LIBRARY
to reproduce the /MT vs /MD when protobuf_MSVC_STATIC_RUNTIME
is TRUE or FALSE
MultiThreaded is for /MT
MultiThreadedDebug is for /MTd
MultiThreadedDLL is for /MD
MultiThreadedDebugDLL is for /MDd
2022-01-24 13:17:14 -08:00
Joshua Haberman
5ef010cb85 Fixed spelling errors in comments. 2022-01-23 16:13:12 -08:00
Joshua Haberman
012c8892ab Added utf8_range. 2022-01-21 21:01:07 -08:00
Joshua Haberman
79951dac84 Added changelog entries. 2022-01-21 20:25:32 -08:00
Joshua Haberman
90065d39a7 Fixed crash bug with proto2 enums. 2022-01-21 20:18:11 -08:00
Joshua Haberman
706ed2d17a Added utf8_range.c as a source file. 2022-01-21 17:32:34 -08:00
Joshua Haberman
c153dd9bf7 Updated to new upb APIs. 2022-01-21 15:46:56 -08:00
Gregor Jasny
e554bd6cbf
Use constexpr for FieldTypeClass (#9434)
Otherwise in C++20 / VisualStudio 2022 the following warning is emitted:

```
warning C5054: operator '*': deprecated between enumerations of different types
```
2022-01-21 15:38:59 -08:00
Joshua Haberman
f41049a0f0 Updated upb. 2022-01-21 14:41:25 -08:00
deannagarcia
a03ff9c3e8
Merge pull request #9428 from protocolbuffers/kotlinBazelTests
Migrate kotlin bazel tests from kt_jvm_test
2022-01-21 10:44:37 -08:00
deannagarcia
86bb6f9de0
Merge pull request #9429 from protocolbuffers/deannagarcia-patch-2
Update location of llvm-ar in bazel toolchain
2022-01-21 10:44:04 -08:00
deannagarcia
70131e0495
Update location of llvm-ar in bazel toolchain
Change the location of the llvm-ar tool to match the new docker container.
2022-01-20 14:31:53 -08:00
Deanna Garcia
6e8b0dfcbf Switch to java_test 2022-01-20 22:24:59 +00:00
Gergely Nagy
639551d445 Disable [[clang::musttail]] attribute on Windows x86 (#9421) 2022-01-18 19:15:32 +01:00
deannagarcia
41e22cde8d
Merge pull request #9408 from protocolbuffers/kotlinBazelTests
Adding kotlin bazel tests
2022-01-13 16:05:09 -08:00
Deanna Garcia
a784e515e1 fix pom errors 2022-01-13 22:50:11 +00:00
Deanna Garcia
58d22b8cac Add new files to makefile 2022-01-13 00:49:22 +00:00
Deanna Garcia
01f09b3425 Fixing bazel build failure 2022-01-13 00:29:28 +00:00
Deanna Garcia
7924cd6726 Addressing comments 2022-01-13 00:10:23 +00:00
Deanna Garcia
ab7cf573ab Remove unfinished release work and make names consistent 2022-01-12 21:58:46 +00:00
Deanna Garcia
dfd99e7ec0 Adding kotlin bazel tests 2022-01-12 21:54:30 +00:00
Elliotte Rusty Harold
c160ae52a9
remove Proto2MessageLiteInfoFactory and Proto3MessageLiteInfoFactory (#9407)
* remove Proto2MessageLiteInfoFactory.java=
* remove Proto3MessageLiteInfoFactory.java
2022-01-12 20:31:20 +00:00
Amin Vakil
f96050a05d
Add $(nproc) to make documentation (#9360) 2022-01-12 12:13:13 -08:00
Adam Cozzette
b3093dce58
Update CHANGES.txt to include recent Java security advisory (#9403) 2022-01-11 15:36:56 -08:00
Adam Cozzette
24a801287f
Merge pull request #9402 from acozzette/merge-3.19.x
Merge 3.19.x into master
2022-01-11 13:31:59 -08:00
Adam Cozzette
5bb34e9930 Merge branch '3.19.x' into merge-3.19.x 2022-01-11 18:07:17 +00:00
Adam Cozzette
49b184b163
Revert "Standardize on Array copyOf" (#9400)
This reverts commit 935d099ad9 from PR #9162.

While the original commit was a nice simplification, I learned from
another Googler that there is unfortunately a performance cost to this
(or at least there was last time this change was attempted). Even if it
turns out to be fast on modern Java runtimes, we still care about the
performance on old Android devices.
2022-01-11 08:47:10 -08:00
Adam Cozzette
cc7b1b5323 Update protobuf version 2022-01-10 18:08:15 -08:00
Adam Cozzette
ee432e55b8 Update CHANGES.txt for 3.19.3
The 3.19.2 release was supposed to fix the missing Python 3.10 wheel for
Windows, but this turned out to need some more fixes. This commit
updates CHANGES.txt to reflect that this fix will happen in 3.19.3
instead of 3.19.2.
2022-01-10 18:08:15 -08:00
Adam Cozzette
203c593b96 Fix build error with Python 3.10 build on Windows
The Windows build for Python 3.10 is giving us an error about ssize_t
being undefined, so this commit fixes the problem by replacing it with
Py_ssize_t, which is consistent with what we do elsewhere in the file.
2022-01-10 16:55:04 -08:00
Adam Cozzette
922a7ec189 Fix Python 3.10 C++ tests (#9128)
The first change is to make sure we always define PY_SSIZE_T_CLEAN
before including Python.h. Starting from Python 3.10 this is required.
Otherwise we get errors like this:

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The second change is to update reflection_test.py to account for the
fact that with Python 3.10, we get a TypeError even with the C++
implementation when trying to assign a float to a bool field. I'm not
sure why this changed with Python 3.10, but it seems like a good thing
since this is the desired behavior anyway.
2022-01-10 16:55:04 -08:00
Gregory Haskins
3d995aaf98
Update protojure link (#9389) 2022-01-09 15:14:18 +00:00