-
-
Notifications
You must be signed in to change notification settings - Fork 786
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
serde 1.0.186 always depends on serde_derive, even if the derive feature is not used #2601
Comments
Is it actually built? I think it only shows up in Cargo.lock and doesn't actually get built, right? Even so, we could move the lockstep logic to serde_derive's Cargo.toml |
I don't know. I haven't merged and built those changes yet. |
OK, here are some files for a minimal example: Cargo.lock
Cargo.toml
src/main.rs
When I run a
... and the Cargo.lock grows from the previous 16 lines to 65 lines:
All of those newly added packages are direct or indirect dependencies of However, you seem to be right, @oli-obk. None of those additional packages are built when running |
I would have loved to do this. As far as I know, it is not possible, because the dependency in that direction would be circular. Serde_derive depends on serde (on "some" platforms) and serde depends on serde_derive (in some feature combinations) which is enough for Cargo to reject, despite "some" platforms not actually being any platforms. error: cyclic package dependency: package `serde v1.0.186` depends on itself. Cycle:
package `serde v1.0.186`
... which satisfies path dependency `serde` (locked to 1.0.186) of package `serde_derive v1.0.186`
... which satisfies path dependency `serde_derive` (locked to 1.0.186) of package `serde v1.0.186` I think circular |
Overall I think this is working as intended as currently implemented.
|
When updating
serde
from v1.0.185 to v1.0.186 in my project, cargo also pulls inserde_derive
as new dependency, even though the derive feature is not in use. (See striezel/corona#155.) This should not happen.I suppose the cause for this is #2588.
The text was updated successfully, but these errors were encountered: