roslibrust icon indicating copy to clipboard operation
roslibrust copied to clipboard

Stop leaking internal dependencies through generated code...

Open Carter12s opened this issue 3 years ago • 2 comments

Due to lack of use of $crate in the generated proc_macro code, crates using the proc_macro must themselves depend on serde (and now smart_default) to not have compiler errors.

We should fix this!

Carter12s avatar Dec 22 '22 23:12 Carter12s

@ssnover

Someday can you take a look at: https://github.com/Carter12s/roslibrust/tree/fix_dep_leak

I'm incredibly stuck... For some reason what I'm attempting to do works perfectly for smart_deafult, but not for serde...

I'm trying to follow: https://users.rust-lang.org/t/proc-macros-using-third-party-crate/42465/4 but clearly I'm missing something.

Carter12s avatar Dec 23 '22 00:12 Carter12s

Looks like this is due to serde: https://github.com/serde-rs/serde/issues/1465

I think the fix mentioned in the thread will work, pushed it to the branch if you want to check it out.

ssnover avatar Feb 04 '23 20:02 ssnover