Commit Graph

469 Commits

Author SHA1 Message Date
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
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