aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix attribute mistake and regenerate code.Jon Skeet2015-07-221-2/+0
|
* Remove the usage of attributes for field/method discovery.Jon Skeet2015-07-2212-50/+96
| | | | Instead, introduce GeneratedCodeInfo which passes in what we need, and adjust the codegen to take account of this.
* Revamp to reflection.Jon Skeet2015-07-2113-99/+45
| | | | | | | | | | | | | | | | | 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.
* Merge pull request #629 from google/masterJon Skeet2015-07-2115-1420/+1697
|\ | | | | Integrate changes from upstream/master into csharp-experimental
| * Merge pull request #621 from nico/staticassJisi Liu2015-07-201-2/+4
| |\ | | | | | | Let GOOGLE_COMPILE_ASSERT use static_assert if available.
| | * Let GOOGLE_COMPILE_ASSERT use static_assert if available.Nico Weber2015-07-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. https://github.com/google/re2/commit/eb93e8bc43ac8d05322fb3e9fc885898ad924f8a did the same change in re2.
| * | Merge pull request #604 from haberman/ruby-conformanceJoshua Haberman2015-07-202-16/+24
| |\ \ | | | | | | | | Added Ruby to conformance tests.
| | * | Added Ruby to conformance tests.Josh Haberman2015-07-162-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involved fixing a few important bugs in the Ruby implementation -- mostly cases of mixing upb field types and descriptor types (upb field types do not distinguish between int/sint/fixed/sfixed like descriptor types do). Also added protobuf-specific exceptions so parse errors can be caught specifically. Change-Id: Ib49d3db976900b2c6f3455c8b88af52cfb86e036
| * | | Merge pull request #622 from pherl/splitheadersJisi Liu2015-07-172-0/+2
| |\ \ \ | | |_|/ | |/| | Addming missing includes in stubs headers.
| | * | Addming missing includes in stubs headers.Jisi Liu2015-07-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is to prepare removing those additional headers in common.h Change-Id: I707d6d8eaf193eb28195a827c7fec738b968ab3e
| * | | Merge pull request #613 from pherl/splitheadersJisi Liu2015-07-179-1404/+1631
| |\| | | | | | | | | | Split up common.h headers
| | * | Merge branch 'master' of github.com:google/protobuf into splitheaderJisi Liu2015-07-171-0/+3
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I5f6cbc2430200e3751ad754cc7ae604338db6f91
| | * | | Update make file for extra headers.Jisi Liu2015-07-171-0/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifbc415755266ba3d0ffa5661fcd7c7d2e3b32a22
| | * | | Split up common.h headersJisi Liu2015-07-168-1404/+1625
| | | |/ | | |/| | | | | | | | | Change-Id: I223783111d743aa5193bf70fa1b9b54c7b4389c3
| * | | Merge pull request #601 from anandolee/masterJie Luo2015-07-172-0/+35
| |\ \ \ | | |_|/ | |/| | ignore UTF-8 BOM
| | * | ignore UTF-8 BOM if it is in the begining of a proto fileJie Luo2015-07-162-0/+35
| | |/
| * / Install missing headersRob Earhart2015-07-141-0/+3
| |/ | | | | | | | | | | Install google/protobuf/stubs/status.h, and google/protobuf/stubs/stringpiece.h -- these are required in order to include google/protobuf/util/type_resolver.h. Install google/protobuf/stubs/bytestream.h -- this is required in order to include google/protobuf/util/json_util.h.
* | Merge pull request #611 from jskeet/csharp-wrappersJon Skeet2015-07-1710-35/+466
|\ \ | | | | | | C# wrapper types
| * | Fixes from PR review.Jon Skeet2015-07-171-1/+0
| | |
| * | First pass at wrapper types.Jon Skeet2015-07-166-70/+93
| | | | | | | | | | | | | | | - We do still generate the message types, as otherwise reflection breaks, even though it doesn't actually use those types. - JSON handling hasn't been implemented yet
| * | First part of implementing wrapper types. Not ready yet!Jon Skeet2015-07-167-17/+426
| | |
* | | Merge pull request #586 from jtattermusch/csharp_names_exportJan Tattermusch2015-07-166-5/+83
|\ \ \ | |/ / |/| | Export c# naming routines publicly
| * | export c# naming routines publiclyJan Tattermusch2015-07-106-5/+83
| | |
* | | Merge remote-tracking branch 'upstream/master' into csharp-experimentalJan Tattermusch2015-07-1523-263/+287
|\ \ \ | | |/ | |/|
| * | Internal local modifications.Bo Yang2015-07-0910-158/+160
| | |
| * | Merge pull request #500 from TeBoring/tempPaul Yang2015-07-013-62/+94
| |\ \ | | | | | | | | Implement parsing for proto3 primitive repeated fields.
| | * | Implement parsing for proto3 primitive repeated fields. Previously, forBo Yang2015-06-153-62/+94
| | | | | | | | | | | | | | | | | | | | proto3 primitive repeated fields, packed data cannot be parsed if definition is unpacked. Neither is the other way.
| * | | Merge pull request #551 from ostrovsky/masterFeng Xiao2015-07-016-31/+21
| |\ \ \ | | | | | | | | | | MinGW64+MSYS2 compilation issues
| | * | | MinGW64+MSYS2 compilation issues and portable isnan using MathLimitsKarol Ostrovsky2015-07-016-31/+21
| | | | |
| * | | | Merge pull request #458 from xfxyjwf/memory_leakPaul Yang2015-06-301-0/+5
| |\ \ \ \ | | | | | | | | | | | | Delete default UnknownFieldSet when shuting down.
| | * | | | Delete default UnknownFieldSet when shuting down.Feng Xiao2015-06-021-0/+5
| | | | | |
| * | | | | Fix "sometimes-uninitialized" warning on Windows Clang.Matt Giuca2015-06-301-1/+1
| | |/ / / | |/| | |
| * | | | fix compiler warnings.Jisi Liu2015-06-243-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - control reaches end of non-void function. - remove a deprecated IsMatch. Change-Id: Ifdeb15879bbcf591c48dc7fda1cd8994bdf87bb3
* | | | | Address requested change from code review.Jon Skeet2015-07-151-12/+12
| | | | |
* | | | | Don't create nested types (or field accessors) for map types.Jon Skeet2015-07-153-2/+33
| | | | | | | | | | | | | | | | | | | | I'm sure I've implemented this before, but somehow it's been lost in a maze of twisty little branches, all alike.
* | | | | Generate the well-known types in C#Jon Skeet2015-07-1411-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involves: - Specifying a namespace in each proto (including ones we'd previously missed) - Updating the generation script - Changing codegen to implement IReflectedMessage.Fields explicitly (a good thing anyway) - Changing reflection tests to take account of the explicit interface implementation Non-generated code in this commit; generated code to follow
* | | | | Changing reflection namespace (part 3)Jon Skeet2015-07-148-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the C# namespace in descriptor.proto to Google.Protobuf.Reflection. This then means changing where the generated code lives, which means updating the project file... It also involves regenerating the C++ - which has updated the well-known types as well, for no terribly obvious reason...
* | | | | Changing reflection namespace (part 1)Jon Skeet2015-07-142-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move types into Google.Protobuf.Reflection - Change codegen to reflect that in generated types Generated code changes coming in part 2
* | | | | Convert package name to PascalCase for C# namespaceJon Skeet2015-07-142-3/+11
| | | | | | | | | | | | | | | | | | | | Fixes issue 312.
* | | | | Oneof reflection support. (Generated code changes in next commit.)Jon Skeet2015-07-101-0/+1
| | | | |
* | | | | Use the new JsonFormatter to implement ToString on generated messages.Jon Skeet2015-07-103-6/+7
| |_|_|/ |/| | |
* | | | Codegen changes to support descriptor runtime changesJon Skeet2015-07-0911-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | - Add a partial method called by all constructors - Generate internal classes for descriptor.proto (only) - Forbid proto2 descriptors except for descriptor.proto
* | | | Implement reflection properly for fields.Jon Skeet2015-07-092-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - FieldAccessorTable is now non-generic - We don't have a static field per message type in the umbrella class. (Message descriptors are accessed via the file descriptor.) - Removed the "descriptor assigner" complication from the descriptor fixup; without extensions, we don't need it - MapField implements IDictionary (more tests would be good...) - RepeatedField implements IList (more tests would be good) - Use expression trees to build accessors. (Will need to test this on various platforms... probably need a fallback strategy just using reflection directly.) - Added FieldDescriptor.IsMap - Added tests for reflection with generated messages Changes to generated code coming in next commit.
* | | | Remove unused code in C# codegenJon Skeet2015-06-302-47/+1
| | | |
* | | | First pass (not yet compiling) at removing all the array handling code from ↵Jon Skeet2015-06-303-102/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Coded*Stream. Prod code works, but some tests are broken. Obviously those need fixing, then more tests, and review benchmarks.
* | | | Fix for doubly-nested types - issue #307.Jon Skeet2015-06-291-1/+1
| | | | | | | | | | | | | | | | No specific test case - if the generated code compiles, the issue is fixed :)
* | | | More cleanup, based around searches for "Google.ProtocolBuffers"Jon Skeet2015-06-2626-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove some old proto2-based C#-only messages - Remove the "build" directory which only contained out-of-date files - Remove the csharp_namespace option from proto2 messages - Change "Google.ProtocolBuffers" to "Google.Protobuf" in other messages
* | | | Tweaks and more tests for mapsJon Skeet2015-06-263-6/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change the default message hash code to 1 to be consistent with other code - Change the empty list/map hash code to 0 as "empty map" is equivalent to "no map" - Removed map fields from unittest_proto3.proto - Created map_unittest_proto3.proto which is like map_unittest.proto but proto3-only - Fixed factory methods in FieldCodec highlighted by using all field types :) - Added tests for map serialization: - Extra fields within entries - Entries with value then key - Non-contiguous entries for the same map - Multiple entries for the same key Changes to generated code coming in next commit
* | | | More map tests, and various production code improvements.Jon Skeet2015-06-251-1/+2
| | | | | | | | | | | | | | | | Generated code in next commit.
* | | | First pass at map support.Jon Skeet2015-06-2514-10/+263
| | | | | | | | | | | | | | | | More tests required. Generated code in next commit.