Comments (4)
Why is it not possible to write self-describing services in .NET for Protocol Buffers v3? What do you mean by self-describing services? Do you mean code-first with attributes like:
https://github.com/mgravell/protobuf-net#1-first-decorate-your-classes
from froto.
Have in mind to create a service registration protocol which allows a generic service to register it's FileDescriptorProto (or Set) at run-time, so that the service's metadata can be inspected as well as to provide transcoding from/to JSON, without recompiling the server being registered with. That's what I meant by "self-describing services".
The official C# generator from Google will not generate code for proto2, but proto2 is required if one wants to define and process custom options in .NET. So... I am hunting for an alternative.
from froto.
I had to read up more about custom options
. I have't used them, but they could be useful for altering the code generation. It looks to me like you can put custom options in a proto3 descriptor. Did I miss something?
https://developers.google.com/protocol-buffers/docs/proto#options
https://developers.google.com/protocol-buffers/docs/proto3#options
https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto#L35-L37
from froto.
Hah. What you missed is that while custom options can be used in proto3, they require proto2 syntax to define (custom options use the extend
keyword, which is proto2 only). Further, the Google C# code generator only supports generating proto3 constructs, so while it will recognize custom options, it will not generate code to access them. :P
from froto.
Related Issues (20)
- PulsarApi.proto HOT 3
- need stable CI builds on master HOT 5
- new maintainer please HOT 4
- Parse error when optional/required/repeated is missing HOT 3
- Support for proto3? HOT 1
- Span<T> HOT 4
- Are there any plans for a proto3 canonical json serialization? HOT 1
- Are the methods mentioned in Serialization.fs currently consumed anywhere in code? HOT 1
- UnknownFields in the serializer seems to be unused, can this be removed or is it unimplemented? HOT 14
- Proto2 required fields are not properly serialized HOT 1
- Would it be possible to get a 0.51 nuget release of the parser and serializer? HOT 21
- Proto3 oneOf type does not parse HOT 4
- gRPC on top of ASP.NET Core 3.0 HOT 4
- Add interface implementation of IMessage to Froto.Serialiation to make code gen have less dependencies HOT 6
- Enum in message body error HOT 4
- Allow identifiers to start with underscore HOT 1
- SourceLink seems to fail while building HOT 3
- position in ProtoField are defined differently
- gRPC on Alpine docker requires libc6-compat
- Make TP work with .NET Core tooling HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from froto.