jet / falanx

Generates F# code from protobuf schema for binary and json format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add .net <-> scala to test suite

enricosada opened this issue · comments

add a test to check interop between .net (falanx) and scala, using same contract and default generator for scala.

both program will use same proto file, and will serialize and deserialize to a file.

like

  1. .net (falanx) serialize
  2. scala (scalapb) deserialize the message
  3. scala (scalapb) serialize the same message
  4. .net (falanx) deserialize the message

example schema

message ItemLevelOrderHistory {
  required string client_id = 0
  required string retail_sku_id = 1
  required double category_id = 2
  required string brand = 3
  required string product = 4
  repeated float order_tss = 5
}

cc: @7sharp9 @gusty
Actually, let's discuss testing more generically. While scala compatibility would be nice thing to ensure, what C# generator does? Can we leverage C# testing code base? There is so much more then just "structure A can do round trip to scala and back".

C# contains compatibility test, as I understand, it is v2-v3 compatibility. if so, we are not concerned about v2.
And unit tests in https://github.com/protocolbuffers/protobuf/tree/master/csharp/src/Google.Protobuf.Test
How can we minimize effort? Is modification of C# tests possible, so would we inject our generator and run all unit tests with minimal/no modification?

Comments?

added test for binary with #57

We dont support V2 at all.

Theres three different streams of testing needed:

binary cross platform compatibility
code generation correctness
and canonical json conformity to the proto3 spec

If theres anything of use in that repo then we could use it, although we don't currently use any reference to that repo at all, I suspect the interfaces being tested etc would prevent a lot from working.

added also json with #60