Commit Graph

7844 Commits

Author SHA1 Message Date
Joshua Haberman
a28af654fa Removed obsolete TSRMLS_* usage. (#7731) 2020-08-07 14:44:49 -07:00
Joshua Haberman
5f32d484c1 Updated minimum required version for C extension to 7.0. (#7730) 2020-08-07 14:44:49 -07:00
Joshua Haberman
ad5a215359 Added proto3 presence support for PHP (#7724)
* WIP.

* Added proto3 presence support for PHP.

* Added compatibility code for old generated code.
2020-08-07 14:44:49 -07:00
Jon Skeet
0d90ff3d72 Fix C# optional field reflection when there are regular fields too
Previous tests didn't spot this as each message was either "all
optional" or "all non-optional", at which point there isn't a problem.
2020-08-07 14:44:49 -07:00
Adam Cozzette
ff92cee10b Fixed release.sh and setup.py for Python
Newer versions of virtualenv lack the --no-site-packages option, so I
had to remove it to keep the release.sh script working. I read that this
option has already been the default for a long time, so removing it
shouldn't chany any behavior.

For the setup.py script, I was getting some errors about the bdist_wheel
argument to setup.py, but I was able to fix that by adding 'wheel' to
setup_requires.
2020-08-07 14:44:49 -07:00
Adam Cozzette
6b3a834f33 Temporarily disabled ExtensionRegistryFactoryTest
This test has started failing, and I believe the cause is a change in
class loading behavior in Java 11. As far as I know, that breaks the
test logic but there is nothing wrong with the non-test code. This
change temporarily disables the test so that we can unblock the 4.0
release while I work on a more permanent fix.
2020-08-07 14:44:49 -07:00
Joshua Haberman
0a5b969733 Updated CHANGES.txt to reference the new version 3.13.0-rc1. 2020-08-07 14:44:49 -07:00
Jan Tattermusch
79b118235d Update CHANGES.txt with the C# parsing / serialization overhaul (#7710) 2020-08-07 14:44:49 -07:00
David L. Jones
0f9ae07fe0 Override pip and virtualenv installation for macOS. (#7704)
This commit cleans up our environment setup for macOS builds.

-  Always use `python -m {pip | virtualenv}` form of commands.
-  Only upgrade in-place, and never use `--ignore-installed`.
-  Use latest tox on macos, and test 3.6 on macos presubmit.

These changes ensure that multibuilder won't break the system-installed Python on the Kokoro macOS builder, and thus won't resolve the ancient system version. For Tox, make sure we test with Python 3.6 (the version of Python in current macOS).
2020-08-07 14:44:49 -07:00
Adam Cozzette
8940150706 Updated version to 3.13.0-rc1. 2020-08-07 14:44:49 -07:00
yohei yoshimuta
36d39a0266
Add parser and linter libraries to third party docs (#6474)
* Add Protobuf parser and linter

* chore: Add some third-party tools
2020-08-05 14:40:51 -07:00
Andrew Jennings
92e3d3e02a Disable ESLint and TypeScript on JS protobuf file
I was getting TypeScript errors on the generated protobuf file.

These directives to turn off ESLint and TypeScript are just comments. They shouldn't affect anyone who is not using ESLint or TypeScript.

A similar change was made in the grpc/grpc-web project: https://github.com/grpc/grpc-web/pull/752
2020-07-27 10:42:22 -07:00
Jon Godbout
8e09396ba1 Update third_party.md
Common Lisp: 
http://github.com/ndantam/s-protobuf  hasn't been updated in 5 years, and hasn't had a real update in 8.
http://github.com/qitab/cl-protobuf is the one used internally and maintained by Googlers (third_party/lisp/cl-protobufs) though I don't know
how to or if I should express that.
2020-07-27 10:21:56 -07:00
Yannic Bonenberger
6b1d0f1149 Add objectivec/BUILD to objectivec_EXTRA_DIST files 2020-07-20 16:51:30 -07:00
Yannic Bonenberger
8b93b8eae5 [bazel] Move Objective-C runtime into //objectivec
Removing language-specific targets from the top-level BUILD file
will allow users to keep their workspaces smaller and easier to
maintain by not depending on language rules they don't need.

Similar work was done for Java in #7190.
2020-07-20 16:51:30 -07:00
Mark Barolak
711db1d764 Qualify uses of std::string within protobuf/compiler/ruby/... 2020-07-20 12:09:25 -07:00
Roberto Cosenza
8c91d71f69 Adding forgotten duration.proto to the lite library 2020-07-20 10:09:31 -07:00
Peter Newman
fc8e2e871d Fix a typo 2020-07-20 09:02:36 -07:00
Jon Skeet
d4ec70fdd3 Fix C# optional field reflection when there are regular fields too
Previous tests didn't spot this as each message was either "all
optional" or "all non-optional", at which point there isn't a problem.
2020-07-14 08:01:05 +01:00
Bas van der Linden
4c1bb4d07b Remove newline 2020-07-12 15:16:33 +02:00
Bas van der Linden
12d7976055 Added test for ByteString.CopyFrom(ReadOnlySpan<byte> bytes) 2020-07-12 15:12:18 +02:00
Bas van der Linden
ead45182aa annotate ByteString.CopyFrom(ReadOnlySpan<byte> bytes) as SecuritySafeCritical 2020-07-12 14:43:42 +02:00
Joshua Haberman
6ba52411d0 Sync from Piper @320514613
PROTOBUF_SYNC_PIPER
2020-07-09 18:17:47 -07:00
Joshua Haberman
ffb2b53834
Remove old PHP extension (#7695)
* Removed references to legacy class names from generated code.

* Removed old PHP extension in favor of new extension. This drops PHP5 compat.

* Updated failure lists for things fixed by the new extension.

* Updated Makefile.am for new file list.

* Fix distcheck.
2020-07-09 11:06:24 -07:00
David Grayston
c02ded7a57
Fix GPBUtil::getFullClassName() argument order (#7629) 2020-07-07 13:37:46 -07:00
Jan Tattermusch
96a62f7cc7
Merge pull request #7644 from JamesNK/jamesnk/parsestring-multisegment
Optimize reading strings across segments
2020-07-07 10:44:07 +02:00
Yuriy Chernyshov
c535d54da3 Do not use ADL when transforming string to lowercase 2020-07-06 16:41:21 -07:00
Joshua Haberman
25755efc4f Sync from Piper @319848517
PROTOBUF_SYNC_PIPER
2020-07-06 13:54:50 -07:00
3ks
86b3ccf28c change go's runtime 2020-07-01 16:46:14 -07:00
Yannic
cdc7fe8f05 [bazel] Use proto_library targets to exclude WKPs from code-gen
This prepares protobuf for a future release of Bazel which will make
`ProtoInfo` mandatory for `proto_lang_toolchain.blacklisted_protos`.
2020-07-01 13:46:50 -07:00
James Newton-King
e36163deed
PR feedback 2020-07-01 20:32:29 +12:00
James Newton-King
d4abad8731
Optimize reading strings across segments 2020-07-01 20:32:29 +12:00
Jan Tattermusch
62cf7c6096
Merge pull request #7658 from jtattermusch/csharp_benchmark_improvements
C# write benchmark improvements
2020-07-01 09:02:07 +02:00
Jan Tattermusch
45c8850389 use BinaryPrimitives.WriteUInt64LittleEndian 2020-07-01 07:52:02 +02:00
Jan Tattermusch
1cf4df00cf C# benchmark improvements 2020-07-01 07:52:02 +02:00
Jan Tattermusch
93b38972fb
Merge pull request #7669 from jtattermusch/csharp_sdk_31
upgrade dotnet SDK in the CI to 3.1
2020-07-01 07:49:21 +02:00
Jan Tattermusch
fed7e18193 upgrade dotnet SDK in the CI to 3.1 2020-06-30 08:53:31 -04:00
Jan Tattermusch
d4c5992352
Merge pull request #7666 from jskeet/fix-csharp-build
Fix C# build by regenerating test protos
2020-06-30 08:33:46 +02:00
Jon Skeet
13d712533e Fix C# build by regenerating test protos 2020-06-30 06:52:58 +01:00
Joshua Haberman
aaf84cb10f
Bugfix for when message constructor has no argument. (#7660)
This fixes the user issue: https://github.com/protocolbuffers/protobuf/issues/7611#issuecomment-647025031
2020-06-29 10:31:20 -07:00
Jon Skeet
2c1a46101b Add tests for NullValue not appearing in a oneof at all 2020-06-29 09:30:20 +01:00
Jon Skeet
0dd5fffba3 Fix JSON parsing and formatting of NullValue in C#
The NullValue enum is typically used as part of the Value well-known type, but can be used elsewhere. In previous code, a NullValue field (other than in Value) would result in a JSON value of the string "NULL_VALUE"; it should instead be the null literal.
When parsing, we still accept "NULL_VALUE" as a valid value for NullValue - this new code being unable to parse old data, and comes for free anyway.
2020-06-29 09:30:20 +01:00
Jan Tattermusch
206b973afd
Merge pull request #7576 from jtattermusch/protobuf_buffer_serialization
New Span-based serialization logic (followup for #7351)
2020-06-29 09:26:25 +02:00
Joshua Haberman
093faebcdb
New PHP C Extension based on upb_msg (#7614)
* Added code for the new PHP extension.

* Removed a bunch of unused variables shown by compiler warnings.

* Test protobuf2 in the tests.

* Updated upb version to fix a goldenfile test.

* Added pure-PHP changes. Extension now passes all tests.

* Enabled protobuf2 for all C extension tests.

* Fixed pure=PHP lib: full names no longer start with '.'.

* Added files for new extension to Makefile.am.

* Downgraded make-preload.py to python 2, since python3 isn't available in the php_all Kokoro image.

* Disable tests of new C extension with PHP 5.x.

* Also do not compile the extension for PHP5.

* Accept version 5.*.*, and use /usr/bin/python.

* Addressed PR comments.

* Addressed PR comments.

* Added "const" to a parameter and fixed a memory leak seen in Valgrind.

* Stop testing the C extension for PHP5.

The next release of protobuf will deprecate the C extension
for PHP5, see:
https://github.com/protocolbuffers/protobuf/issues/7525

* Made the PHP5.6 Mac test only exercise pure-PHP.

* Build protoc for PHP 5.6 test.

* Rewrote bundling script in PHP to avoid dependency on Python.

* A few more fixes.

* Fixed int32/int64 behavior for 32-bit builds.

* Match more PHP versions in testing script.

* Use phpize --clean before building extension.

* Force-delete configure.in to avoid phpize problems cross-version.

* Delete both configure.ac and configure.in.
2020-06-25 12:21:01 -07:00
Jan Tattermusch
4f0afc7852 optimize WriteRawTag 2020-06-23 20:17:33 +02:00
Jan Tattermusch
2f16981638 optimize WriteVarint64 2020-06-23 17:38:40 +02:00
Jan Tattermusch
9d53fadcac optimize WriteVarint32 2020-06-23 17:23:21 +02:00
Jan Tattermusch
9ca0877db1 optimize WriteRawBytes 2020-06-23 16:55:43 +02:00
Jan Tattermusch
80780bdffa optimize WriteRawByte 2020-06-23 16:53:05 +02:00
Jan Tattermusch
6afd469fe0 optimize WriteFixed32 and WriteFixed64 2020-06-23 16:46:01 +02:00