-
Notifications
You must be signed in to change notification settings - Fork 99
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
Update dependencies and make more optional #466
Conversation
read = ["stable_deref_trait"] | ||
write = ["std", "indexmap"] | ||
read = ["arrayvec", "fallible-iterator", "smallvec", "stable_deref_trait"] | ||
write = ["indexmap"] | ||
std = ["fallible-iterator/std", "stable_deref_trait/std"] |
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.
I think this will cause fallible-iterators
to be enabled when std
is enabled but read
is disabled.
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.
Yes, as in the other comment, I don't know how to enable fallible-iterators/std
only if both read
and std
are enabled. So my workaround is to not enable std
for write
.
@@ -40,7 +40,7 @@ | |||
#[macro_use] | |||
extern crate alloc; | |||
|
|||
#[cfg(feature = "std")] | |||
#[cfg(any(feature = "std", feature = "write"))] |
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.
Why not make write
depend on std
instead?
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.
Because I couldn't figure out how to only enable some dependencies if both read
and std
are enabled.
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.
👍
In order for "write" to not depend on these, we also stop "write" from depending on the "std" feature, and instead add it to the "extern crate std;" conditional.
No description provided.