Commit Graph

2445 Commits

Author SHA1 Message Date
Jan Tattermusch
7ec023acf4 regenerate code 2015-07-29 20:26:20 -07:00
Jan Tattermusch
3783d9a8ad remove the freeze API 2015-07-29 20:26:20 -07:00
Jan Tattermusch
74810c6ae3 Merge pull request #638 from jskeet/portable
First attempt at using profile 259 for Google.Protobuf.
2015-07-29 09:32:55 -07:00
Jon Skeet
d82ebe48e1 Update the readme file to indicate supported platforms 2015-07-28 10:23:11 +01:00
Jon Skeet
9ccc83990d Humbug - previous commit didn't include project file changes :( 2015-07-28 09:01:13 +01:00
Jon Skeet
0802d56fcd Tweaks to Profile259 support
- Fix nupec paths
- Remove an obsolete part of the JSON build
- Add documentation and tests to reflection extension methods, and improve implementations
2015-07-28 08:16:50 +01:00
Jon Skeet
0dbd5ec80d First attempt at using profile 259 for Google.Protobuf.
This requires .NET 4.5, and there are a few compatibility changes required around reflection.
Creating a PR from this to see how our CI systems handle it. Will want to add more documentation,
validation and probably tests before merging.

This is in aid of issue #590.
2015-07-27 07:47:50 +01:00
Jon Skeet
edff88886b Merge pull request #641 from jtattermusch/csharp_descriptor_database
Expose original binary data for file descriptor
2015-07-25 07:13:08 +01:00
Jan Tattermusch
3b8c83eff1 expose original binary data for filedescriptor 2015-07-24 20:27:35 -07:00
Jon Skeet
bea87743e0 Merge pull request #634 from jskeet/reflection2
Reflection part 2 - for discussion
2015-07-23 06:50:23 +01:00
Jon Skeet
c1c6b2d0d5 Implemented Jan's suggestion of FieldCollection, replacing FieldAccessorCollection.
I think Jan was actually suggesting keeping both, but that feels redundant to me. The test diff is misleading here IMO, because I wouldn't expect real code using reflection to use several accessors one after another like this, unless it was within a loop. Evidence to the contrary would be welcome :)

This change also incidentally goes part way to fixing the issue of the JSON formatter not writing out the fields in field number order - with this change, it does except for oneofs, which we can fix in a follow-up change.

I haven't actually added a test with a message with fields deliberately out of order - I'm happy to do so though. It feels like it would make sense to be in google/src/protobuf, but it's not entirely clear what the rules of engagement are for adding new messages there. (unittest_proto3.proto?)
2015-07-22 20:13:38 +01:00
Jon Skeet
5e0cfc9a47 Added newlines 2015-07-22 20:13:37 +01:00
Jon Skeet
20bf6a563a First pass at making field access simpler.
This is definitely not ready to ship - I'm "troubled" by the disconnect between a list of fields in declaration order, and a mapping of field accessors by field number/name. Discussion required, but I find that easier when we've got code to look at :)
2015-07-22 20:13:37 +01:00
Jan Tattermusch
7b5c396799 Merge pull request #625 from jskeet/reflection-refactor
Reflection refactor
2015-07-22 10:36:06 -07:00
Jon Skeet
43d64b4f54 Fix typo in Makefile.am 2015-07-22 14:32:27 +01:00
Jon Skeet
e2368c9022 Fix attribute mistake and regenerate code. 2015-07-22 13:47:16 +01:00
Jon Skeet
17fd398e1a Fix file lists for C# 2015-07-22 11:40:52 +01:00
Jon Skeet
47bf49b9fa Generated code for previous commit. 2015-07-22 11:39:38 +01:00
Jon Skeet
4668c3dc39 Remove the usage of attributes for field/method discovery.
Instead, introduce GeneratedCodeInfo which passes in what we need, and adjust the codegen to take account of this.
2015-07-22 11:38:22 +01:00
Jon Skeet
8d115298c7 Fix comment typo 2015-07-21 12:59:42 +01:00
Jon Skeet
96cffaa8e3 Generated code changes following previous commit. 2015-07-21 12:59:41 +01:00
Jon Skeet
53c399a1d6 Revamp to reflection.
Changes in brief:
1. Descriptor is now the entry point for all reflection.
2. IReflectedMessage has gone; there's now a Descriptor property in IMessage, which is explicitly implemented (due to the static property).
3. FieldAccessorTable has gone away
4. IFieldAccessor and OneofFieldAccessor still exist; we *could* put the functionality straight into FieldDescriptor and OneofDescriptor... I'm unsure about that.
5. There's a temporary property MessageDescriptor.FieldAccessorsByFieldNumber to make the test changes small - we probably want this to go away
6. Discovery for delegates is now via attributes applied to properties and the Clear method of a oneof

I'm happy with 1-3.
4 I'm unsure about - feedback welcome.
5 will go away
6 I'm unsure about, both in design and implementation. Should we have a ProtobufMessageAttribute too? Should we find all the relevant attributes in MessageDescriptor and pass them down, to avoid an O(N^2) scenario?

Generated code changes coming in the next commit.
2015-07-21 12:59:40 +01:00
Jon Skeet
2ee4b56655 Merge pull request #629 from google/master
Integrate changes from upstream/master into csharp-experimental
2015-07-21 12:58:43 +01:00
Jan Tattermusch
c792db5d08 Merge pull request #628 from jtattermusch/csharp_addressbook_update
C# addressbook update
2015-07-20 18:54:34 -07:00
Jan Tattermusch
353b7a9985 Merge pull request #627 from jtattermusch/addressbook_proto3
Update addressbook.proto and examples code to proto3
2015-07-20 18:54:27 -07:00
Jisi Liu
d119a27549 Merge pull request #621 from nico/staticass
Let GOOGLE_COMPILE_ASSERT use static_assert if available.
2015-07-20 17:36:00 -07:00
Jan Tattermusch
43b17376f7 update addressbook example 2015-07-20 16:00:26 -07:00
Jan Tattermusch
352690efc7 regenerate Addressbook.cs 2015-07-20 15:53:19 -07:00
Jan Tattermusch
792ae21bde update addressbook.proto 2015-07-20 15:51:07 -07:00
Jan Tattermusch
b0e5ba697e rename persons to people 2015-07-20 15:24:08 -07:00
Jan Tattermusch
359d32d4f7 use Google.Protobuf namespace for C# 2015-07-20 15:12:56 -07:00
Jan Tattermusch
4d86c2b495 fixed java example 2015-07-20 14:51:09 -07:00
Jan Tattermusch
b95670f5fb fix python example 2015-07-20 14:34:27 -07:00
Jan Tattermusch
78709f20fb fix C++ example 2015-07-20 14:33:36 -07:00
Jan Tattermusch
69c14071ad update addressbook.proto to proto3 2015-07-20 14:32:57 -07:00
Joshua Haberman
aba42edd8c Merge pull request #604 from haberman/ruby-conformance
Added Ruby to conformance tests.
2015-07-20 11:06:17 -07:00
Jan Tattermusch
bd3367c8b4 Merge pull request #624 from jskeet/wkt-json
First part of JSON formatting for well-known types.
2015-07-20 09:36:54 -07:00
Jon Skeet
c9fd53a3b7 First part of JSON formatting for well-known types. I think we need a reflection API rethink before doing the rest. 2015-07-20 11:48:24 +01:00
Josh Haberman
c2c43a4917 Fixed lint errors and responded to CR comments.
Change-Id: If7b1cc0f03f609a7f43ddafc8509b44207c60910
2015-07-17 16:29:10 -07:00
Josh Haberman
95ee8fb88e Exclude JRuby from conformance tests for now.
Change-Id: Id008ebac5159f773e1bde8b85acb2626cbd16de8
2015-07-17 16:20:01 -07:00
Jisi Liu
58035596e7 Merge pull request #622 from pherl/splitheaders
Addming missing includes in stubs headers.
2015-07-17 15:40:42 -07:00
Jisi Liu
51053120db Addming missing includes in stubs headers.
This is to prepare removing those additional headers in common.h

Change-Id: I707d6d8eaf193eb28195a827c7fec738b968ab3e
2015-07-17 15:40:03 -07:00
Nico Weber
56a90a2081 Let GOOGLE_COMPILE_ASSERT use static_assert if available.
The motivation is that gcc 4.8+ and clang trunk warn on unused local
typedefs, which COMPILE_ASSERT adds. After this change, the warning
will be happy at least in C++11 builds. static_assert also produces a
slighly nicer diagnostic than the typedef method.

eb93e8bc43
did the same change in re2.
2015-07-17 14:18:36 -07:00
Jisi Liu
798ed10e7a Merge pull request #613 from pherl/splitheaders
Split up common.h headers
2015-07-17 13:57:59 -07:00
Jie Luo
7648852550 Merge pull request #601 from anandolee/master
ignore UTF-8 BOM
2015-07-17 13:23:29 -07:00
Jon Skeet
3f5df7a74b Merge pull request #620 from google/jtattermusch-patch-2
Fix typo in buildall.sh
2015-07-17 20:20:41 +01:00
Jan Tattermusch
9b28d4b12c Fix typo in buildall.sh 2015-07-17 12:19:20 -07:00
Jisi Liu
12f6e3dd0e update header list.
Change-Id: I75459b8b6562c3ac58fa4b1e4513accdda43ad64
2015-07-17 11:36:51 -07:00
Jisi Liu
4dde2a87a9 Merge branch 'master' of github.com:google/protobuf into splitheader
Change-Id: I5f6cbc2430200e3751ad754cc7ae604338db6f91
2015-07-17 11:36:29 -07:00
Jisi Liu
7b216119ee Update make file for extra headers.
Change-Id: Ifbc415755266ba3d0ffa5661fcd7c7d2e3b32a22
2015-07-17 11:34:33 -07:00