Commit Graph

1964 Commits

Author SHA1 Message Date
Jie Luo
24ae5105f3 Merge branch 'csharp' of git://github.com/google/protobuf into google-csharp 2015-04-30 11:23:09 -07:00
Jon Skeet
0884b77975 Merge pull request #324 from jskeet/csharp
Change to using xUnit for all unit tests, and fetch that via NuGet.
2015-04-30 14:51:42 +01:00
Jon Skeet
c56475088d Change to using xUnit for all unit tests, and fetch that via NuGet.
This includes fetching the VS unit test runner package, so that tests can be run from Visual Studio's Test Explorer.
2015-04-30 11:29:35 +01:00
Jon Skeet
151018e888 Merge pull request #319 from jskeet/csharp_pcl
Convert C# projects to Portable Class Libraries
2015-04-30 10:35:27 +01:00
Jie Luo
954bc83413 Merge branch 'csharp' of git://github.com/google/protobuf into google-csharp 2015-04-29 15:55:11 -07:00
Jie Luo
4af18b8711 rename FieldPResenceTest.cs file 2015-04-29 14:20:23 -07:00
Jon Skeet
ce97e68682 Convert both the full and lite runtimes (and json/xml serialization assemblies) to be Portable Class Libraries.
All referring projects are now .NET 4 client rather than .NET 3.5.
This commit also fixes up the ProtoBench app, which I'd neglected in previous commits. (Disentangling the two sets of changes would be time-consuming.)
2015-04-29 21:15:16 +01:00
Jon Skeet
a449f66bdb Merge pull request #317 from jskeet/csharp
Tidying up the C# runtime project
2015-04-29 20:59:44 +01:00
Jie Luo
d1f5acaafb Change the package for field_presence_test.proto 2015-04-29 11:49:14 -07:00
Jie Luo
c5c9c6a7e0 field presence Reflection and tests 2015-04-29 11:33:07 -07:00
Jon Skeet
0e916d09a3 Removing more C# project files. 2015-04-29 12:22:35 +01:00
Jon Skeet
f015b860b7 Remove CLS compliance from runtime code.
We need to remove it from the generator too; I'll raise a github issue for that.
2015-04-29 12:21:54 +01:00
Jon Skeet
5e0189ab94 Update C# solution and AddressBook project.
Move to a single solution file containing all of the C# projects, but no other solution folders - it's easier to edit those files outside VS than keep adding and removing them from the project.
The AddressBook protos have been regenerated (with a change to the example proto which I haven't included in this change - I'll wait for us to decide exactly what we're doing with namespaces before changing protos outside the csharp directory.

Note that now we've got Addressbook.cs which contains AddressBook and Addressbook classes. It's bad enough that we've got a class called AddressBook within a namespace of AddressBook (hard to get away from) but having things vary just by case is nasty.
This is more evidence that an option for renaming the file and descriptor class would be welcome. (A single option can probably handle both.)
2015-04-29 10:10:20 +01:00
Jon Skeet
f651f73a3c Remove support for Serializable.
This could potentially be added back in later, but its use is limited and it's a pain in terms of support in PCL environments.
One use that has been highlighted is passing objects between AppDomains; we'd recommend passing a byte array explicitly and reparsing on the other side.
2015-04-29 09:18:19 +01:00
Jon Skeet
cc058e1118 Remove RPC support.
It is expected that third parties will generate service/RPC code themselves - see gRPC as an example.
2015-04-29 08:55:07 +01:00
Jon Skeet
e8310aa259 Remove a bunch of files which are no longer relevant:
1) Project files for different configurations - we're going to look at all this again, ideally to just have a single PCL-compatible build
2) ProtoGen - the C++ generator is now the only one we care about
3) Proto files - these are mostly duplicates (or older versions) of the ones in the common directories
2015-04-29 06:55:51 +01:00
Jie Luo
8bae6c09bc Merge pull request #1 from google/csharp
Csharp update
2015-04-28 16:26:19 -07:00
Jie Luo
32ead755d1 Merge pull request #313 from jskeet/csharp
First steps to making the C# runtime work with new codegen
2015-04-28 14:23:18 -07:00
Jon Skeet
5ca6dd76fb Update DescriptorProtoFile.cs and UnitTest.cs to indicate manual changes.
(Having regenerated descriptor.proto relative to src, the earlier commented-out code checking that dependencies match may now be okay to uncomment again. Will experiment in later CLs.)
2015-04-28 18:47:47 +01:00
Jon Skeet
ce66c5f1b9 Updated set of unit tests and unit test protos.
This commit includes changes to the C#-specific protos, and rebuilt versions of the "stock" protos.
The stock protos have been locally updated to have a specific C# namespace, but this is expected to change soon, so hasn't been committed.
Four areas are currently not tested:
1) Serialization - we may restore this at some point, possibly optionally.
2) Services - currently nothing is generated for this; will need to see how it interacts with GRPC
3) Fields beginning with _{digit} - see https://github.com/google/protobuf/issues/308
4) Fields with names which conflict with the declaring type in nasty ways - see https://github.com/google/protobuf/issues/309
2015-04-28 15:06:59 +01:00
Jon Skeet
f3504cf3b1 First part of making the C# runtime work with the new codegen.
1) Remove CSharpOptions
2) A new version of DescriptorProtoFile (with manual changes from codegen - it would otherwise be Descriptor.cs)
3) Turn off CLS compliance (which we'll remove from the codebase entirely; I don't think it's actually relevant these days)
4) Add "public imports" to FileDescriptor, with code broadly copied from the Java codebase.
Lots more changes to commit before it will build and tests run, but one step at a time...
2015-04-28 14:53:24 +01:00
Jie Luo
8a3ec53e86 remove test proto for field presence 2015-04-27 15:38:13 -07:00
Jie Luo
5a811ac6f9 fix bug for Field Presence 2015-04-27 14:27:21 -07:00
Jie Luo
856ced5d76 Field Presence: remove has methods for optional non-message fields in proto3 2015-04-27 14:00:47 -07:00
Jie Luo
b977c3ed63 Merge pull request #300 from jskeet/csharp
Add C# generator files to the VS project for libprotoc
2015-04-27 10:42:34 -07:00
Jon Skeet
8d7e9433b3 Add C# files to Visual Studio projects.
Also ignore Windows native build output files.
2015-04-24 09:21:31 +01:00
Jie Luo
7646eec9ce Merge pull request #288 from jtattermusch/csharp_protobuf_reviewed
C# protocol buffers (initial pull request)
2015-04-17 17:29:39 -07:00
Jan Tattermusch
7eaf438031 forgot to include header files into automake template 2015-04-17 16:51:43 -07:00
Jan Tattermusch
8394a8daef Merge pull request #1 from jtattermusch/csharp_protogen_rewrite
Rewrite of C# protogen to C++ (initial version)
2015-04-17 15:02:14 -07:00
Jan Tattermusch
01c8c35ca3 Merge pull request #2 from jtattermusch/csharp_protobuf_imported
Pulling protobuf-csharp-port into csharp/ directory
2015-04-17 14:15:52 -07:00
Jan Tattermusch
8e190d498c temporarily removing csharp_umbrella_namespace file option 2015-04-17 11:07:02 -07:00
Jan Tattermusch
83a5991d12 removing csharp_property_name field option 2015-04-17 10:53:06 -07:00
Jan Tattermusch
b36420addb one more fix to csharp_umbrella_namespace comment 2015-04-17 10:20:35 -07:00
Jan Tattermusch
b6555b1da0 fix: do not mention umbrella_classname in comment 2015-04-17 10:00:38 -07:00
Jan Tattermusch
abcde243fe Fixed comment for csharp_umbrella_namespace (nest_classes has been removed) 2015-04-16 15:32:36 -07:00
Jan Tattermusch
2c2f76c50f fixing field number of csharp_umbrella_namespace option 2015-04-16 15:28:32 -07:00
Jan Tattermusch
1eab56aee8 removed .hgignore file 2015-04-16 12:31:48 -07:00
Jan Tattermusch
4e80fe15ed Added instructions to manually download the dependencies 2015-04-16 12:30:14 -07:00
Jan Tattermusch
6b7f0172b9 cleanup of csharp/lib/ directory 2015-04-16 10:56:23 -07:00
Jan Tattermusch
e77878ebc7 Updated readme.md and changes.txt, removed old license.txt 2015-04-16 10:23:54 -07:00
Jan Tattermusch
84fa3e2bbc Imported protobuf-csharp-port into csharp/ tree 2015-04-16 09:55:22 -07:00
Josh Haberman
4e63b52088 Factored conformance tests so they can run in-process.
This is necessary for testing on iOS.

