Commit graph

4635 commits

Author SHA1 Message Date
Adam Cozzette
e9c15d601e Ensure that for Java, imports of .proto files with empty packages works
This fixes a compiler bug that caused a Java syntax error when one .proto file
would import another one with an empty package and java_package. This fixes
issue #3114.
2017-06-02 13:45:57 -07:00
Wayne Zhang
d6470abef1 not to use std::random_device for map.Seed(). (#3133)
* not to use std::random_device for map.Seed().

* remove include random
2017-05-30 11:18:23 -07:00
Adam Cozzette
e222997c5b Merge pull request #3149 from KarrokDC/master
Add headers as part of cmake project generation
2017-05-30 09:27:21 -07:00
Paul Yang
1e86ef4e9f Oneof field should be serialized even it's equal to default. (#3153) 2017-05-29 22:04:20 -07:00
Paul Yang
282fb9e68e Add ARRAY for reserved name (#3150) 2017-05-29 15:30:47 -07:00
Brent Shaffer
4d5daf4ef9 Adds fluent setters for PHP (#3130) 2017-05-29 10:39:14 -07:00
Dennis Cappendijk
4eb02fe31e Add headers as part of cmake project
tested only on windows with visual studio 2015 as generator
2017-05-29 17:34:08 +02:00
Adam Cozzette
4674cc7c07 Merge pull request #3113 from phst/master
Improve fix for https://github.com/google/protobuf/issues/295
2017-05-26 09:50:18 -07:00
John Brock
95749d5af6 update csharp README and fix .NET 3.5 build error 2017-05-25 20:20:31 +01:00
Jon Skeet
0b07d7eb9e Add IncludeSource in csproj as per review comments 2017-05-24 09:07:33 +01:00
Jon Skeet
f26e8c2ae0 Convert C# projects to MSBuild (csproj) format
This has one important packaging change: the netstandard version now
depends (implicitly) on netstandard1.6.1 rather than on individual
packages. This is the preferred style of dependency, and shouldn't
affect any users - see http://stackoverflow.com/questions/42946951
for details.

The tests are still NUnit, but NUnit doesn't support "dotnet test"
yet; the test project is now an executable using NUnitLite. (When
NUnit supports dotnet test, we can adapt to it.)

Note that the project will now only work in Visual Studio 2017 (and
Visual Studio Code, and from the command line with the .NET Core
1.0.0 SDK); Visual Studio 2015 does *not* support this project file
format.
2017-05-24 09:07:33 +01:00
brian-peloton
40da1ed572 Removing undefined behavior and compiler warnings (#1315)
* Comment out unused arguments.

These last few are all that's needed to compile with -Wunused-arguments.

* Fix missing struct field initializer.

With this fix, everything compiles with -Wmissing-field-initializers.

* Add support for disabling unaligned memory accesses on x86 too.

ubsan doesn't like these because they are technically undefined
behavior, so -DGOOGLE_PROTOBUF_DONT_USE_UNALIGNED will disable them easily.

* Avoid undefined integer overflow.

ubsan catches all of these.
2017-05-23 16:22:57 -07:00
Feng Xiao
ba987a7e2d Merge pull request #3126 from mbrukman/fix-readme-formatting
Fix Markdown formatting in README.
2017-05-23 14:04:08 -07:00
Feng Xiao
c5125f371d Merge pull request #3117 from KarrokDC/master
Show help if protoc is called without any arguments
2017-05-23 13:39:56 -07:00
Thomas Van Lenten
d2c1865374 Merge pull request #3103 from sergiocampama/perf
Adds serial and parallel parsing tests.
2017-05-23 15:14:08 -04:00
Sergio Campama
2465ae7e23 Adds serial and parallel parsing tests to check if parallel parsing is faster than serial parsing, which it should 2017-05-23 11:04:35 -04:00
Misha Brukman
677557009c Fix Markdown formatting in README.
Fix indentation to enable code formatting for sample command lines to set them
visually apart from the surrounding text, and make it easy to copy-paste.

Add code formatting for env vars, paths, binary and library names for
readability.

Hide URLs behind text for readability and conciseness.
2017-05-23 10:39:40 -04:00
Philipp Stephani
979107ec7a Improve fix for https://github.com/google/protobuf/issues/295
Requiring the legacy ‘cl’ library unconditionally pollutes the namespace.
Instead, require it only when compiling and in known-broken versions.

This is almost the same patch that opoplawski suggested, except that I removed
the test for ‘emacs-repository-version’, which isn’t defined in Emacs 24.3.
2017-05-23 15:27:29 +02:00
Dennis Cappendijk
3b227611d5 show help if protoc is called without any arguments, pre-empts -h and --help to show a useful message instead of just 'Missing input file.' 2017-05-22 16:21:48 +02:00
Thomas Van Lenten
8546620610 Merge pull request #3104 from thomasvl/ext_registry_copy
Fix ExtensionRegistry copying and add tests.
2017-05-17 15:05:20 -04:00
Thomas Van Lenten
49e4ba6098 Fix ExtensionRegistry copying and add tests.
- Fix up -copyWithZone: to not leave the two registries sharing
  some of the storage by using -addExtensions:.
- Improve -addExtensions: to clone the sub dict when there is
  nothing to merge into.
- A ExtensionRegistry unittests.
- Update project schemes to not have extra things in perf scheme.
2017-05-17 14:51:02 -04:00
Joshua Haberman
b28617b813 Merge pull request #2815 from devwout/ruby_json_emit_defaults
Ruby version optionally emits default values in JSON encoding.
2017-05-15 08:05:27 -07:00
Feng Xiao
455b61c6b0 Merge pull request #3062 from Oppen/master
Workaround gcc < 4.5.0 bug
2017-05-08 11:19:02 -07:00
Paul Yang
25abd7b7e7 Add compatibility test for php. (#3041)
* Add compatibility test for php.

* Revert API incompatible change.
2017-05-05 11:14:11 -07:00
Mario J. Rugiero
cd0efc0024 Workaround gcc < 4.5.0 bug
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
2017-05-05 14:02:49 -03:00
Adam Cozzette
483396068d Merge pull request #3043 from acozzette/javascript
Removed mention of Buffer in byteSourceToUint8Array
2017-05-04 12:21:14 -07:00
Adam Cozzette
f00e06c95b Removed mention of Buffer in byteSourceToUint8Array
The Closure compiler complains about Buffer since that class exists only
in Node. That logic does not seem to be needed (unit tests and conformance
tests pass without it), so let's just remove it to solve the problem.
2017-05-02 17:25:54 -07:00
Adam Cozzette
a64497c709 Merge pull request #2873 from myitcv/fix_1562
Javascript: use goog.crypt.byteArrayToString instead of String.fromCharCode.apply
2017-05-02 16:57:34 -07:00
Paul Jolly
bcb3506641 Fix #1562 by using goog.crypt.byteArrayToString instead of String.fromCharCode.apply 2017-05-02 13:40:42 +01:00
Adam Cozzette
2f4489a3e5 Merge pull request #3024 from acozzette/merge-3.3-to-master
Merged 3.3.x branch to master
2017-05-01 10:58:38 -07:00
makdharma
286f059842 added "objectivec" build target (#3033)
This target will be used by gRPC iOS bazel build system.
2017-05-01 09:49:26 -07:00
Adam Cozzette
9053033a50 Merge remote-tracking branch 'remotes/google/3.3.x' into merge-3.3-to-master 2017-04-27 14:55:53 -07:00
Adam Cozzette
067b1eec3b Merge pull request #3023 from acozzette/min
Fully qualify min as std::min in wire_format_lite.cc
2017-04-27 13:56:27 -07:00
Adam Cozzette
07c284f86c Fully qualify min as std::min in wire_format_lite.cc 2017-04-27 11:35:59 -07:00
Paul Yang
a6189acd18 Add prefix to enum value with reserved name. (#3020) 2017-04-26 16:32:21 -07:00
Adam Cozzette
cbd08cb7d1 Merge pull request #3018 from acozzette/using-namespace-std
Remove "using namespace std" from stubs/common.h
2017-04-26 13:56:24 -07:00
Feng Xiao
54d1701f6c Merge pull request #3015 from buchgr/unused-consts
Remove unused constants.
2017-04-26 11:09:42 -07:00
Adam Cozzette
7c76ac1735 Remove "using namespace std" from stubs/common.h
This prevents the contents of the std namespace from being effectively
pulled into the top-level namespace in all translation units that
include common.h. I left in individual using statements for a few common
things like std::set and std::map, because it did not seem worth going
through the churn of updating the whole codebase to fix those right now.
2017-04-26 08:25:01 -07:00
Paul Yang
3c0855e94a Add a test case for nested enum, which was missed previously. (#3010) 2017-04-25 10:47:09 -07:00
Jakob Buchgraber
b1c75bc742 Remove unused constants.
When compiling with -Werror, -Wunused-const-variable the build fails due
to those two constants not being used.
2017-04-25 12:49:00 +02:00
Feng Xiao
4920e27a48 Merge pull request #3008 from postmasters/patch-1
Add a link to dart-lang/protobuf
2017-04-24 13:09:48 -07:00
Paul Yang
fba2acd72e Add nested enum descriptor in php rumtime. (#3009) 2017-04-24 12:40:37 -07:00
Paul Yang
e64b618b21 Update php version number to 3.3.0 (#3001) 2017-04-24 09:24:43 -07:00
postmasters
4777574a6c Add a link to dart-lang/protobuf 2017-04-24 08:46:56 -07:00
Paul Yang
6fff091c49 Throw exception when parsing invalid data. (#3000) 2017-04-21 15:00:00 -07:00
Feng Xiao
f418b9e3eb Merge pull request #2996 from xfxyjwf/3.3.x
Fix python3 issue.
2017-04-20 17:32:48 -07:00
Paul Yang
4523c9c233 Allow proto files to import descriptor.proto (#2995)
descriptor.proto uses proto2 syntax, which is not ready for external
usage. However, some proto3 files import descriptor.proto and cannot be
used. In this PR, all references (We cheated by only removing
extensions, which is enough for now. User should avoid using messages
defined in descriptor.proto as field type.) to content in
descriptor.proto are removed from generated files. Those that import
descriptor.proto can be used like other proto files.
2017-04-20 16:55:56 -07:00
Feng Xiao
478119fe77 Fix python3 issue. 2017-04-20 16:30:26 -07:00
Feng Xiao
14afc3fd41 Merge pull request #2992 from xiaogaozi/patch-1
Add gogoprotobuf to third-party add-ons list
2017-04-20 11:12:02 -07:00
Changjian Gao
f85eecb585 Add gogoprotobuf to third-party add-ons list 2017-04-20 19:53:11 +08:00