-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Explicitly depend on serde_derive #14450
Conversation
Does this make |
No this would make cargo build That is if we can get the library authors of the listed crates change this as well. |
use serde::{de, Deserialize}; | ||
use serde::{ | ||
de, | ||
Deserialize::{self}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ::{self}
is actually required (it explicitly only imports the type namespace), without it this will import both the derive attribute and the trait, while we already have the derive attribute in scope via the serde_derive::Deserialize
import (which is only the case because the derive
feature is still enabled thanks to the deps).
I'll move this PR to draft though and wait until we can maybe get our deps to move, then we don't need these path shenanigans.
Turns out using |
I think we can do that with https://github.com/matklad/macro-dep-test I mean, serde might up doing that upstream, but, even before that, I think we ourselves can depend on serde with derive feature enabled under any() cfg. That’ll bind the versions of any existing serde release. |
serde
depending onserde_derive
increases our compile times by a good chunk which is unfortunate as that doesn't have to be the case.This PR explicitly changes that for our workspace members, though unfortunately the following dependencies still activate that feature for us:
And I am unsure whether these libraries are open to changing that.