1. 19 Dec, 2017 1 commit
  2. 12 Nov, 2017 1 commit
    • Jon Skeet's avatar
      Move C#-only test protos to csharp/protos · aa77eab6
      Jon Skeet authored
      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#.
      aa77eab6
  3. 19 Jan, 2017 1 commit
    • Jon Skeet's avatar
      Support custom options in C# · 047575f2
      Jon Skeet authored
      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.
      047575f2
  4. 03 Dec, 2016 1 commit
    • Joshua Haberman's avatar
      Factored Conformance and Benchmark test messages into shared test schema. (#1971) · f1ce60e7
      Joshua Haberman authored
      * 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.
      f1ce60e7
  5. 15 Feb, 2016 1 commit
    • Jon Skeet's avatar
      Generate C# code whenever descriptor.proto changes · 957e877d
      Jon Skeet authored
      This is a start to fixing issue #1212. It won't help for test protos,
      conformance etc, but it will definitely be better than nothing, and
      would have highlighted a change in descriptor.proto which broken C#
      earlier.
      957e877d
  6. 04 Jan, 2016 1 commit
  7. 01 Sep, 2015 1 commit
    • Jon Skeet's avatar
      Generate a directory hierarchy based on namespace (C#) · 5eb1fac9
      Jon Skeet authored
      This introduces a new C# option, base_namespace.
      If the option is not specified, the behaviour is as before: no directories are generated.
      If the option *is* specified, all C# namespaces must be relative to the base namespace, and the directories are generated relative to that namespace.
      
      Example:
      - Any.proto declares csharp_namespace = "Google.Protobuf.WellKnownTypes"
      - We build with --csharp_out=Google.Protobuf --csharp_opt=base_namespace=Google.Protobuf
      - The Any.cs file is generated in Google.Protobuf/WellKnownTypes (where it currently lives)
      
      We need a change to descriptor.proto before this will all work (it wasn't in the right C# namespace) but that needs the other descriptors to be regenerated too. See next commit...
      5eb1fac9
  8. 26 Aug, 2015 2 commits
    • Jon Skeet's avatar
      Remove extraneous TODO · 8f2892bc
      Jon Skeet authored
      8f2892bc
    • Jon Skeet's avatar
      Change where we rename Descriptor.cs to DescriptorProtoFile.cs. · 3c74a0c9
      Jon Skeet authored
      We now do this in protoc instead of the generation simpler.
      
      Benefits:
      - Generation script is simpler
      - Detection is simpler as we now only need to care about one filename
      - The embedded descriptor knows itself as "google/protobuf/descriptor.proto" avoiding dependency issues
      
      This PR also makes the "invalid dependency" exception clearer in terms of expected and actual dependencies.
      3c74a0c9
  9. 25 Aug, 2015 2 commits
    • Jon Skeet's avatar
      Remove extraneous TODO · 31d119af
      Jon Skeet authored
      31d119af
    • Jon Skeet's avatar
      Change where we rename Descriptor.cs to DescriptorProtoFile.cs. · ca89a1a1
      Jon Skeet authored
      We now do this in protoc instead of the generation simpler.
      
      Benefits:
      - Generation script is simpler
      - Detection is simpler as we now only need to care about one filename
      - The embedded descriptor knows itself as "google/protobuf/descriptor.proto" avoiding dependency issues
      
      This PR also makes the "invalid dependency" exception clearer in terms of expected and actual dependencies.
      ca89a1a1
  10. 05 Aug, 2015 1 commit
  11. 03 Aug, 2015 1 commit
  12. 17 Jul, 2015 1 commit
  13. 16 Jul, 2015 1 commit
  14. 14 Jul, 2015 2 commits
    • Jon Skeet's avatar
      Generate the well-known types in C# · 739d13d5
      Jon Skeet authored
      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
      739d13d5
    • Jon Skeet's avatar
      Changing reflection namespace (part 3) · 9c888fa3
      Jon Skeet authored
      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...
      9c888fa3
  15. 26 Jun, 2015 1 commit
    • Jon Skeet's avatar
      Tweaks and more tests for maps · c1283310
      Jon Skeet authored
      - 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
      c1283310
  16. 17 Jun, 2015 1 commit
  17. 12 Jun, 2015 1 commit
  18. 16 May, 2015 1 commit
    • Jon Skeet's avatar
      Generate *all* protos in the script, applying fixups. · b1a395ce
      Jon Skeet authored
      We still have some protos which aren't generated how we want them to be:
      
      - Until we have an option to specify the "umbrella" class, DescriptorProtoFile
        will be broken. (The change of name here affects the reflection descriptor,
        which accounts for most of the change. That's easier than trying to work out
        exactly which occurrences of Descriptor need changing though.)
      - That change affects UnittestCustomOptions
      - Issue #307 breaks Unittest.cs
      
      After this commit, we don't have the record of the fixups in the files themselves
      any more, but one centralized record in the shell script.
      b1a395ce
  19. 14 May, 2015 1 commit
    • Jon Skeet's avatar
      Make generate_protos.sh Windows-friendly. · 734393d0
      Jon Skeet authored
      To my surprise, executing generate_protos.sh used the version of Bash installed with Git for Windows by default.
      After a few modifications to detect the most appropriate protoc to use, this worked pretty simply.
      This change also:
      - adds generation of the address book tutorial proto,
      - fixes the addressbook.proto to specify proto2 explicitly (to avoid a warning from protoc; I don't think we want warnings...)
      - fixes the addressbook.proto C# namespace (which I thought I'd done before, but apparently hadn't)
      - includes the regenerated UnittestCustomOptions.cs apart from the DescriptorProtoFIle => Descriptor change
      734393d0
  20. 13 May, 2015 2 commits