PolyMeilex / rfd

Rusty File Dialog
MIT License
524 stars 60 forks source link

rfd 0.14 has dependency conflicts for winit apps on macOS #180

Closed VisualEhrmanntraut closed 4 months ago

VisualEhrmanntraut commented 4 months ago

rfd/examples/winit-example

cargo run
    Updating crates.io index
error: failed to select a version for `futures-sink`.
    ... required by package `zbus v4.0.0`
    ... which satisfies dependency `zbus = "^4.0"` of package `ashpd v0.8.0`
    ... which satisfies dependency `ashpd = "^0.8"` of package `rfd v0.14.0 (/Users/visual/Downloads/rfd-8646b508e9c85c29e1865e83d2f7f444595d98ac)`
    ... which satisfies path dependency `rfd` of package `wasm-example v0.1.0 (/Users/visual/Downloads/rfd-8646b508e9c85c29e1865e83d2f7f444595d98ac/examples/winit-example)`
versions that meet the requirements `^0.3.25` are: 0.3.30, 0.3.29, 0.3.28, 0.3.27, 0.3.26, 0.3.25

all possible versions conflict with previously selected packages.

  previously selected package `futures-sink v0.3.24`
    ... which satisfies dependency `futures-sink = "^0.3.24"` (locked to 0.3.24) of package `futures v0.3.24`
    ... which satisfies dependency `futures = "^0.3.10"` (locked to 0.3.24) of package `wasm-example v0.1.0 (/Users/visual/Downloads/rfd-8646b508e9c85c29e1865e83d2f7f444595d98ac/examples/winit-example)`

failed to select a version for `futures-sink` which could resolve this conflict

egui/examples/file_dialog w/ rfd 0.13 -> 0.14

cargo run --example file_dialog
    Updating crates.io index
error: failed to select a version for `uds_windows`.
    ... required by package `zbus v4.0.0`
    ... which satisfies dependency `zbus = "^4.0"` of package `ashpd v0.8.0`
    ... which satisfies dependency `ashpd = "^0.8"` of package `rfd v0.14.0`
    ... which satisfies dependency `rfd = "^0.14"` of package `file_dialog v0.1.0 (/Users/visual/Downloads/egui-master/examples/file_dialog)`
versions that meet the requirements `^1.1.0` are: 1.1.0

all possible versions conflict with previously selected packages.

  previously selected package `uds_windows v1.0.2`
    ... which satisfies dependency `uds_windows = "^1.0.2"` of package `zbus v3.14.0`
    ... which satisfies dependency `zbus = "^3.14"` of package `accesskit_unix v0.6.2`
    ... which satisfies dependency `accesskit_unix = "^0.6.1"` of package `accesskit_winit v0.16.0`
    ... which satisfies dependency `accesskit_winit = "^0.16.0"` of package `egui-winit v0.26.2 (/Users/visual/Downloads/egui-master/crates/egui-winit)`
    ... which satisfies path dependency `egui-winit` (locked to 0.26.2) of package `eframe v0.26.2 (/Users/visual/Downloads/egui-master/crates/eframe)`
    ... which satisfies path dependency `eframe` (locked to 0.26.2) of package `confirm_exit v0.1.0 (/Users/visual/Downloads/egui-master/examples/confirm_exit)`

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

local project

error: failed to select a version for `zvariant_utils`.
    ... required by package `zbus_macros v4.0.0`
    ... which satisfies dependency `zbus_macros = "=4.0.0"` of package `zbus v4.0.0`
    ... which satisfies dependency `zbus = "^4.0"` of package `ashpd v0.8.0`
    ... which satisfies dependency `ashpd = "^0.8"` of package `rfd v0.14.0`
    ... which satisfies dependency `rfd = "^0.14.0"` (locked to 0.14.0) of package `plist-oxide v0.1.0 (/Users/visual/Developer/ProjectSources/Tooling/PlistOxide)`
versions that meet the requirements `=1.1.0` are: 1.1.0

all possible versions conflict with previously selected packages.

  previously selected package `zvariant_utils v1.0.1`
    ... which satisfies dependency `zvariant_utils = "=1.0.1"` (locked to 1.0.1) of package `zbus_macros v3.15.0`
    ... which satisfies dependency `zbus_macros = "=3.15.0"` (locked to 3.15.0) of package `zbus v3.15.0`
    ... which satisfies dependency `zbus = "^3.14"` (locked to 3.15.0) of package `accesskit_unix v0.6.2`
    ... which satisfies dependency `accesskit_unix = "^0.6.1"` (locked to 0.6.2) of package `accesskit_winit v0.16.1`
    ... which satisfies dependency `accesskit_winit = "^0.16.0"` (locked to 0.16.1) of package `egui-winit v0.26.2`
    ... which satisfies dependency `egui-winit = "^0.26.2"` (locked to 0.26.2) of package `eframe v0.26.2`
    ... which satisfies dependency `eframe = "^0.26.2"` (locked to 0.26.2) of package `plist-oxide v0.1.0 (/Users/visual/Developer/ProjectSources/Tooling/PlistOxide)`

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

Disabling default features seems to alleviate the problem. Enabling either xdg-portal or async-std causes it (both need to be disabled).

PolyMeilex commented 4 months ago

does typical cargo update helps?

VisualEhrmanntraut commented 4 months ago

does typical cargo update helps?

No.

PolyMeilex commented 4 months ago
cd examples/winit-example/
cargo build # Failed on lock conflicts
cargo update
cargo build # Should works as expected
sobaq commented 4 months ago

No luck rebuilding the lock file.

$ rm Cargo.lock 
$ cargo update
    Updating crates.io index
error: failed to select a version for `core-graphics`.
    ... required by package `winit v0.29.2`
    ... which satisfies dependency `winit = "^0.29"` of package `accesskit_winit v0.16.0`
    ... which satisfies dependency `accesskit_winit = "^0.16.0"` of package `egui-winit v0.26.2`
    ... which satisfies dependency `egui-winit = "^0.26.2"` of package `eframe v0.26.2`
    ... which satisfies dependency `eframe = "^0.26.2"` of package `x`
versions that meet the requirements `^0.23.1` are: 0.23.1

all possible versions conflict with previously selected packages.

  previously selected package `core-graphics v0.23.0`
    ... which satisfies dependency `core-graphics = "^0.23"` of package `cocoa v0.25.0`
    ... which satisfies dependency `cocoa = "^0.25.0"` of package `eframe v0.26.2`
    ... which satisfies dependency `eframe = "^0.26.2"` of package `x`

failed to select a version for `core-graphics` which could resolve this conflict

I can also confirm disabling xdg-portal works.

PolyMeilex commented 4 months ago

Reported upstream

PolyMeilex commented 4 months ago

Fix upstream did the trick for me in egui example, can you check in your projects? (cargo update should now resolve)

VisualEhrmanntraut commented 4 months ago

Works for me. Thanks.