A dependency conflict I can't resolve

Hey folks, having a gnarly dependency conflict I don't know how to resolve.

error: failed to select a version for `uuid`.                                                                      
    ... required by package `indexed_db_futures v0.4.1`                                                            
    ... which satisfies dependency `indexed_db_futures = "^0.4.1"` of package `matrix-sdk-indexeddb v0.7.0`        
    ... which satisfies dependency `matrix-sdk-indexeddb = "^0.7.0"` of package `matrix-sdk v0.7.0`                
    ... which satisfies dependency `matrix-sdk = "^0.7"` of package `testlib v0.1.0 (C:\Users\nolan\projects\testlib)`                                                                                                                
versions that meet the requirements `^1.5.0` are: 1.10.0, 1.9.1, 1.9.0, 1.8.0, 1.7.0, 1.6.1, 1.6.0, 1.5.0          
                                                                                                                   
the package `indexed_db_futures` depends on `uuid`, with features: `wasm-bindgen` but `uuid` does not have these features.                                                                                                            
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.                                                              
                                                                                                                   
                                                                                                                   
all possible versions conflict with previously selected packages.                                                  
                                                                                                                   
  previously selected package `uuid v1.10.0`                                                                       
    ... which satisfies dependency `uuid = "^1.10"` of package `testlib v0.1.0 (C:\Users\nolan\projects\testlib)`  
                                                                                                                   
failed to select a version for `uuid` which could resolve this conflict                                            

To be clear, I think I understand what the message is saying, I just don't get why indexed_db_futures is in my dependency tree at all. matrix-sdk has:

[features]
default = ["e2e-encryption", "automatic-room-key-forwarding", "sqlite", "native-tls"]
testing = ["matrix-sdk-sqlite?/testing", "matrix-sdk-indexeddb?/testing", "matrix-sdk-base/testing"]

e2e-encryption = [
    "matrix-sdk-base/e2e-encryption",
    "matrix-sdk-base/message-ids",
    "matrix-sdk-sqlite?/crypto-store",        # activate crypto-store on sqlite if given
    "matrix-sdk-indexeddb?/e2e-encryption",   # activate on indexeddb if given
]
js = ["matrix-sdk-common/js", "matrix-sdk-base/js"]

sqlite = ["dep:matrix-sdk-sqlite", "matrix-sdk-sqlite?/state-store"]
bundled-sqlite = ["sqlite", "matrix-sdk-sqlite?/bundled"]
indexeddb = ["dep:matrix-sdk-indexeddb"]

So it's technically in the tree, but it seems like it shouldn't be built because I'm not specifying that feature explicitly and it isn't default. What am I missing?

You can reproduce this with the below Cargo.toml. It's a bit contrived, but I have a project that pulls in a newer uuid as a transitive dependency which triggers this.

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

[dependencies]
matrix-sdk = "0.7"
uuid = "1.10"

Thanks for any help.

Looks like the indexed-db-futures crate enabled the wasm-bindgen feature of uuid, but this feature was never intended to exist in the first place. Wasm-bindgen support is always enabled on wasm and Make use of newer Cargo features for specifying dependencies by KodrAus · Pull Request #727 · uuid-rs/uuid · GitHub removed this accidental feature in uuid 1.7. If you depend on uuid 1.6 or lower rather than uuid 1.10, cargo should be able to downgrade the uuid dependency to 1.6. There is already an open issue on the indexed-db-futures crate: Remove UUID "wasm-bindgen" feature · Issue #35 · Alorel/rust-indexed-db · GitHub and PR: Update UUID and corresponsing feature flags by TiemenSch · Pull Request #36 · Alorel/rust-indexed-db · GitHub The last commit was 9 months ago though.

Ah, thanks so much for helping with that. I went ahead and commented on
the blocking PRs so hopefully it'll either get merged or forked soon.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.