-
Notifications
You must be signed in to change notification settings - Fork 508
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
add a use super::*
from modules for enum implementations
#244
Comments
just hardcoding a However, in cases where there is nothing to import (which is most cases) it throws an |
I've solved that particular issue by using the full path: I wonder how @adeschamps didn't need to do that, maybe something to do with rust2015 module system. |
Well that is certainly the right solution. It never occurred to me to use the "absolute" path of the module. I guess I just assumed that it wouldn't be available to the submodule either. |
I'm going to close this out, @vincentdephily's solution is the correct one. Please feel free to re-open if there's something more |
@vincentdephily
|
@yiv I'm guessing you're missing |
Hey all. I'm trying to take a stab at enabling the JSON portion of conformance tests as per @danburkert 's suggestion in #75
I have attempted to add the
use serde::Serialize
and include it in the Cargo.toml accordingly. This so that when it is included here it should have the appropriate dependencies.However, I am running into the error below, the problem is that there are modules declared in within the scope of the generated struct files. We need some way to instruct prost to inject some statements such as
use ...
at the top of each module that it creates.Would it be reasonable to add an
use super::*
at the top of every module that is created for protobuf enums? This would allow any dependencies to be retrieved and would hopefully work as intended. If that won't work.. we might need aConfig
method that would allow us to inject arbitrary lines.The text was updated successfully, but these errors were encountered: