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

Code generated by roslibrust_codegen_macro relies on roslibrust_codegen #216

Open
Carter12s opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@Carter12s
Copy link
Collaborator

We're close to having the dependencies in the generated code correctly cleaned up. The last problem here is that a crate that wants to use the macro, can't just depend on the macro crate. It has to both depend on the macro crate and roslibrust_codegen for things to work out correctly.

The generated code contains chunks like:
#[serde(crate = "::roslibrust_codegen::serde")]

That don't resolve without roslibrust_codegen being listed as a dependency.

I'm not actually sure if there is a clean fix here? I'm not an expert on the rules of proc_macro crates and what they can re-export.

I think ideally roslibrust_codegen_macro would be able to be able to re-export the needed dependencies from roslibrust_codegen and be able to pass a flag into codegen so that the generated code uses "::roslibrust_codegen_macro::serde" instead?

@Carter12s Carter12s changed the title roslibrust_codegen_macro code relies on roslibrust_codegen Code generated by roslibrust_codegen_macro relies on roslibrust_codegen Dec 18, 2024
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

1 participant