Commit Graph

4236 Commits

Author SHA1 Message Date
Julien Brianceau
e3da722b66 Fix #include in cc files 2016-12-09 09:34:07 +01:00
Feng Xiao
243ebec887 Merge pull request #2468 from sergei-ivanov/patch-1
Update third_party.md
2016-12-08 18:54:14 -08:00
Paul Yang
d8f54c4206 Disable jruby test. (#2469)
Missed in #2467.
2016-12-08 16:27:56 -08:00
Sergei Ivanov
09dc933932 Update third_party.md
Updated the location for `protobuf-maven-plugin`
2016-12-09 00:01:11 +00:00
Paul Yang
e3e38b81cc Update commit id in Dockerfile to trigger update. (#2467) 2016-12-08 14:39:20 -08:00
Feng Xiao
4474c042c0 Merge pull request #2462 from jbrianceau/fix-comp-builds-part2
C++: export _xxx_default_instance_ symbols
2016-12-08 11:23:36 -08:00
Feng Xiao
6b4eee408b Merge pull request #2461 from jbrianceau/add-missing-include-in-embed-cc
Add missing include in embed.cc
2016-12-08 11:22:39 -08:00
Feng Xiao
34a1b6e6b8 Merge pull request #2394 from cwelton/formatting
oneOf fix for JsonFormat includingDefaultValueFields
2016-12-08 11:17:10 -08:00
Paul Yang
46ae90dc5e Make php generated code conform to PSR-4. (#2435)
1. Generate single file for each message.
2. Lazily initiate metadata.
2016-12-08 11:16:49 -08:00
Thomas Van Lenten
631f4618a7 Merge pull request #2466 from thomasvl/deprecation_followup
Improve ObjC deprecated annotation support.
2016-12-08 14:02:32 -05:00
Feng Xiao
4c84b474d1 Merge pull request #2460 from sergiocampama/c11
Include -std=c++11 when compiling protobuf if available.
2016-12-08 10:49:13 -08:00
Thomas Van Lenten
dad775b798 Improve ObjC deprecated annotation support.
- Check the parent file options for deprecation when deciding to tag Messages
  and Enums as deprecated.
- Within the generated source push/pop the warning for implementing deprecated
  things around a deprecated class implementation.
- Annotate the methods generated for extension fields as deprecated.
- Add a testing .proto file that covers deprecated fields, messages, enums,
  enum values and compile it into the unittests to confirm things compile
  cleanly.
- Add a testing .proto file that uses the file level option to make everything
  deprecated and compile it into the unittests to confirm things compile
  cleanly.
2016-12-08 12:12:50 -05:00
Julien Brianceau
e219be7440 Regenerate descriptor proto 2016-12-08 13:46:32 +01:00
Julien Brianceau
b1295eeffb C++: export _xxx_default_instance_ symbols
_xxx_default_instance_ symbols are used in inline functions. We have
to export them to avoid undefined reference link errors.
2016-12-08 13:28:11 +01:00
Julien Brianceau
867dbac820 Add missing include in embed.cc
This changes fixes "use of undeclared identifier 'assert'"
compilation error.
2016-12-08 10:06:56 +01:00
Adam Cozzette
c836ad4dc7 Merge pull request #2459 from acozzette/android-logging
Send all protobuf logging to logcat by default on Android
2016-12-07 15:41:48 -08:00
Sergio Campama
1d91c2588c Include -std=c++11 when compiling protobuf if available. 2016-12-07 17:59:42 -05:00
Adam Cozzette
2f29f0ae09 Send all protobuf logging to logcat by default on Android
Currently the default for protobuf on Android is to silently drop all log
messages. This makes debugging difficult because things like GOOGLE_LOG(FATAL)
will crash the process without actually logging a useful error.

This CL changes the logging so that by default we send messages for all log
levels to logcat (and stderr). Users can override this by setting
GOOGLE_PROTOBUF_MIN_LOG_LEVEL. Also, that option was not being respected for
non-Android platforms so I went ahead and fixed that to make things consistent.
2016-12-07 14:34:37 -08:00
Joshua Haberman
057389cae3 Ruby: removed redundant RepeatedField#slice. (#2449) 2016-12-07 13:39:09 -08:00
Feng Xiao
850d573aca Merge pull request #2407 from jbrianceau/fix-comp-builds
Export symbols used in inline functions
2016-12-07 13:34:31 -08:00
Julien Brianceau
788d14a46b Export symbols used in inline functions
fixed_address_empty_string symbol is used in an inline function.
We have to export it to avoid undefined reference link errors.
2016-12-07 22:04:14 +01:00
Feng Xiao
607b921499 Merge pull request #2437 from xfxyjwf/plugin
Add version number to plugin protocol.
2016-12-06 11:07:10 -08:00
Caleb Welton
1a56251a35 oneOf fix for JsonFormat includingDefaultValueFields 2016-12-05 18:01:20 -08:00
Feng Xiao
ced8f73ffc Add version number to plugin protocol. 2016-12-05 17:44:39 -08:00
Feng Xiao
0509072614 Merge pull request #2445 from ramrunner/master
OpenBSD correct endianess handling
2016-12-05 17:27:50 -08:00
Jisi Liu
c664b66808 Merge pull request #2442 from pherl/fix-bazel
Add missing files.
2016-12-05 17:21:44 -08:00
ramrunner
4cc160e196 when on OpenBSD we include the correct headers for endianess and check the apropriate defines 2016-12-05 16:58:58 -07:00
Jisi Liu
f92b455aa6 Add missing files. 2016-12-05 10:16:47 -08:00
Joshua Haberman
f1ce60e7b4 Factored Conformance and Benchmark test messages into shared test schema. (#1971)
* Factored Conformance test messages into shared test schema.

* Updated benchmarks to use new proto3 message locations.

* Fixed include path.

* Conformance: fixed include of Python test messages.

* Make maven in Rakefile use --batch-mode.

* Revert changes to benchmarks.

On second thought I think a separate schema for
CPU benchmarking makes sense.

* Try regenerating C# protos for new test protos.

* Removed benchmark messages from test proto.

* Added Jon Skeet's fixes for C#.

* Removed duplicate/old test messages C# file.

* C# fixes for test schema move.

* Fixed C# to use the correct TestAllTypes message.

* Fixes for Objective C test schema move.

* Added missing EXTRA_DIST file.
2016-12-03 11:51:25 -05:00
Feng Xiao
4280c27403 Merge pull request #2436 from cgrushko/patch-1
Add a proto_lang_toolchain() for cc_proto_library
2016-12-02 16:57:44 -08:00
cgrushko
45d92aea27 Add a proto_lang_toolchain() for cc_proto_library
Bazel's built-in cc_proto_library rule uses a proto_lang_toolchain to learn how to invoke proto-compiler.
To use Bazel's cc_proto_library, add the following to your project's WORKSPACE file:

local_repository(
  name = "com_google_protobuf_cc",
  path = "/path/to/protobuf-distribution/"
)
2016-12-02 19:40:50 -05:00
Feng Xiao
6b60dddb88 Merge pull request #2431 from saintstack/2228v2
Change CodedInputStream#DEFAULT_SIZE_LIMIT from 64MB to
2016-12-02 10:58:21 -08:00
Michael Stack
7550bcd89f Change CodedInputStream#DEFAULT_SIZE_LIMIT from 64MB to
Integer.MAX_SIZE (0x7FFFFFF) #2228

M java/core/src/main/java/com/google/protobuf/CodedInputStream.java
 Set DEFAULT_SIZE_LIMIT to Integer.MAX_SIZE (Was 64MB). This is how it was
 in pre-2.7.0 pb. Changed size check to an overflow-conscious test (as it
 is later in tryRefillBuffer (making sizeLimit a long was to disruptive).

M java/core/src/test/java/com/google/protobuf/CodedInputStreamTest.java
 Add two tests that echo tests recently added over in c++ to test parse
 of message sizes that are approach and are beyond the size limit.
2016-12-01 20:18:31 -08:00
Paul Yang
f8ca3acd29 Generate phpdoc in php generated files. (#2406) 2016-12-01 14:50:53 -08:00
Thomas Van Lenten
851cb81ddd Merge pull request #2429 from thomasvl/issue1833_swift_prefix
Add a swift_prefix file option.
2016-11-30 17:06:18 -05:00
Thomas Van Lenten
f813bd9f8f Add a swift_prefix file option.
Swift generators should default to CamelCasing the proto package and prefixing
symbols with that, but this option allows developers to override that behavior
with something custom if they desire.

Fixes https://github.com/google/protobuf/issues/1833
2016-11-30 13:48:16 -05:00
Adam Cozzette
39f9b43219 Merge pull request #2403 from google/down-integrate-with-msvc-fix
Integrated internal changes from Google
2016-11-23 11:26:31 -08:00
Adam Cozzette
65479cb7b1 Fixed Ruby tests for JRuby 1.7
This makes a couple of changes to fix the tests for JRuby 1.7:
- Avoid using assert_false since that assertion seems not to exist in
  older versions
- Disable a test related to respond_to? for JRuby. It's hard to tell
  what is going wrong here but it looks like probably a JRuby bug that
  has been fixed in more recent versions.
2016-11-23 08:57:27 -08:00
Adam Cozzette
259dd7e842 Updated descriptor_pool.py to be compatible with Python 3
In Python 3 the values() method on a dictionary returns a view instead
of a list, so we need to explicitly convert that to a list.
2016-11-22 16:55:43 -08:00
Adam Cozzette
db35fe735a Add a "u" suffix to tag numbers in generated code
This seems to be necessary to prevent warnings in some compiler
configurations, particularly for tag numbers that are too large to fit
in a signed 32-bit int.
2016-11-22 16:23:55 -08:00
Adam Cozzette
a7f300d6ff Fixed descriptor_pool_test.py for Python 2.6
The curly brace syntax for sets was introduced in Python 2.7, and so for
compatibility with 2.6 we need to avoid using it for now.
2016-11-22 15:14:05 -08:00
Feng Xiao
c950471563 Merge pull request #2404 from wiktortomczak/master
Support grpc plugin in py_proto_library
2016-11-22 11:36:17 -08:00
Wiktor Tomczak
0fa31b2bfa Support grpc plugin in py_proto_library 2016-11-22 20:21:10 +01:00
Adam Cozzette
a41090ee6b Updated failure_list_java.txt for Java conformance test
A new test is now passing and so we can remove it from the failure
whitelist.
2016-11-22 10:31:12 -08:00
Adam Cozzette
72002d8898 Merge pull request #2400 from acozzette/jspb-test-fixes
Fixed JSPB test failures
2016-11-22 08:48:41 -08:00
Adam Cozzette
fda876a149 Added back in binary serialization round-trip in message_test.js 2016-11-21 12:14:42 -08:00
Feng Xiao
b7632464b4 Merge pull request #2398 from jbrianceau/no-static-init-define-fix
C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
2016-11-21 12:05:58 -08:00
Feng Xiao
04bd614711 Merge pull request #2392 from xfxyjwf/fixdown
Restore jenkins files.
2016-11-21 10:32:25 -08:00
Adam Cozzette
40f3586412 Fixed remaining JSPB test failures 2016-11-21 09:19:22 -08:00
Adam Cozzette
315350b2fa Updated message_test.js so that it does not depend on fromObject 2016-11-21 09:08:23 -08:00