You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not entirely sure this is a bug report or a feature request but I'll describe anyway what happened.
We have a fairly large workspace over at https://github.com/libp2p/rust-libp2p. Previously, the root Cargo.toml was both a crate and a workspace manifest. For various reasons, I wanted to move away from that.
That root crate is edition = 2021 which implies the new dependency resolver (version 2). Thus, we did not specify resolver = 2 explicitly as part of the [workspace] table. We need the new feature resolver because we have some target-specific features to activiate:
What happened now is that by splitting the root manifest into a separate crate, the edition = 2021 disappeared and cargo was now falling back using v1 of the resolver, resulting in a failing build because the features of the snow dependency within the Cargo.toml of libp2p-noise were incorrectly merged.
This was especially surprising because I was running cargo build --package libp2p which does have edition = 2021. I guess this could be considered a bug? I am not sure.
The problem was fixed by explicitly specifying resolver = 2 in the [workspace] table.