iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm

Home Page:https://iced.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to resolve dependencies on the `13.0-dev` branch

jdbosser opened this issue · comments

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Using iced (0.13.0-dev) as a dependency makes cargo unable to resolve all the dependencies.

Cargo.toml

[package]
name = "cool_project"
version = "0.1.0"
edition = "2021"

[dependencies]
iced = { version = "0.13.0-dev", git = "https://github.com/iced-rs/iced"}

Running cargo check:

    Updating git repository `https://github.com/iced-rs/iced`
    Updating crates.io index
error: failed to select a version for `web-sys`.
    ... required by package `dark-light v1.1.1`
    ... which satisfies dependency `dark-light = "^1.0"` (locked to 1.1.1) of package `iced_core v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced_core` of package `iced v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced` of package `iced_first_steps v0.1.0 (/home/danb036/rust/iced_first_steps)`
versions that meet the requirements `^0.3` (locked to 0.3.67) are: 0.3.67

all possible versions conflict with previously selected packages.

  previously selected package `web-sys v0.3.69`
    ... which satisfies dependency `web-sys = "^0.3.69"` of package `iced_winit v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced_winit` of package `iced v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced` of package `iced_first_steps v0.1.0 (/home/danb036/rust/iced_first_steps)`

failed to select a version for `web-sys` which could resolve this conflict

The issue appeared on 5dc668f.

Forcing the dependency to the commit before solves the issue.

[package]
name = "cool_project"
version = "0.1.0"
edition = "2021"

[dependencies]
# The rev here is needed, due to this commit makes cargo unable to resolve dependencies. 
iced = { version = "0.13.0-dev", git = "https://github.com/iced-rs/iced", rev = "555ee3e"}

Output of cargo check

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.19s

What is the expected behavior?

Not having dependency conflicts.

Version

master

Operating System

Linux

Do you have any log output?

Updating git repository `https://github.com/iced-rs/iced`
    Updating crates.io index
error: failed to select a version for `web-sys`.
    ... required by package `dark-light v1.1.1`
    ... which satisfies dependency `dark-light = "^1.0"` (locked to 1.1.1) of package `iced_core v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced_core` of package `iced v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced` of package `iced_first_steps v0.1.0 (/home/danb036/rust/iced_first_steps)`
versions that meet the requirements `^0.3` (locked to 0.3.67) are: 0.3.67

all possible versions conflict with previously selected packages.

  previously selected package `web-sys v0.3.69`
    ... which satisfies dependency `web-sys = "^0.3.69"` of package `iced_winit v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced_winit` of package `iced v0.13.0-dev (https://github.com/iced-rs/iced#1c885002)`
    ... which satisfies git dependency `iced` of package `iced_first_steps v0.1.0 (/home/danb036/rust/iced_first_steps)`

failed to select a version for `web-sys` which could resolve this conflict

I see that, downloading the repository and running the examples causes no issues. What makes cargo unable to resolve the dependencies when iced is used as a dependency?

Try to run cargo update manually

That solved it!