Skip to content
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

Merged
merged 2 commits into from
Jan 10, 2020
Merged

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jan 9, 2020

No description provided.

@coveralls
Copy link

coveralls commented Jan 9, 2020

Coverage Status

Coverage remained the same at 86.534% when pulling 003ee0c on philipc:deps into 9630b74 on gimli-rs:master.

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"]
Copy link
Contributor

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.

Copy link
Collaborator Author

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"))]
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Member

@fitzgen fitzgen left a 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.
@philipc philipc merged commit 30131d8 into gimli-rs:master Jan 10, 2020
@philipc philipc deleted the deps branch January 10, 2020 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants