aboutsummaryrefslogtreecommitdiff
path: root/csharp/generate_protos.sh
Commit message (Collapse)AuthorAgeFilesLines
* Provide simple access to descriptor declarations in C#Jon Skeet2018-09-221-0/+3
| | | | | | | | | This is primarily for access to comments, which would be expected to be available in a protoc plugin. The implementation has two fiddly aspects: - We use a Lazy<T> to avoid building the map before cross-linking. An alternative would be to crosslink at the end of the constructor, and remove the calls to CrossLink elsewhere. This would be generally better IMO, but deviate from the Java code. - The casts to IReadOnlyList<DescriptorBase> are unfortunate. They'll always work, because these lists are always ReadOnlyCollection<T> for a descriptor type... but we can't use IList<DescriptorBase> as that's not covariant, and it's annoyingly fiddly to change the field to be of type ReadOnlyCollection<T>.
* Move C#-only test protos to csharp/protosJon Skeet2017-11-121-19/+11
| | | | | | | | | | 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#.
* Support custom options in C#Jon Skeet2017-01-191-2/+3
| | | | | | | | | | | | 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.
* Factored Conformance and Benchmark test messages into shared test schema. ↵Joshua Haberman2016-12-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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.
* Generate C# code whenever descriptor.proto changesJon Skeet2016-02-151-1/+1
| | | | | | | 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.
* Fix C# source generation shell script and remove out of date notesJon Skeet2016-01-041-11/+1
| | | | | The conformance tests now use types which are part of src/google/protobuf, so we need to include src in the proto path. The notes around "fix-ups" have been out of date for some time now.
* Generate a directory hierarchy based on namespace (C#)Jon Skeet2015-09-011-8/+10
| | | | | | | | | | | | | 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...
* Remove extraneous TODOJon Skeet2015-08-251-1/+0
|
* Change where we rename Descriptor.cs to DescriptorProtoFile.cs.Jon Skeet2015-08-251-3/+1
| | | | | | | | | | | 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.
* First pass at C# conformance tests.Jon Skeet2015-08-051-0/+3
| | | | Completely untested so far - easier to get started in VS and then transfer to Linux for tweaking...
* Remove a redundant layer of directory hierarchy.Jon Skeet2015-08-031-2/+2
|
* First pass at the big rename from ProtocolBuffers to Google.Protobuf.Jon Skeet2015-07-171-4/+4
| | | | We'll see what I've missed when CI fails...
* First part of implementing wrapper types. Not ready yet!Jon Skeet2015-07-161-1/+2
|
* Generate the well-known types in C#Jon Skeet2015-07-141-0/+12
| | | | | | | | | | 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-141-1/+1
| | | | | | | | 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...
* Tweaks and more tests for mapsJon Skeet2015-06-261-0/+2
| | | | | | | | | | | | | | | - 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
* Updates to handle use of cmake for Windows builds.Jon Skeet2015-06-171-4/+4
|
* Update the AddressBook tutorial to reflect the mutable design.Jon Skeet2015-06-121-41/+3
|
* Generate *all* protos in the script, applying fixups.Jon Skeet2015-05-161-1/+26
| | | | | | | | | | | | | | 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.
* Make generate_protos.sh Windows-friendly.Jon Skeet2015-05-141-2/+20
| | | | | | | | | | 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
* Update C# code generation scriptJon Skeet2015-05-131-3/+1
|
* draft of generate_protos.shJan Tattermusch2015-05-121-0/+52