You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
I'm a bit confused: are you saying that because serde/structopt's derive have macros that themselves have extern crate MYSELF that means that cargo requires the crate to be in Cargo.toml?
Whew... does a workaround for this exist if a fix is made in serde/structopt?
Edit: I see you've opened issues asking that exact question to the authors of those crates.
Let's say you write a crate called "lorem", which has #[derive(Deserialize)] struct Foo { x: i32 }. The proc macro that of the Deserialize derive generates code that has extern crate serde as serde_; in it. This means that post-expansion your "lorem" crate now has extern crate serde … in it. So the compiler will try to load serde from your dependencies – which only works if serde is in your list of dependencies.
The structopt derive macro doesn't work unless the current project allows
extern crate structopt;
.This means, user of quicli must
cargo add structopt
, which is not that cool.This is part of this code which expands to something like:
Maybe we can add a feature to either suppress or customize this upstream?
Same is also true for serde! (Thanks to this code)
The text was updated successfully, but these errors were encountered: