1. 04 Jan, 2016 1 commit
  2. 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
  3. 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
  4. 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
  5. 05 Aug, 2015 1 commit
  6. 03 Aug, 2015 1 commit
  7. 17 Jul, 2015 1 commit
  8. 16 Jul, 2015 1 commit
  9. 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
  10. 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
  11. 17 Jun, 2015 1 commit
  12. 12 Jun, 2015 1 commit
  13. 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
  14. 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
  15. 13 May, 2015 2 commits