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

Option for companion objects to extend specified classes/traits #105

Closed
trungfinity opened this issue Apr 27, 2016 · 1 comment · Fixed by #107
Closed

Option for companion objects to extend specified classes/traits #105

trungfinity opened this issue Apr 27, 2016 · 1 comment · Fixed by #107

Comments

@trungfinity
Copy link
Contributor

I know currently we have the option to extend generated classes with custom super classes/traits:

message MyMessage {
  option (scalapb.message).extends = "MySuperClass";
  int32 dummy = 999;
}

However, I often find myself wanting to extend generated companion objects with custom super classes/traits, maybe something like that will help:

message MyMessage {
  option (scalapb.message).extends = "MySuperClass";
  option (scalapb.message).companion_extends = "MySuperCompanionClass";
  int32 dummy = 999;
}

Please let me know if this would align with your roadmap. I'm happy to submit a PR. Thanks.

@thesamet
Copy link
Contributor

Yes, PR for this will be welcome.

trungfinity pushed a commit to trungfinity/ScalaPB that referenced this issue Apr 28, 2016
thesamet added a commit that referenced this issue Apr 28, 2016
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

Successfully merging a pull request may close this issue.

2 participants