Commit Graph

5454 Commits

Author SHA1 Message Date
Felix Jendrusch
38508e9bbb Add test for failing write of raw pointer to output stream 2018-03-08 16:20:05 +01:00
Paul Yang
a48d58df96
Convert descriptortype to type for upb_msgval_sizeof (#4357) 2018-03-06 15:07:05 -08:00
Paul Yang
0f4ad85740
For encoding upb needs descriptor type instead of type. (#4354) 2018-03-06 13:30:03 -08:00
Adam Cozzette
55d07586e9
Merge pull request #4355 from acozzette/typo
PHP: fixed typo in message.c
2018-03-05 15:39:08 -08:00
Adam Cozzette
5004d09ff0 PHP: fixed typo in message.c 2018-03-05 14:25:42 -08:00
Feng Xiao
9dc0a4d5cf
Merge pull request #4183 from pcc/win-libcxx
Add support for libc++ on Windows.
2018-02-26 15:07:55 -08:00
Feng Xiao
325ecff086
Merge pull request #4333 from jmillikin/update-file-lists-needs-bash
`update_file_lists.sh` depends on Bash features, thus needs Bash sebang.
2018-02-26 12:18:48 -08:00
Feng Xiao
32db4d375f
Merge pull request #4334 from jmillikin/blacklist-internal-proto-srcs
Blacklist all WELL_KNOWN_PROTOS from Bazel C++ code generation.
2018-02-26 10:45:14 -08:00
Feng Xiao
3aaed9698d
Merge pull request #4195 from alexey-malov/IgnoreUnknownEnumsInJson
Adds an option in C++ JSON parser to ignore unrecognized enum values
2018-02-26 10:42:31 -08:00
Jisi Liu
bb40c0c0c4
Merge pull request #4291 from google/3.5.x
Merge 3.5.x to master
2018-02-26 10:05:09 -08:00
John Millikin
350b135e23 Blacklist all WELL_KNOWN_PROTOS from Bazel C++ code generation.
This prevents the Bazel `CcProtoAspect` from generating and linking
C++ object code for these files. Without this blacklist, symbols for
protobuf types depended on by `libprotobuf` may be defined multiple
times and violate the ODR rule.

Fixes https://github.com/google/protobuf/issues/4311
2018-02-24 11:36:49 -08:00
John Millikin
724f0be33d Move compiler/plugin.pb.cc to libprotobuf with the other WKT sources.
This lets all values of `WELL_KNOWN_PROTOS` be treated the same with
regard to Bazel's protobuf blacklisting.
2018-02-24 11:34:40 -08:00
John Millikin
2e4c52a096 update_file_lists.sh depends on Bash features, thus needs Bash sebang.
I noticed that running this script as `./update_file_lists.sh` on MacOS
was corrupting `cmake/extract_includes.bat.in`. Forcing the shell to
Bash fixes the generated file output.
2018-02-24 11:30:10 -08:00
Feng Xiao
a6037c5230
Merge pull request #4324 from abdul-sami/master
Added instruction for existing ZLIB configuration
2018-02-22 15:33:27 -08:00
Abdul Sami
ac021a02a6
Merge pull request #1 from abdul-sami/abdul-sami-patch-1
Added instruction for existing ZLIB configuration
2018-02-21 12:18:37 +05:00
Abdul Sami
fe33c5fe9d
Added instruction for existing ZLIB configuration
Using two configuration flags `DZLIB_INCLUDE_DIR` and `DZLIB_LIB` we can locate an existing ZLIB on the system
2018-02-21 12:17:55 +05:00
Feng Xiao
177108aa8a
Merge pull request #4323 from dtapuska/master
Rename a shadowed variable.
2018-02-20 14:49:34 -08:00
Dave Tapuska
af3813cd73 Rename a shadowed variable.
Shadowed variables can cause readability issues. Ensure a shadowed
variable isn't used in header files which may be used in a dependent
project that explicitly disables them.
2018-02-20 17:16:33 -05:00
Feng Xiao
0475607fd6
Merge pull request #3186 from gkelly/remove-unused-variable
Remove unused output_file variable from js_embed
2018-02-20 13:11:45 -08:00
Alexey Malov
02452db725 The JsonParseOptions::ignore_unknown_fields option behavior treats
unrecognized string values in enum fields as default ones.
2018-02-12 14:07:40 +03:00
Jie Luo
e34ec6077a
Only check filenames when end with .py in _CalledFromGeneratedFile() (#4262)
* Cython's stack does not have .py file name. Only check filenames when end with .py for _CalledFromGeneratedFile()
2018-02-09 15:54:03 -08:00
Yilun Chong
96b535cc2f
Merge pull request #4302 from BSBandme/down_integ_benchmark
Sync internal benchmark changes
2018-02-09 12:36:35 -08:00
Yilun Chong
6cd4ec4972 Sync internal benchmark changes 2018-02-09 11:47:00 -08:00
Thomas Van Lenten
4da7706d74 Remove stray indent on normal imports. 2018-02-08 15:51:17 -05:00
Feng Xiao
b8e47830d4
Merge pull request #4288 from nico/nofall
Remove use of GOOGLE_FALLTHROUGH_INTENDED from protobuf.
2018-02-08 10:53:41 -08:00
Thomas Van Lenten
07f023188e Fix up the docs to mention the WKTs generated files also.
Fixes #4277
2018-02-07 10:41:21 -05:00
Nico Weber
c66dd6c276 Remove use of GOOGLE_FALLTHROUGH_INTENDED from protobuf.
Chrome is running into two issues with the use of this macro
in open-source protobuf (https://crbug.com/809157):

1. GOOGLE_FALLTHROUGH_INTENDED is defined to nothing on __APPLE__
   platforms, which blocks us from enabling -Wimplicit-fallthrough
   on Mac and iOS. (We use a hermetic self-built modern clang,
   so whatever Xcode bug that exclusion might be for doesn't apply
   to us.)

2. It's in a public header file, and it's included in a public header file.
   When clang suggests adding [[clang::fallthrough]], it checks if it knows of
   a macro expanding to that and if so, suggests inserting that. Since lots of
   chrome code includes protobuf headers, it often suggests inserting
   GOOGLE_FALLTHROUGH_INTENDED (from protobuf) instead of the correct
   FALLTHROUGH (from chrome's base).

Since the fallthrough doens't do anyting useful, just remove it.
Long ago, this might have had perf impact, but d64a2d9941 added a
parsing fast path that calls this switch as slow fallback, so it should
be off the hot path nowadays.

No intended behavior change.

This is the public version of internal change 184824132.
2018-02-07 08:55:36 -05:00
Feng Xiao
82e0231607
Merge pull request #4259 from Mizux/master
Various CMake Update
2018-02-02 11:47:31 -08:00
Feng Xiao
5dad7cce19
Merge pull request #4257 from davido/support_java9
Bazel: Support building with Java 9
2018-02-01 15:11:56 -08:00
Yilun Chong
9717d6fa17
Merge pull request #4265 from BSBandme/upgrade_benchmark_submodule
Upgrade benchmark submodule
2018-02-01 13:50:45 -08:00
Corentin Le Molgat
1ec9beb477 Use NEW behaviour for project VERSION variables.
cf https://cmake.org/cmake/help/latest/policy/CMP0048.html#policy:CMP0048
2018-02-01 20:31:50 +01:00
Corentin Le Molgat
8dd0f4e557 Even with MSVC enable zlib support as default behaviour. 2018-02-01 20:31:36 +01:00
Corentin Le Molgat
f7a05844eb Add CMake ALIAS targets
We follow the findProtobuf.cmake naming convention
to ease the use of protobuf as cmake subproject
2018-02-01 20:31:36 +01:00
Corentin Le Molgat
3bc0282fb6 Add VERSION property to CMake library targets 2018-02-01 20:31:36 +01:00
Yilun Chong
7f1491506c upgrade submodule 2018-02-01 11:11:00 -08:00
Jisi Liu
4e2bd9e656
Merge pull request #4266 from brunokim/patch-1
Fix link markup in third party list.
2018-02-01 09:41:51 -08:00
Bruno Kim Medeiros Cesar
0d397a1756
Fix link markup in third party list. 2018-02-01 02:08:51 -02:00
Adam Cozzette
6456e5d646
Merge pull request #4239 from mrpi/master
Create std::string in Arena memory
2018-01-31 14:31:58 -08:00
David Ostrovsky
85b488f7fa Bazel: Support building with Java 9
Fixes: #4256.

Bazel@HEAD supports Java 9.

The current code has one single issue with Java 9 compliance: the usage
of sun.misc package. We add jdk.unsupported module with --add-modules
compiler option for now. Long term, the usage of non public API should
be avoided.

To build with Java 9, build custom bazel version and issue:

  $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk build \
    --javacopt='--release 9' \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \
   :protobuf_java
2018-01-31 23:12:04 +01:00
Thomas Van Lenten
cf016a42e6 Work around strange error with atomic and swift under Xcode 8.3.3.
Haven't been able to make a repo case, but this should "fix" the problem
by avoid it completely.

- Move readOnlySemaphore_ into the .m file so it isn't exposed in any
  header.
- Move GPBGetObjectIvarWithField() also to go with the new limited
  visibility on the readOnlySemaphore_.
2018-01-31 16:57:53 -05:00
Thomas Van Lenten
d570d48648 Don't assume c-strings are 4 byte aligned.
The Undefined Behavior sanitizer flags one part of the unittests for this.
For default values for `bytes` we write a length on the front of a c-string
in the static data, apparently the compiler/linker doesn't always make this
4 byte aligned, so it get flagged for undefined/degraded performance. Avoid
this by using memcpy instead.
2018-01-31 15:40:22 -05:00
Thomas Van Lenten
d83837ded5 Fix to use "nil" instead of "NULL" for objc objects. 2018-01-31 14:24:51 -05:00
Thomas Van Lenten
81aeed082e Work around the static analyzer false report. 2018-01-31 14:24:51 -05:00
Thomas Van Lenten
953adb16ff Add casts to removed undefined behaviors around shifts.
Fixes #4246
Fixes #4247
2018-01-31 12:36:54 -05:00
Feng Xiao
b718551571
Merge pull request #4249 from nlochschmidt/patch-1
Propose kotlinx.serialization as 3rd party lib
2018-01-30 13:39:15 -08:00
Thomas Van Lenten
204a6413d6 Move kokoro macOS builds to to Xcode 9.1. 2018-01-30 15:10:11 -05:00
Ludger Sprenker
14e8852fe4
Fix -fpermissive: '<::' cannot begin a template-argument list
'<:' is an alternate spelling for '['.
2018-01-30 18:14:49 +01:00
Niklas Lochschmidt
69b1fdcd60
Propose kotlinx.serialization as 3rd party lib
Has support for protobuf v2.
2018-01-30 13:58:56 +01:00
Jisi Liu
25a90e82ff
Merge pull request #3825 from ras0219-msft/patch-1
Add Vcpkg to C++ installation instructions for Windows
2018-01-29 19:29:55 -08:00
Robert Schumacher
aaf41c600d Add Vcpkg to C++ installation instructions for Windows
Fixes issue #1154 by noting that `vcpkg` contains protobuf. Potential improvements: also remark how to use `vcpkg` to get dependencies when building from source via CMake.
2018-01-29 17:29:54 -08:00