Commit Graph

7860 Commits

Author SHA1 Message Date
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
Jan Tattermusch
17a4b181a0 optimize WriteString 2020-06-23 16:31:29 +02:00
Jan Tattermusch
d3557cab21 WriteFloat improvements 2020-06-23 16:25:49 +02:00
Jan Tattermusch
1f56e5e2a4 remove AggressiveInlining attribute from WritingPrimitives.cs 2020-06-23 15:40:39 +02:00
June
2b7b7f7f72 Only disallow directories as input files 2020-06-22 16:45:03 -07:00
June
727e6e4e60 correct the way of testing file mode on Windows 2020-06-22 16:45:03 -07:00
June
b9f94f7bf5 Fix #5858
provide clear message when specifying a directory as an input file
2020-06-22 16:45:03 -07:00
Yue Zhu
582558a589 Add imenu index support 2020-06-19 10:42:31 -07:00
Alexandre Hamez
2676f4dcc5 Add third-party Elixir library 2020-06-19 10:38:58 -07:00
Ron Klein
a076adc20f documentation: fix path for fetching submodules 2020-06-19 10:37:28 -07:00
Joshua Haberman
dfab275eca Sync from Piper @317197168
PROTOBUF_SYNC_PIPER
2020-06-18 15:47:49 -07:00
Joshua Haberman
367f3d831e
Merge pull request #7630 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2020-06-15 13:40:45 -07:00
Joshua Haberman
435952c537 Added changelog entry for FieldMaskUtil.java. 2020-06-15 12:20:14 -07:00
Joshua Haberman
c7da7e937c CHANGES.txt entries for the Piper sync. 2020-06-15 12:14:22 -07:00
Joshua Haberman
f47e9345a9 Merge branch 'sync-piper' into sync-stage 2020-06-15 12:03:54 -07:00
Joshua Haberman
f77065d4eb Sync from Piper @316511779
PROTOBUF_SYNC_PIPER
2020-06-15 11:48:47 -07:00
Jan Tattermusch
468c3ba8c6 Speed up writing of messages with many fields 2020-06-12 11:34:42 +02:00
Jan Tattermusch
9d6969bec4 Merge remote-tracking branch 'upstream/master' into protobuf_buffer_serialization 2020-06-11 16:40:27 +02:00
Jan Tattermusch
e967fac23a update Makefile.am 2020-06-11 09:30:21 +02:00
Jan Tattermusch
6a69690464 basic version of WriteMessagesBenchmark 2020-06-11 09:28:25 +02:00
Jon Skeet
1dae8fdd62 Add support for proto2 JSON parsing in C# conformance tests 2020-06-11 06:43:29 +01:00
Jon Skeet
ff70af6cfc Changes how JSON formatting works for fields supporting presence
Fixes #7486.

Note that this changes the behavior for message fields where
"WithFormatDefaultValues(true)" has been specified. This is
effectively fixing a bug, but will need to be noted in the release
notes.

Basically, FormatDefaultValues only affects fields that don't
support presence - most commonly, singular primitive non-optional
fields in proto3.
2020-06-11 06:43:29 +01:00
Jan Tattermusch
2350e90a85 add new C# files to Makefile.am 2020-06-10 16:58:22 +02:00
Joshua Haberman
f1ce8663ac
De-duplicated code to generate PHP protos and install phpunit. (#7605)
* De-duplicated code to generate PHP protos and install phpunit.

* Removed all references to generate_php_test_proto.

* Replaced with internal_build_cpp.

* Make Timestamp::__construct() static to avoid conflicts with MongoDB.

* Replicated PHPUnit versions and added new script to Makefile.am.

* Fixed filename in Makefile.am.

* Disabled test that SEGV's on macOS.

* Removed extraneous "set -e".

* Make sure generate_protos.sh happens on every test path.

* Removed stray '$' chars.

* Added proper support for aggregate_metadata tests. But now I get a stack overflow.

Stack overflow:
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16

namespace GPBMetadata\Proto;

class TestDescriptors
{
    public static $is_initialized = false;

    public static function initOnce() {
        $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
        if (static::$is_initialized == true) {
          return;
        }
        \GPBMetadata\Proto\TestDescriptors::initOnce();
        $pool->internalAddGeneratedFile(hex2bin(
            ""
        ), true);
        static::$is_initialized = true;
    }
}

* Fixed and verified metadata aggregation testing.
2020-06-09 15:40:29 -07:00
Thomas Van Lenten
9f546ba61b ObjC Support a runtime import override.
Option to add a prefix to generated #imports incase ObjC Protos are
used in a build system where one wants to avoid adding a header
search path and have more complete imports.
2020-06-09 13:05:50 -04:00
Jan Tattermusch
549dc9a412 optimize writing fixed32 and fixed64, fix benchmark 2020-06-09 17:59:32 +02:00
Jan Tattermusch
5eec497d3b fix C# CompatibilityTests 2020-06-09 16:43:24 +02:00
Thomas Van Lenten
ce8b7af46b Update the brew workflow
- Remove the `brew install`; the kokoro image already has it, just
  update/upgrade instead.
- Remove `prune`, logs had:
    """
    Error: Unknown command: prune
    """
- Remove `uninstall`, logs had:
    """
    Error: Refusing to uninstall /usr/local/Cellar/cmake/3.16.4 and /usr/local/Cellar/icu4c/64.2
    because they are required by ceres-solver, ffmpeg, harfbuzz, libass and opencv, which are currently installed.
    You can override this and force removal with:
      brew uninstall --ignore-dependencies node icu4c cmake wget
    """
- Skip installing some things since they are already in the base image, logs
  had:
    """
    Warning: gflags 2.2.2 is already installed and up-to-date
    To reinstall 2.2.2, run `brew reinstall gflags`
    Warning: openssl@1.1 1.1.1g is already installed and up-to-date
    To reinstall 1.1.1g, run `brew reinstall openssl@1.1`
    Warning: pcre 8.44 is already installed and up-to-date
    To reinstall 8.44, run `brew reinstall pcre`
    """
- Don't install gpg gpg2 as gnupg is already installed, also use gpg instead of
  gpg2 for commands (and update the commands), logs had:
    """
    kokoro/macos/prepare_build_macos_rc: line 44: gpg2: command not found
    kokoro/macos/prepare_build_macos_rc: line 45: gpg2: command not found
    """
- Add env guards to control all the option installs and only request them be
  installed in the cases that need it.  This avoids having to install/update
  the things like ruby when some other tool only needed in some configs is
  install differently and could have conflicts.
- Switch to brew for cocoapods to avoid compat issues on the supporting
  libraries.
2020-06-09 09:57:17 -04:00
Bart Hertog
2655a0aa0f Added Embedded Proto to third_party.md. 2020-06-08 11:12:51 -07:00
Jan Tattermusch
e346fde63b remove commented out code 2020-06-08 17:19:19 +02:00
Jan Tattermusch
c06812b0b2 address a few TODOs 2020-06-08 17:13:15 +02:00
Jan Tattermusch
19c0d73fb9 test WriteContext writing with multiple flushes 2020-06-08 17:03:51 +02:00
Jan Tattermusch
53708e2f15 test writing to a stackalloc buffer 2020-06-08 17:03:03 +02:00
Jan Tattermusch
e14a5c8fe6 address a few TODOs 2020-06-08 16:23:33 +02:00
Jan Tattermusch
43dcee2fa9 remove some todos 2020-06-08 15:54:01 +02:00