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

libp2p with the quic feature enabled results in duplicated versions of libp2p-core in the dependency graph #5546

Closed
romac opened this issue Aug 10, 2024 · 1 comment · Fixed by #5547

Comments

@romac
Copy link

romac commented Aug 10, 2024

Summary

With the following Cargo.toml, the libp2p-core library is present twice at different versions in the dependency graph:

[package]
name = "tmp-kooxgz"
version = "0.1.0"
edition = "2021"

[dependencies]
libp2p = { version = "0.54.0", features = ["quic"] }

Expected behavior

Only a single version of libp2p-core is present in the dependency graph.

Actual behavior

The libp2p-core library is present twice at different versions in the dependency graph:

❯ cargo tree -i libp2p-core@0.42.0
libp2p-core v0.42.0
├── libp2p v0.54.0
│   └── tmp-kooxgz v0.1.0 (/Users/romac/.cache/cargo-temp/tmp-koOxGz)
├── libp2p-allow-block-list v0.4.0
│   └── libp2p v0.54.0 (*)
├── libp2p-connection-limits v0.4.0
│   └── libp2p v0.54.0 (*)
├── libp2p-quic v0.11.0
│   └── libp2p v0.54.0 (*)
└── libp2p-swarm v0.45.1
    ├── libp2p v0.54.0 (*)
    ├── libp2p-allow-block-list v0.4.0 (*)
    └── libp2p-connection-limits v0.4.0 (*)
❯ cargo tree -i libp2p-core@0.41.3
libp2p-core v0.41.3
└── libp2p-tls v0.4.1
    └── libp2p-quic v0.11.0
        └── libp2p v0.54.0
            └── tmp-kooxgz v0.1.0 (/Users/romac/.cache/cargo-temp/tmp-koOxGz)

It looks to me like this due to libp2p-quic still depending on libp2p-tls v0.4.1 instead of v0.5.0.

Relevant log output

No response

Possible Solution

Aside from hurting compile times, I don't know whether the duplication is a problem in practice, as I haven't myself seen any compile or runtime errors after upgrading, but it would likely not hurt to only keep the latest version of libp2p-core in the dependency graph.

Version

0.54.0

Would you like to work on fixing this bug ?

Yes

@romac romac changed the title libp2p with quic feature enabled in duplicated versions of libp2p-core libp2p with the quic feature enabled results in duplicated versions of libp2p-core Aug 10, 2024
@romac romac changed the title libp2p with the quic feature enabled results in duplicated versions of libp2p-core libp2p with the quic feature enabled results in duplicated versions of libp2p-core in the dependency graph Aug 10, 2024
@mergify mergify bot closed this as completed in #5547 Aug 10, 2024
@mergify mergify bot closed this as completed in 0ca1388 Aug 10, 2024
@romac
Copy link
Author

romac commented Aug 11, 2024

@jxs Thanks for the quick fix, works perfectly! 🙏

TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this issue Sep 14, 2024
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 a pull request may close this issue.

1 participant