Gibraltar Support

Start a new topic

Epected Field Name

Hi
proto file reporting expected field name =>SerializableKeyValue ERROR, I added a reference to the library Common.Types but still doesnt locate 

SerializableKeyValue is a struct

SerializableKeyValue Common.Types.SerializableKeyValue<int?, int?> age_of_range = 3;
SerializableKeyValue<int?, int?> days_on__range = 4; 

Error in proto file; in Core and Client

packages 
ContractCore packages use
Google.Protobuf version (3.13.0)
Grpc.AspNetCore version is 2.31.0

ContractCore.Client
Google.Protobuf version (3.111.2)
Grpc.Net.ClientFactory (2.26.0
Grpc.Tools 2.26.0

All the above packages have a yellow triangle!

library Common; when running Migrate didn't copy all files, had to move manually  


kind regards

Peter


Hi Peter,


I suspect ReCode doesn't know how to create a Protobuf message for SerializableKeyValue<T1, T2>. Protobuf doesn't really support generic types except for its `map<tkey, tvalue>` type. We need to find a better way to handle this.


Could you post the code for the SerializableKeyValue type? Or at least the basic definition, with the fields, properties and constructors?


Thanks,

Mark

Hi Mark


Thank for the reply, 


Namespace Common.Types

{

[Serializable]

public struct SerializableValueKeys<X, Y>

{

public X Key{get; set;}


public Y Key{get; set;}

}

}



In Contract core and Client can you explain why



Dto; Enums; classes have been copied from IBus.Facade library into proto directory and root directory, why so many copies?



A youtube video made a comment that gRPC cannot always be used to replace REST as gRPC doesn’t have any 

API for external use?


Would you be able to offer more detailed info about the above?



Do you have any good reference or books on the subject?


A lot of the samples on github are very basic 


Kind regards

Peter

Hi Mark 

issues with yellow triangles resolved was using 2019 preview, reverted to 2019 no problems


Peter



Hi Mark 

have spent a number of days assessing Recode to identify whether or not the application does deliver what it says on the box


I have undertaken this exercise in the event that I get my next contract that this tool does intact work


I am in prest with what it can do but can not prove whether or not it will deliver a full conversion



Currently testing a project which uses WCF Proxy, Facade pattern etc which returns about 400 error mainly property missing errors


A number of errors not implemented due to trial, with a number of blank request, Async methods, is this due to the trial or unable to generate the code


I can see you have put a lot of time in creating the app, but would only consider buy if 


My next contract requires conversion, and can prove to what extent ReCode can generate the code, I don’t expect the app to be a 100 percent but current there are to many black holes, unknowns


would it be possible to allow me to use a full licence key to identify Recode full potential, I will of course report to you my findings.




Kind regards

Peter

Hi Peter,


Sorry for the delay in responding, I've been away on holiday.


I am working on adding support for custom generic types to ReCode, this should be released in an update shortly.


Regarding the multiple copies of types: your converted solution includes both your original, hand-coded DTO, Enum, etc types, and the Protobuf-generated types that match to these. The Protobuf types are only used for the gRPC service, and are converted to and from your original types when your application code is called. The reason the classes show in the Protos folder is that we generate additional partial class code to handle implicit conversion between the types.


Regarding gRPC vs ReST: you can create a public API using gRPC as long as you publish the .proto file(s) so that people can generate their own clients. Google provide gRPC versions of a lot of their Google Cloud APIs, as well as ReST versions. I suspect the video comment was that the API can't be accessed without a generated client, unlike HTTP APIs.


I wrote a book with Microsoft called "gRPC for WCF Developers" which you might find useful: https://docs.microsoft.com/en-us/dotnet/architecture/grpc-for-wcf-developers/


I'll defer to Kendall on the full license key question.


Hope that helps,

Mark

Hi Peter -sorry for the delay in responding.  Even with a trial license you can contact support and open a ticket to work on problems like this.  That said, I'll ping this over to Mark Rendle to work with you on.

Login to post a comment