Change-Id: I54ec1e3aa2e9fbfff9a6cd6580920a6a62069b63
2015-04-15 14:56:05 -07:00
Jan Tattermusch
333d200a96 integrate CalcSerializedSize() fix from protobuf-csharp-port issue 84 2015-04-13 17:41:03 -07:00
Jan Tattermusch
7cc05ecb3a fixing implementation of GetFileUmbrellaNamespace 2015-04-13 16:32:54 -07:00
Jan Tattermusch
5ac8de5b46 implemented HasRequiredFields logic 2015-04-13 16:12:29 -07:00
Jan Tattermusch
db9060dc61 addressed TODO for lite runtime 2015-04-13 15:48:40 -07:00
Joshua Haberman
8fe135d212 Merge pull request #284 from cfallin/issue-283
Fix for issue 283: JSON handler cleanup typo causing segfault.
2015-04-13 15:28:44 -07:00
Jan Tattermusch
d92de1742d creating private ctor for builders is now the default (as it used to be for old codegen) 2015-04-13 15:28:43 -07:00
Jan Tattermusch
f61e1791c0 output file naming logic, configurable file extension, comment rewording 2015-04-13 15:10:07 -07:00
Jan Tattermusch
8cec65e761 added support for deprecated fields, reworded some todos 2015-04-13 14:21:33 -07:00