Commit Graph

7844 Commits

Author SHA1 Message Date
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
Jan Tattermusch
3375e251f9 optimize writing non-ascii strings 2020-06-08 15:38:36 +02:00
Jan Tattermusch
3dad187707 add benchmark for writing of NonAsciiStrings 2020-06-08 12:25:19 +02:00
Jan Tattermusch
8a2d5884bf address review comments 2020-06-08 11:19:57 +02:00
Jan Tattermusch
daada70233
Merge pull request #7596 from jtattermusch/safe_span_accessors
annotate ByteString.Span and ByteString.Memory as SecuritySafeCritical
2020-06-08 07:56:50 +02:00
Anton Kast
4d6712e739
Enable experimental presence detection in JS. (#7592)
Co-authored-by: David L. Jones <dlj@google.com>
2020-06-05 16:39:02 -07:00
Thomas Van Lenten
c6c8bab9e2 Move runtime import writing into a helper.
File and ImportWriter duplicated the logic, so move it to a helper (on
ImportWriter), and share the impl instead of duplicating it since it
includes some conditional logic around Framework based import support.
2020-06-05 16:23:30 -04:00
Thomas Van Lenten
57be643a36 Now that the paths are the same, use one ivar to track the values.
This changes when we moved the WKTs to the root of the runtime package.
2020-06-05 16:23:30 -04:00
Jan Tattermusch
a296413b5a optimize WriteFloat 2020-06-05 14:41:07 +02:00
Jan Tattermusch
886c263a3c initial version of write benchmarks 2020-06-05 14:41:07 +02:00
Jan Tattermusch
a6d1ed1712 annotate ByteString.Span and ByteString.Memory as SecuritySafeCritical 2020-06-03 17:09:03 +02:00
Jan Tattermusch
b2c94974b2 remove a TODO 2020-06-03 17:05:21 +02:00
Jan Tattermusch
56372898cf test writing with different blocksizes 2020-06-03 16:58:02 +02:00
Jan Tattermusch
f9f92a6dd2 increase test coverage 2020-06-03 16:26:05 +02:00
Jan Tattermusch
94e64f2c0b a bit more cleanup 2020-06-03 16:12:16 +02:00
Jan Tattermusch
ba61d76e52 simplify serialization to single span 2020-06-03 15:54:29 +02:00
Jan Tattermusch
b3cdba1cfd increase test coverage 2020-06-03 15:50:07 +02:00