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

Allow generated Message derive path to be changed #729

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

Zagitta
Copy link
Contributor

@Zagitta Zagitta commented Oct 11, 2022

I have a use case where I'm building a wrapper around prost-build in combination with prost-reflect to extract protobuf custom options and do some magic.
However, since this wrapper, let's call it my-build, will be used from a large number of different crates it would be ideal to have the my-core crate re-export prost to simplify upgrades down the line.

In order to facilitate this use case I've added a simple configuration option which would allow me to change the default #[derive(::prost::Message)] to #[derive(::my_crate::prost::Message)].

Hopefully, it's a simple enough change that it won't be too controversial 😄

Please let me know if there's anything you'd like me to change.

Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM seems like a fine addition

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@LucioFranco LucioFranco merged commit 73150d8 into tokio-rs:master Oct 21, 2022
@liyongjing
Copy link

missing path for property type, ::prost::alloc, ::prost::bytes ?

@LucioFranco
Copy link
Member

Yeah, we should cover those as well

@LucioFranco
Copy link
Member

Here is the follow up PR #740

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 this pull request may close these issues.

None yet

3 participants