Commit Graph

4322 Commits

Author SHA1 Message Date
Sergio Campama
3d7b42d1a6 Adds nullability modifiers to resolve Xcode 8.3 warnings 2017-01-25 11:58:17 -05:00
Adam Cozzette
0aa5af3e68 Merge pull request #2614 from acozzette/gzip-output-stream-options
Set LIBPROTOBUF_EXPORT on GzipOutputStream::Options
2017-01-23 09:51:29 -08:00
Adam Cozzette
a101fa5289 Set LIBPROTOBUF_EXPORT on GzipOutputStream::Options
This fixes issue #2610.
2017-01-20 15:39:34 -08:00
Jon Skeet
047575f20c Support custom options in C#
This consists of:
- Changing the codegen for the fixed set of options protos, to parse unknown fields instead of skipping them
- Add a new CustomOptions type in the C# support library
- Expose CustomOptions properties from the immutable proto wrappers in the support library

Only single-value options are currently supported, and fetching options values requires getting the type right
and knowing the field number. Both of these can be addressed at a later time.

Fixes #2143, at least as a first pass.
2017-01-19 06:46:04 +00:00
Thomas Van Lenten
eed9951991 Merge pull request #2591 from thomasvl/objc_timestamps_take2
Timestamp helper fix, Duration helper cleanup.
2017-01-17 10:10:17 -05:00
Thomas Van Lenten
d0bc096b4a Timestamp helper fix, Duration helper cleanup.
- The Timestamp proto does not allow for negative nanos fields, so the seconds
  must be shifted and a positive nanos then applied.
- Tweak the helpers on Duration to make it clear there is no "base" time
  involved.
- Update the unittests for duration and timestamp to cover positive and
  negative NSTimeIntervals and what their impact is on the protos.
2017-01-12 19:33:25 -05:00
Thomas Van Lenten
c9cd6acd71 Merge pull request #2587 from google/revert-2586-objc_timestamp
Revert "Fix Timestamps with dates before the Unix epoch that contain fractional seconds."
2017-01-12 16:01:12 -05:00
Thomas Van Lenten
1651342501 Revert "Fix Timestamps with dates before the Unix epoch that contain fractional seconds." 2017-01-12 16:00:13 -05:00
Thomas Van Lenten
cf477d46ca Merge pull request #2586 from thomasvl/objc_timestamp
Fix Timestamps with dates before the Unix epoch that contain fractional seconds.
2017-01-12 15:50:59 -05:00
Thomas Van Lenten
adcccd0f81 Fix Timestamps with dates before the Unix epoch that contain fractional seconds.
The Timestamp proto does not allow for negative nanos fields, so the seconds must be shifted and
a positive nanos then applied.
2017-01-12 15:46:50 -05:00
Feng Xiao
feb78fb293 Merge pull request #2584 from cgrushko/patch-2
Add a proto_lang_toolchain for Java
2017-01-12 10:55:27 -08:00
cgrushko
e4baf3f58a Add a proto_lang_toolchain for Java
This allows easy use of Bazel's java_proto_library native rule.
2017-01-12 12:51:04 -05:00
Adam Cozzette
e53dd99350 Merge pull request #2529 from wackoisgod/master
Class deprecation support
2017-01-12 08:32:36 -08:00
Andrew Spiering
75ac3973ef Fixing code formatting issues 2017-01-11 11:18:53 -08:00
Andrew Spiering
effcb132e1 Merge branch 'master' of https://github.com/wackoisgod/protobuf 2017-01-11 10:52:21 -08:00
Adam Cozzette
228d242c58 Merge pull request #2567 from acozzette/distcheck-fix
Fixed "make distcheck" for the Autotools build
2017-01-10 12:54:06 -08:00
Jon Skeet
fb71df9f0b Add ByteString.FromStream and ByteString.FromStreamAsync in C#
Fixes #2088.

We now have separate tests for netcoreapp and net45 to test the two branches here.
(netstandard10 doesn't have MemoryStream.GetBuffer)

Although most of this library doesn't have any async functionality,
this feels like a natural place to locally add it.
2017-01-10 13:05:27 +00:00
Jon Skeet
e76d91a9d1 Add global.json file to pick dotnet core SDK version. 2017-01-10 13:05:27 +00:00
Adam Cozzette
0bdf4a617f Fixed "make distcheck" for the Autotools build
To make the test pass I needed to fix out-of-tree builds and update
EXTRA_DIST and CLEANFILES.
2017-01-09 09:38:14 -08:00
Sufir
2bddffc993 PHP fix int64 decoding (#2516)
* fix int64 decoding

* fix int64 decoding + tests
2017-01-08 11:50:50 -08:00
Marcus Longmuir
2c16f6979a Fix generation of extending nested messages in JavaScript (#2439)
* Fix generation of extending nested messages in JavaScript

* Added missing test8.proto to build
2017-01-06 16:59:47 -08:00
Joshua Haberman
ffa71f8007 A few more cases for binary conformance tests. (#2500)
* A few more cases for binary conformance tests.

* over-encoded varints (encoded in more bytes than are necessary).
* truncated varints (>32 bits for 32-bit types).

* Fixed Python decoding bug with 32-bit varints.

* Fixed 1L -> 1LL for 32-bit platforms.
2017-01-06 16:58:21 -08:00
Adam Cozzette
1041710fce Merge pull request #2565 from acozzette/cross-compilation
Fixed cross compilations with the Autotools build
2017-01-05 15:28:37 -08:00
Thomas Van Lenten
24f0d5691e Merge pull request #2563 from thomasvl/autocreator_tweaks
Minor fix for autocreated object repeated fields and maps.
2017-01-05 10:26:22 -05:00
Thomas Van Lenten
988ffe0a78 Minor fix for autocreated object repeated fields and maps.
- If setting/clearing a repeated field/map that was objects, check the class
  before checking the autocreator.
- Just to be paranoid, don’t mutate within copy/mutableCopy for the autocreated
  classes to ensure there is less chance of issues if someone does something
  really crazy threading wise.
- Some more tests for the internal AutocreatedArray/AutocreatedDictionary
  classes to ensure things are working as expected.
- Add Xcode 8.2 to the full_mac_build.sh supported list.
2017-01-05 09:15:40 -05:00
Adam Cozzette
2deb139bc9 Merge pull request #2544 from tiziano88/master
Add link to Elm proto plugin
2017-01-04 16:09:41 -08:00
Adam Cozzette
17a8a7619a Merge pull request #2536 from jbrianceau/fix-js-embed-include-style
Fix include in auto-generated well_known_types_embed.cc
2017-01-04 15:08:41 -08:00
Adam Cozzette
c55175cb9f Merge pull request #2564 from acozzette/arena-nc
Removed arena_nc.cc and arena_nc_test.py
2017-01-04 14:17:28 -08:00
Adam Cozzette
a59205215a Removed arena_nc.cc and arena_nc_test.py
This test is undocumented and it looks like it has probably never
worked. Let's just remove it to tidy things up. This fixes issue #2515.
2017-01-04 13:57:11 -08:00
Adam Cozzette
b40d318650 Fixed cross compilations with the Autotools build
Pull request #2517 caused cross compilations to start failing, because
the js_embed binary was being built to run on the target platform
instead of on the build machine. This change updates the Autotools build
to use the AX_PROG_CXX_FOR_BUILD macro to find a suitable compiler for
the build machine and always use that when building js_embed.
2017-01-03 13:14:39 -08:00
NicklasWallgren
4cb113a91b Fixed issue with autoloading - Invalid paths (#2538) 2016-12-28 13:33:36 -08:00
Tiziano Santoro
30250cde5e Add link to Elm proto plugin 2016-12-28 01:02:12 +00:00
Feng Xiao
5f65ee6ac7 Merge pull request #2542 from jbrianceau/fix-embed-cc-warning
Fix warning in compiler/js/embed.cc
2016-12-27 11:00:46 -08:00
Julien Brianceau
4455cdf7ee Fix include in auto-generated well_known_types_embed.cc
Restore include style fix (e3da722) that has been trampled by
auto-generation of well_known_types_embed.cc
2016-12-27 11:50:46 +01:00
Julien Brianceau
05b019aedc Fix warning in compiler/js/embed.cc
embed.cc: In function ‘std::string CEscape(const string&)’:
embed.cc:51:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < str.size(); ++i) {
                                ^
2016-12-27 09:59:52 +01:00
Adam Cozzette
f52e188fe4 Merge pull request #2523 from jbrianceau/init-index-in-metadata
Init index_in_metadata_ without condition
2016-12-22 12:56:08 -08:00
Feng Xiao
137dc026cf Merge pull request #2525 from camillol/lite
Eliminate redundant methods in C++ generated code for lite protos
2016-12-22 00:27:02 -08:00
Camillo Lugaresi
abe172564e simpler, cheaper callback to LazyStringOutputStream 2016-12-21 20:46:42 -08:00
Camillo Lugaresi
4e229c8b5c add MethodResultCallback_0_0 2016-12-21 20:46:42 -08:00
Julien Brianceau
15a15e336b Init index_in_metadata_ without condition
Chromium MemorySanitizer (MSan) reports use-of-uninitialized-value
of index_in_metadata_ attribute from EnumGenerator class. Fix these
warnings by initializing these attributes without condition.
2016-12-21 22:48:58 +01:00
Andrew Spiering
6c021b3d5f Added the support for class level deprecation which will in turn also deprecate any fields that are currently using that type 2016-12-21 13:29:06 -08:00
Adam Cozzette
d948b66d4f Merge pull request #2521 from acozzette/fix-bazel
Added Bazel genrule for generating well_known_types_embed.cc
2016-12-21 07:21:14 -08:00
Adam Cozzette
5731ca5af0 Added well_known_types_embed.cc to CLEANFILES so that it gets cleaned up 2016-12-20 15:47:51 -08:00
Adam Cozzette
ee0a24346e Updated Makefile.am to fix out-of-tree builds 2016-12-20 15:47:51 -08:00
Adam Cozzette
d1e7bd9842 Added Bazel genrule for generating well_known_types_embed.cc
In pull request #2517 I made this change for the CMake and autotools
builds but forgot to do it for the Bazel build.
2016-12-20 09:08:19 -08:00
Adam Cozzette
cdc2766a5d Merge pull request #2506 from ckennelly/rvalue-setters
Add rvalue setters for non-arena strings on C++11.
2016-12-19 16:51:43 -08:00
Adam Cozzette
bb2c6b21a0 Merge pull request #2505 from ckennelly/master
Remove spurious NULL checks in ArenaStringPtr::CreateInstance.
2016-12-19 16:18:45 -08:00
Adam Cozzette
fb15862bac Merge pull request #2517 from acozzette/js-embed
Auto-generate well_known_types_embed.cc
2016-12-19 14:49:11 -08:00
Adam Cozzette
98d89d4277 Fixed "make check" for cmake build
The check target did not depend on the test_plugin binary, so this would
cause "make check" to fail at times because of the absence of
test_plugin. This change adds a dependency on test_plugin so that it
will always get built before the tests are executed.
2016-12-19 14:38:21 -08:00
Adam Cozzette
1b3a0c16e6 Auto-generate well_known_types_embed.cc
Until now this file was just checked into the repo, but actually it
should be generated from any.js, struct.js, and timestamp.js. This
change updates the build system to make this happen. To make it work I
also had to remove some C++11 features from embed.cc.
2016-12-19 14:38:21 -08:00