hubcaps icon indicating copy to clipboard operation
hubcaps copied to clipboard

Dependency conflict when using hubcaps together with hyper 0.14

Open mfelsche opened this issue 3 years ago • 0 comments

🐛 Bug description

In a project using both hyper 0.14 and hubcaps together we hit an version conflict.

The culprit is in the usage of hyperx and its overly strict specification of lots of dependencies: https://github.com/dekellum/hyperx/issues/36

I would go ahead and replace hyperx with headers in a PR if this is accepted as a solution.

I personally cannot use hubcaps with my project right now, which requires hyper through another 3rd party dependency (i.e. rocket 0.5.0-rc.1).

🤔 Expected Behavior

hubcaps should work together with any version of hyper.

👟 Steps to reproduce

Example Cargo.toml:

[package]
name = "hubcaps-hyperx"
version = "0.1.0"
edition = "2018"


[dependencies]
hubcaps = "0.6"

[dependencies.hyper]
version = "0.14.9"
default-features = false
features = ["http1", "http2", "runtime", "server", "stream"]

This one choses a special hyper dependency with custom features. Interestingly hubcaps works fine with just hyper = 0.14, but not with the dependency above.

Output of cargo build:

    Updating crates.io index
error: failed to select a version for `httparse`.
    ... required by package `hyperx v1.0.0`
    ... which is depended on by `hubcaps v0.6.0`
    ... which is depended on by `hubcaps-hyperx v0.1.0 (/Users/mw029l/dev/rust/hubcaps-hyperx)`
versions that meet the requirements `>=1.0, <1.4` are: 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `httparse v1.4.0`
    ... which is depended on by `hyper v0.14.9`
    ... which is depended on by `hubcaps-hyperx v0.1.0 (/Users/mw029l/dev/rust/hubcaps-hyperx)`

failed to select a version for `httparse` which could resolve this conflict

🌍 Your environment

rust: 1.55 hubcaps version: 0.6.2

mfelsche avatar Oct 21 '21 12:10 mfelsche