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

dep: add full feature to derive_more #1335

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

tcoratger
Copy link
Contributor

As per the derive_more documentation and specifically https://github.com/JelteF/derive_more?tab=readme-ov-file#installation, it seems that in last versions of Rust, to compile properly, we need to specify features to avoid errors of this type:

error[E0432]: unresolved imports `derive_more::Deref`, `derive_more::DerefMut`, `derive_more::From`, `derive_more::IntoIterator`
   --> crates/consensus/src/request.rs:10:19
    |
10  | use derive_more::{Deref, DerefMut, From, IntoIterator};
    |                   ^^^^^  ^^^^^^^^  ^^^^  ^^^^^^^^^^^^ no `IntoIterator` in the root
    |                   |      |         |
    |                   |      |         no `From` in the root
    |                   |      no `DerefMut` in the root
    |                   no `Deref` in the root

Since we are using quite a few elements currently, we are choosing the full configuration for now.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to reproduce the compiler error,
can we instead enable the required features in the consensus crate?

@tcoratger
Copy link
Contributor Author

how to reproduce the compiler error, can we instead enable the required features in the consensus crate?

Maybe my version of rust or something, anyway seems to be gone now but I've added the specific features we need for the consensus crate to be consistent with the other usages on the other crates.

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably due to outdated deps locally, eg alloy-primitives might've enabled these already more recently, but you have an older version of it that doesn't do that; anyway doesn't hurt

@DaniPopes DaniPopes merged commit c8c8e68 into alloy-rs:main Sep 23, 2024
26 checks passed
lwedge99 pushed a commit to sentioxyz/alloy that referenced this pull request Oct 8, 2024
* dep: add full feature to derive_more

* fix comments
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.

3 participants