Commit Graph

625 Commits

Author SHA1 Message Date
Jon Skeet
aa59eaa77b Introduce a compatiblity shim to support .NET 3.5 delegate creation 2018-03-27 08:42:27 +01:00
Jon Skeet
8ba420f040 Change C# reflection to avoid using expression trees
This should work on Unity, Mono and .NET 3.5 as far as I'm aware.
It won't work on platforms where reflection itself is prohibited,
but that's a non-starter basically.
2018-03-27 08:42:26 +01:00
Adam Cozzette
ed4321d1cb
Merge pull request #4387 from acozzette/down-integrate
Integrated internal changes from Google
2018-03-20 16:14:32 -07:00
Feng Xiao
88a4884b55
Merge pull request #4345 from jskeet/list-json-null
Allow null value in JSON representation of ListValue
2018-03-20 15:19:42 -07:00
Adam Cozzette
b1216d95db Updated checked-in generated code 2018-03-14 11:17:06 -07:00
Jon Skeet
822b924d59 Allow list values to be null when parsing 2018-03-01 13:20:40 +00:00
ObsidianMinor
e823897005 Updated NUnit packages, removed NUnitLite added packages for dotnet and Visual Studio, changed dotnet command in buildall to dotnet test, and deleted Program.cs (because it's no longer required). 2018-02-06 12:59:20 -06:00
John Brock
864df890a7 Remove 64MB memory limit when deserializing messages in C#
Increased `CodedInputStream.DefaultSizeLimit` to `Int32.MaxValue` to make it consistent with the Java implementation.
2018-01-31 14:08:02 -08:00
Jon Skeet
0c52335587 Update .NET SDK to 2.0.3
This will allow SourceLink as per #4179, and mean that we can use C#
7.0 language features in the library (but not in generated code).
This does not affect which platforms we're *targeting*, so end users
won't see any difference.

It would be nice to update to 2.1.4, but AppVeyor's "Visual Studio
2017" environment is only 2.0.3.
2018-01-25 19:42:15 +00:00
Jon Skeet
47b7d2c7ca Add DiscardUnknownFields support for C#
By default, unknown fields are preserved when parsing. To discard
them, use a parser configured to do so:

var parser = MyMessage.Parser.WithDiscardUnknownFields(true);
2018-01-15 02:53:45 -05:00
Jisi Liu
383a4941d5 Merge remote-tracking branch 'origin/3.5.x' into master 2018-01-03 09:28:40 -08:00
Jisi Liu
d106399d39
Merge pull request #4072 from google/jieluo
Cherrypick for csharp, including:
2017-12-19 17:45:56 -08:00
Jie Luo
b308580bb1 Cherrypick for csharp, including:
Add preserve UnknownFields
Compare floating point values bitwise
Add auto-generated header to C# generated files
2017-12-19 15:38:02 -08:00
Jisi Liu
050fc9a437 Update version number to 3.5.1 2017-12-19 11:00:33 -08:00
Jan Tattermusch
426cf6f31e Add auto-generated header to C# generated files (#4038)
* Add auto-generated header to C# generated files

* regenerate C# protos
2017-12-13 14:36:29 -08:00
Jie Luo
bfd254e14f
Add unknown field support for csharp (#3936)
Add unknown field support for csharp
2017-12-13 13:48:58 -08:00
Feng Xiao
75eceb8424 Update generated code. 2017-12-12 14:57:34 -08:00
Jon Skeet
31c54d1289 Regenerated code from previous C# codegen commit
With this in place, all tests should pass.

Fixes #3725.
2017-12-09 09:49:24 +00:00
Jon Skeet
f3e9a65d75 Compare floating point values bitwise in C#
This is the manual code part of the Google.Protobuf library, and tests.
Some tests will fail until codegen is changed and rerun.
2017-12-09 09:49:24 +00:00
Adam Cozzette
0ba8eea655 Merge branch 'master' into down-integrate 2017-12-01 10:05:19 -08:00
Adam Cozzette
92a7e778e7 Integrated internal changes from Google 2017-12-01 10:05:10 -08:00
Adam Cozzette
a27da09339 Merge branch '3.5.x' into 3.5.x-merge 2017-11-30 13:34:51 -08:00
Jie Luo
6d6099553b
Update csharp version number (#3958) 2017-11-29 16:10:44 -08:00
Jon Skeet
74f64b667c Fix JsonTokenizer exception message 2017-11-29 07:14:57 +00:00
Jon Skeet
91ff83c024 Remove non-C# options from C#-only test protos 2017-11-14 07:31:59 +00:00
Jon Skeet
8cf53f8dfc MMinor fix-ups to C# tests from changes in earlier commits 2017-11-12 15:29:15 +00:00
Jon Skeet
b5cdf0eac6 Regenerated test code for C# 2017-11-12 15:29:15 +00:00
Jon Skeet
aa77eab622 Move C#-only test protos to csharp/protos
unittest_proto3 had been changed in a very backward-incompatible
way which was never going to work with C# as it imports proto2 messages.

This is now a copy of the old file, but with a package name change for
compatibility with the remaining files in src/google/protobuf.

The other moves are for files that are only used by C#.
2017-11-12 15:29:15 +00:00
Jan Tattermusch
5f96191459 ParseFrom<T> for array slice is missing 2017-11-10 09:01:32 +01:00
Jan Tattermusch
4a5e1bd043 check already performed by MergeFrom 2017-11-10 09:01:07 +01:00
Jan Tattermusch
435f61102b allow message parsing from an array slice 2017-11-10 09:00:52 +01:00
Jan Tattermusch
30b6e54327 ParseFrom<T> for array slice is missing 2017-11-09 18:33:15 +01:00
Jan Tattermusch
07542e78da check already performed by MergeFrom 2017-11-09 18:27:45 +01:00
Jan Tattermusch
0c874a6a19 allow message parsing from an array slice 2017-11-09 14:23:14 +01:00
Jisi Liu
97dd175a91 Update version number to 3.5.0 2017-11-02 14:16:22 -07:00
Jon Skeet
cbe250591f Fix merging with message-valued oneof
If messages A and B have the same oneof case, which is a message
type, and we merge B into A, those sub-messages should be merged.

Fixes #3200.

Note that I haven't regenerated all the code, as some of the protos
have been changed, breaking generation.
2017-10-31 17:11:40 -07:00
xuwei-k
05b56d01c1 update joda-time javadoc url 2017-10-30 17:48:54 +09:00
Jon Skeet
e8c9ae1209 Add parser settings WithXyz methods 2017-10-28 07:47:43 +01:00
Jon Skeet
a985451253 Add JsonParser setting to ignore unknown field values
Note that the default behavior is still to throw an exception; you
need to opt into ignoring unknown fields.

Fixes #2838.
2017-10-28 07:47:43 +01:00
Jisi Liu
ecf2957106 Update descriptor protos 2017-10-18 14:21:22 -07:00
Jisi Liu
de15e73d58 Merge remote-tracking branch 'origin/3.4.x' into master 2017-10-11 14:44:03 -07:00
Jisi Liu
dba647a6b2 Bump version for minor release 2017-09-14 11:12:55 -07:00
Adam Cozzette
13fd045dbb Integrated internal changes from Google 2017-09-14 10:03:57 -07:00
Jan Tattermusch
5de05654aa Google.Protobuf should target net45 2017-09-12 11:56:34 +02:00
Feng Xiao
49b31dc5f7 Update C# generated file for addressbook.proto 2017-09-11 14:43:14 -07:00
Jan Tattermusch
50a64759dd Google.Protobuf should target net45 2017-09-05 17:59:03 +02:00
Paul Yang
2807436cd8 change the field number of php_generic_service to fix the conflict with (#3576)
internal descriptor.proto
2017-08-30 16:50:07 -07:00
Jisi Liu
139775ccc0 Merge remote-tracking branch 'origin/3.4.x' into mergemaster 2017-08-18 16:25:35 -07:00
Jon Skeet
e0d24cc84a Detect invalid tags with a field number of 0 in C#
Previously we only rejected the tag if the tag itself was 0, i.e.
field=0, type=varint. The type doesn't matter: field 0 is always
invalid.

This removes the last of the C# conformance failures.
2017-08-11 19:33:53 +01:00
Bo Yang
8f4b8e430a Merge branch 'master' into 3.4.x 2017-08-05 10:42:29 -07:00
Jisi Liu
6c64f11778 Bump csharp version 2017-08-02 13:20:13 -07:00
Thomas Van Lenten
9a4692d8af Update the comment on the message_type to cover what it should be. 2017-07-26 17:07:01 -04:00
Jisi Liu
759245a49a Merge from master 2017-07-25 11:52:33 -07:00
Jisi Liu
7bb39bef1a Update version number for 3.4.0 2017-07-24 16:03:49 -07:00
Yilun Chong
a713b73076 Merge pull request #3281 from BSBandme/ConformanceTestYilunChong
Proto2 test message support to conformance test
2017-07-24 14:50:52 -07:00
Paul Yang
50aa4febaf Merge pull request #3375 from TeBoring/3.3.x
Merge 3.3.x into master
2017-07-19 06:58:05 -07:00
Jisi Liu
3af881c7e2 Merge master into 3.4.x 2017-07-18 16:26:16 -07:00
Jisi Liu
86975301f1 Update csharp and php descriptor 2017-07-18 15:44:24 -07:00
Bo Yang
6ec0b7e4d1 Merge 3.3.x into master 2017-07-18 11:06:16 -07:00
Matt A
9e745f771b Support PHP generic services (#3269)
* Add php_generic_services option

* Generate PHP generic services

* Respect namespaces for generated PHP services

* Test PHP generated services

* Rename PHP generator service method doc comment function

* Correct phpdoc service method case

* Test namespaced PHP generic services

* Always use the FQCN for PHP generic service input/output

* Add generated_service_test to php test.sh

* Add php service test protos to CI

* Add php service files to php_EXTRA_DIST

* Use Interface suffix for php generic services
2017-07-18 07:45:18 -07:00
Jon Skeet
71f2f0d76c Fix repository URL in C# project file 2017-07-13 14:03:56 +01:00
Jean-Rémy Bancel
727c0dc1fa C#: Implement IReadOnlyDictionary<K,V> in MapField<K,V> 2017-07-12 09:28:43 +01:00
Yilun Chong
7339c25d12 delete backup files 2017-07-05 09:49:11 -07:00
Yilun Chong
cbf7dfb323 fix php failing list and csharp generated proto 2017-07-05 09:48:40 -07:00
Jon Skeet
cdd524a0bd Ensure leaveOpen is true when writing to a buffer
Note that the compatibility tests have had to cahnge as well, to
cope with internal changes. (The test project has access to
internals in the main project.)

Fixes #3209.
2017-07-04 06:42:45 +01:00
Jon Skeet
62d7fe5697 Make Any easier to work with in C#
- Add a TryUnpack method which doesn't throw if the type is wrong
- Make GetTypeName public for easier determination of the message type

Fixes #3294.
2017-07-03 12:16:40 +01:00
Yilun Chong
3adb054bbf add some test proto2 supported, add js proto2 supported, fixed some error 2017-06-30 17:22:32 -07:00
Yilun Chong
a7d5be6a91 change php objc nodejs csharp ruby 2017-06-29 15:04:50 -07:00
Yilun Chong
467c1ccd25 fix csharp conformance test 2017-06-28 15:44:14 -07:00
Yilun Chong
db379e6e69 fix csharp conformance test 2017-06-28 15:32:59 -07:00
Yilun Chong
ff773c1aaf fix csharp 2017-06-28 14:55:30 -07:00
Yilun Chong
cd1dc3f0df add csharp support 2017-06-28 14:51:56 -07:00
Bo Yang
e7bcfc4241 Update version number to 3.3.2 2017-06-21 10:20:34 -07:00
Paul Yang
6f325805c0 Add new file option php_namespace. (#3162)
* Add new file option php_namespace.

Use this option to change the namespace of php generated classes.
Default is empty. When this option is empty, the package name will be
used for determining the namespace.

* Uncomment commented tests

* Revert gdb test change

* Update csharp descriptor.

* Add test for empty php_namespace.
2017-06-05 00:10: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
Feng Xiao
58538ea919 Update version number to 3.3.1 2017-05-08 16:02:08 -07:00
Feng Xiao
80f0c0ac40 Update version number and changelog for 3.3.0 2017-04-05 17:32:17 -07:00
Feng Xiao
32d7830e4b Fix C++ build for down-integration. 2017-03-29 14:52:33 -07:00
Jie Luo
7610f101e8 Merge pull request #2884 from anandolee/master
Add FormatEnumsAsIntegers support for Json Format. Scale JsonFormatter.Settings for multi options.
2017-03-27 11:05:38 -07:00
Jie Luo
689e4bf5f4 Add FormatEnumAsInt support for Json Format. And scale JsonFormatter.Settings to multiple options. 2017-03-24 12:05:52 -07:00
Paul Yang
6b27c1f981 Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in
the containing file.
2017-03-17 11:08:06 -07:00
Jie Luo
606cb7ed2c There might be duplicated enum values when allow_alias is true. Add PreferredAlias into OriginalNameAttribute to remove the duplication (#2727) 2017-02-28 10:51:19 -08:00
John Brock
17174b54dd Updating README
- Adding more detail on running tests
- Adding info about the status of .NET 3.5 support and how to enable .NET 3.5
2017-02-23 10:51:52 +00:00
John Brock
f83d129555 Upgrading test-related libraries
NUnit 3.4.0 —> 3.6.0
dotnet-test-nunit 3.4.0-alpha-2 —> 3.4.0-beta-3
2017-02-23 10:51:52 +00:00
John Brock
c9b2c8f327 Fixes for .NET 3.5 compatibility
* Changing DOTNET35 framework symbols in preprocessor directives to the default built-in value of NET35.
* Adding extension method StreamExtension.CopyTo for .NET 3.5 because it didn’t exist until .NET 4, and adding associated unit tests.
2017-02-23 10:51:52 +00:00
Jie Luo
3f6f73b796 Merge pull request #2701 from anandolee/master
Add csharp compatibility tests against v3.0.0
2017-02-13 10:54:34 -08:00
Jie Luo
7288689d8c Add csharp compatibility tests against v3.0.0 and run on Travis. 2017-02-10 13:40:16 -08:00
Jie Luo
9f09d1804a Add proto and test files for csharp compatibility tests against v3.0.0.
All the files are copied from 3.0.0 (JosnFormaterTest was deleted)
2017-02-09 16:43:18 -08:00
Jon Skeet
bd29f86804 Fix CopyTo argument validation
Fixes #2669.
2017-02-06 18:24:19 +00:00
Paul Yang
7f3e237071 Merge 3.2.x branch into master (#2648)
* Down-integrate internal changes to github.

* Update conformance test failure list.

* Explicitly import used class in nano test to avoid random test fail.

* Update _GNUC_VER to use the correct implementation of atomic operation
on Mac.

* maps_test.js: check whether Symbol is defined before using it (#2524)

Symbol is not yet available on older versions of Node.js and so this
test fails with them. This change just directly checks whether Symbol is
available before we try to use it.

* Added well_known_types_embed.cc to CLEANFILES so that it gets cleaned up

* Updated Makefile.am to fix out-of-tree builds

* 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.

* Update _GNUC_VER to use the correct implementation of atomic operation on Mac.

* Add new js file in extra dist.

* Bump version number to 3.2.0

* Fixed issue with autoloading - Invalid paths (#2538)

* PHP fix int64 decoding (#2516)

* fix int64 decoding

* fix int64 decoding + tests

* Fix int64 decoding on 32-bit machines.

* 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) {
                                ^

* 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

* 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.

* 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.

* Fix generation of extending nested messages in JavaScript (#2439)

* Fix generation of extending nested messages in JavaScript

* Added missing test8.proto to build

* Fix generated code when there is no namespace but there is enum definition.

* Decoding unknown field should succeed.

* Add embed.cc in src/Makefile.am to fix dist check.

* 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.

* Remove redundent embed.cc from src/Makefile.am

* Update version number to 3.2.0-rc.1 (#2578)

* Change protoc-artifacts version to 3.2.0-rc.1

* Update version number to 3.2.0rc2

* Update change logs for 3.2.0 release.

* Update php README

* Update upb, fixes some bugs (including a hash table problem). (#2611)

* Update upb, fixes some bugs (including a hash table problem).

* Ruby: added a test for the previous hash table corruption.

Verified that this triggers the bug in the currently released
version.

* Ruby: bugfix for SEGV.

* Ruby: removed old code for dup'ing defs.

* Reverting deployment target to 7.0 (#2618)

The Protobuf library doesn’t require the 7.1 deployment target so
reverting it back to 7.0

* Fix typo that breaks builds on big-endian (#2632)

* Bump version number to 3.2.0
2017-01-31 09:17:32 -08:00
Jon Skeet
afc59ab55a C#: Implement IReadOnlyList<T> in RepeatedField<T>
We explicitly don't do this when targeting .NET 3.5, where the
interface doesn't exist.

No implementation is required, as we're already implementing
everything we need for IList<T>.
2017-01-30 18:58:56 +00:00
Jie Luo
ccb76fff44 Add Oneof custom options test 2017-01-27 11:52:32 -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
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
Jon Skeet
b18bc9b944 Give C# ByteString a sensible GetHashCode implementation.
Fixes #2511.
2016-12-16 12:04:40 +00:00
Jan Tattermusch
9d709f446f Merge pull request #2487 from jtattermusch/csharp_leading_whitespace
remove leading whitespace in C# xml comments
2016-12-13 13:42:23 +01:00
Jan Tattermusch
fda9049ead remove leading whitespace in C# xml comments 2016-12-12 12:41:26 +01:00
Michael Darakananda
bb77cbf05a update descriptor.proto's go_package
This change has already been made in google's repo.
Replicating the change here to unblock work on genproto.
2016-12-07 18:15:17 +11: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
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
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
Julien Brianceau
3c0e0ce2b0 Fix csharp/src/Google.Protobuf.Test/project.json
This change fixes the following Chromium presubmit error:

  third_party/protobuf/csharp/src/Google.Protobuf.Test/project.json could
  not be parsed: Expecting property name: line 25 column 3 (char 482)
2016-11-14 22:32:15 +01:00
Msp
089aaa996a Fix message for InvalidProtocolBufferException 2016-11-04 23:54:34 +05:30
Jon Skeet
50a37e0135 Change JSON field name formatting
This affects cases with leading capital letters.

This breaks compatibility with previous C# releases, but
fixes compatibility with other implementations.

See #2278 for details.
2016-11-03 18:05:59 +00:00
Bo Yang
89db7ce02b Add script to build Google.Protobuf.Tools for csharp. 2016-10-10 11:44:21 -07:00
Bo Yang
e62d1f13f2 Add back removed descriptor field. 2016-10-10 11:44:21 -07:00
Feng Xiao
f933d10fbe Update version number.
[skip ci]

Change-Id: I1ba6f6372a08b5796570851336e1a548602f60da
2016-10-10 11:44:21 -07:00
Bo Yang
93007e15ff Bump library veriosn to 3.1 2016-10-10 11:43:48 -07:00
Bo Yang
15f4db6cb1 Bump version number to 3.1.0-alpha-1. 2016-10-10 11:24:31 -07:00
Jan Tattermusch
da7c026ce1 Update README.md 2016-09-22 11:07:37 +02:00
Jisi Liu
58860c021f Merge remote-tracking branch 'origin/3.0.x' into merge 2016-09-14 09:37:48 -07:00
Guillaume Turri
9b8da104c1 Rm check on dependency in the C# reflection API (#2051)
This check adds a few constraints on the way to build a project when we have
a proto file which imports another one. In particular, on projects which
build both C# and Java, it's easy to end up with exceptions like

    Expected: included.proto but was src/main/protobuf/included.proto

A user may work around this issue, but it may add unnecessary constraints
on the layout of the project.

According to f3504cf3b1 (diff-ecb0b909ed572381a1c8d1994f09a948R309)
it has already been considered to get rid of this check, for
similar considerations, and because it doesn't exist in the Java code
2016-09-05 09:29:03 +01:00
Jisi Liu
6e11540b32 Bump version number to 3.0.2 2016-09-02 11:57:49 -07:00
Thomas Van Lenten
e389165586 Add more JSON tests around underscores (#1963)
Add more JSON tests around underscores
2016-08-16 09:02:27 -04:00
Jon Skeet
f9d93f358d Regenerate conformance files to include extra oneof fields.
This should fix the failures in the conformance tests - although
it highlights the problem that we need to do this when changing
the conformance.proto file...
2016-08-15 16:45:27 +01:00
Jisi Liu
169d0ca43c Merge pull request #1893 from google/3.0.0-GA
Merge 3.0.0-GA into master
2016-07-29 14:27:53 -07:00
Jon Skeet
4e169bf0e5 Bring C#'s ToPascalCase method in line with C++.
(This still doesn't fix the conformance tests, but at least
we're now consistent with the C++ code.)
2016-07-27 10:51:12 -07:00
Jon Skeet
a8aae8989c Bring C#'s ToPascalCase method in line with C++.
(This still doesn't fix the conformance tests, but at least
we're now consistent with the C++ code.)
2016-07-27 10:49:13 +01:00
Jisi Liu
fb7a7c5f1f Bump version number for GA 2016-07-25 12:07:56 -07:00
Jon Skeet
b5ce5251fd Move to dotnet cli for building, and .NET Core (netstandard1.0) as target platform (#1727)
This also updates the version number to 3.0.0-beta4
2016-07-14 22:16:35 +01:00
Jon Skeet
5e0de1ebee Remove the overload for Add(RepeatedField<T>)
We now just perform the optimization within AddRange itself.

This is a breaking change in terms of "drop in the DLL", but is
source compatible, which should be fine.
2016-07-14 22:14:51 +01:00
Jon Skeet
2ee1e52380 Optimize AddRange for sequences implementing ICollection
(Also fix a few more C# 6-isms.)
2016-07-14 22:14:51 +01:00
Jon Skeet
b053b9211b Implement RepeatedField.AddRange.
This fixes issue #1730.
2016-07-14 22:14:51 +01:00
Jon Skeet
d9334ea8d9 Improve exception throwing implementation in collections 2016-07-14 22:14:51 +01:00
Feng Xiao
c2ebdec355 Update version number in AssemblyInfo.cs. 2016-07-14 10:46:24 -07:00
Feng Xiao
932f94e16e Update version number to 3.0.0-beta-4 2016-07-13 16:08:47 -07:00
Feng Xiao
443eb27c7c Update generated files. 2016-07-13 15:37:29 -07:00
Jos Hickson
790e6afb72 Fixed out-of-date documentation for CodedInputStream.ReadEnum. (#1581) 2016-07-10 21:31:35 +01:00
Jon Skeet
3560cc9ede Merge pull request #1702 from lukebakken/csharp-nuget-doc-update
Modify csharp README since there are now two NuGet packages
2016-07-10 21:30:31 +01:00
Jon Skeet
3df146e198 Remove unnecessary reflection call
This is the only call to TypeExtensions.IsValueType, so we can remove
that method, making the whole type conditionally compiled out for .NET 3.5
2016-07-08 18:21:25 +01:00
Jon Skeet
c53484539c Changes to generated code from previous commit 2016-07-04 08:22:18 +01:00
detlevschwabe
dc0aeaa903 Adding conditional compiler symbol to support .NET 3.5 (#1713)
* Adding condition compiler symbol to support .NET 3.5
2016-06-28 06:31:42 +01:00
Jon Skeet
0421238cc1 Expose JsonFormatter.WriteValue.
This isn't useful to most users, but can be handy in advanced use cases,
as requested in #1465.
2016-06-23 12:31:10 +01:00
Luke Bakken
80694669e4 Modify csharp README since there are now two NuGet packages 2016-06-22 07:39:05 -07:00
Jon Skeet
e3f6e2b870 Remove ordering guarantees in the MapField documentation
This doesn't currently change the ordering in the implementation, but allows us to do so in the future.
We also need to change
https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#singular
which states "Finally, unlike Dictionary<TKey, TValue>, MapField<TKey, TValue> preserves insertion order of entries."
(We can just remove that sentence, I think.)
2016-06-21 07:22:48 +01:00
Jisi Liu
c8be6ee00c Merge pull request #1542 from google/beta-3
Merge Beta 3 release branch into master
2016-05-16 13:46:16 -07:00
Jisi Liu
017d390d65 Fix csharp version 2016-05-11 15:09:43 -07:00
Jon Skeet
7cc9cb407b Move test for standalone BoolValue to JsonParserTest
Also added a standalone formatter test, for confidence.
Have validated that undoing the change in 835fb947 breaks the tests
(i.e. we are still testing that the change is required).
2016-05-11 18:07:03 +01:00
Jos Hickson
835fb947cc Fixed parsing of BoolValue. 2016-05-11 15:36:02 +01:00
Jisi Liu
5dea2017db Update version numbers for other languages 2016-05-10 15:43:39 -07:00
Jon Skeet
5b5e369b18 Merge pull request #1471 from jskeet/any-host
Allow custom type URL prefixes in Any.Pack
2016-05-06 06:29:03 +01:00
Jon Skeet
61307b86f5 Allow custom type URL prefixes in Any.Pack
(And likewise ignore the prefix in unpack.)

Fixes issue #1459.
2016-04-29 10:20:03 +01:00
Jisi Liu
12fdeb9b41 Merge branch 'master' of github.com:google/protobuf 2016-04-28 14:43:08 -07:00
Jon Skeet
c588ac42a2 Regenerate well-known types for C#
(There are documentation changes and new fields in descriptor.proto that have resulted
in changes to the serialized descriptor, but no breaking changes for C#.)
2016-04-20 17:19:42 +01:00
Jon Skeet
790f4c8e37 Use the original name in JSON formatting.
(JSON parsing already does the right thing.)
2016-04-20 03:46:02 +01:00
Jon Skeet
84ea2c7a81 Regenerate all C# code and make it compile
JSON tests fail, as we're not using OriginalNameAttribute yet.
2016-04-20 03:46:00 +01:00
Jon Skeet
75626ed79c Add C# codegen changes to enum value names (mostly C++)
Overview of changes:
- A new C#-specific command-line option, legacy_enum_values to revert to the old behavior
- When legacy_enum_values isn't specified, we strip the enum name as a prefix, and PascalCase the value name
- A new attribute within the C# code so that we can always tell the original in-proto name

Regenerating the C# code with legacy_enum_values leads to code which still compiles and works - but
there's more still to do.
2016-04-20 03:45:59 +01:00