Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't inline fields of embedded messages, keep them as separated messages #92

Open
erizocosmico opened this issue Jun 26, 2017 · 1 comment

Comments

@erizocosmico
Copy link
Contributor

Right now, if we do something like the following:

type Model struct {
  ID int64
}

type User struct {
  Model
  Name string
}

The result of the proto generated by proteus is:

message User {
  int64 id = 1;
  string name = 2;
}

Which works fine right now, but we should maybe change it because as a result, Model is not generated and does not get its ProtoMessage and all the mumbo jumbo it should have generated for it, which can be a mess for reflection-based marshal/unmarshal if we finally make it work with that.

Right now it works, but we should evaluate if this is worth fixing/changing or not in the long run.

@Serabe
Copy link
Contributor

Serabe commented Jul 5, 2017

If done, would be a breaking change, thus I would say we should add a tag to that field not to be treated as inlined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants