Comments (12)
@karlseguin Glad to hear that! Please let me know if there's any problem for you. I'll try to fix the problems ASAP π¬
from protobuf.
Hi Tony. I'm also very interested in using this instead of exprotobuf. We do need oneofs though. Do you have an estimate of when you expect them to be ready for use?
from protobuf.
@meadoch1 I'm working on it now! I hope to finish it within these two days. Will ping you when it's done.π
from protobuf.
Wow, that's great news. Thanks! Since you're doing maps and oneof can I assume it's proto3 compatible otherwise too?
from protobuf.
@meadoch1 Yes. But I think I'd better add more tests about compatibility :)
from protobuf.
π
from protobuf.
@tony612 how is the progress on oneof coming?
from protobuf.
from protobuf.
That's good news. I'll pull it and give it a try soon. Thanks!
from protobuf.
@meadoch1 OK. I can release a new version if you think there're no serious issues. It is worth mentioning that the usage for oneof is a little different:
TestMsg.Oneof.new(first: {:a, 42})
In this example, :first
is the oneof field, :a
is the actual field and 42
is the actual value. This can be refered from the tests, like https://github.com/tony612/protobuf-elixir/blame/master/test/protobuf/protoc/integration_test.exs#L22. Please give some feedback about this design. It's not easy to decide how to implement oneof in dynamic type language like Elixir.
I'll add documents after my holiday ends these days.
from protobuf.
I'll see what I can shake out of it, but it may be a couple of weeks before I get it vetted well. I'll reply back here with results.
from protobuf.
I've gotten a chance to work with the library some at this point, porting an app from exprotobuf to your library. I found using protobuf-elixir to be good and love that it validates on encoding. That solves several problems that we've been encountering. The Oneof syntax is no more unwieldy than in exprotobuf and I think simply reflects that Oneofs are more complex than simply nested messages. Unfortunately I don't have a good thought on how to structure them differently.
I'd think it's good and worth cutting a new version to make official. Thanks for all your work on this.
from protobuf.
Related Issues (20)
- How to use type specs? HOT 2
- Invalid field number 0 when decoding binary data HOT 3
- JSON decoding should work with "." in FieldMask path
- Can't create Firestore.V1.Value HOT 3
- Decoding Invalid Strings sometimes raise MatchError instead of Protobuf.DecodeError
- How to encode oneof fields? HOT 1
- The plugin one gets with "$ mix escript.install hex protobuf" seems to be old or broken HOT 2
- Let's release 1.0.0 HOT 2
- Encoding oneof attribute results in invalid struct HOT 2
- There's something wrong to get `.[...]` type
- Add option to use type_check during struct generation HOT 2
- (UndefinedFunctionError) function Protobuf.Encoder.encode/2 is undefined or private when running benchmarks HOT 1
- Error while trying to compile: google/cloud/secretmanager/v1/resources.proto HOT 1
- Any support unusable
- Consideration in generating options in Messages in OTP 26 HOT 3
- Inconsistent behaviour when encoding oneof HOT 3
- Can JSON decoder be loose on constraints about float? HOT 1
- `Protobuf.encode/1` does not actually verify struct in some cases HOT 2
- lib/elixirpb/pb_extension.pb.ex is missing in the package
- Warning on Elixir 1.16 + OTP 25 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 protobuf.