yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications

Home Page:https://yew.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the trait bound `implicit_clone::unsync::IMap<_, _>: From<indexmap::IndexMap<K, V>>` is not satisfied

brianmay opened this issue · comments

Problem

I keep getting this error when I try to update a package like serde_yaml or replace serde_yaml with serde_yml line 216.

the trait bound `implicit_clone::unsync::IMap<_, _>: From<indexmap::IndexMap<K, V>>` is not satisfied
the following other types implement trait `From<T>`:
  <implicit_clone::unsync::IMap<K, V> as From<indexmap::map::IndexMap<K, V>>>
  <implicit_clone::unsync::IMap<K, V> as From<std::rc::Rc<indexmap::map::IndexMap<K, V>>>>
  <implicit_clone::unsync::IMap<K, V> as From<&'static [(K, V)]>>

This comes from
.../yew-0.21.0/src/html/conversion/into_prop_value.rs

I am somewhat puzzled what is going on here. Perhaps the update of indexmap from 2.0.0 to 2.2.6 changed the API.

Steps To Reproduce

See brianmay/robotica-rust#518

Expected behavior
No errors.

Screenshots
As above.

Environment:

  • Yew version: 0.21.0
  • Rust version: 1.78.0
  • Target, if relevant: wasm32-unknown-unknown
  • Build tool, if relevant: wasm-pack
  • OS, if relevant: Linux

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later

+1 this issue, currently trying out yew with the getting started example per documentation and the same error appears, even if i remove the dynamic/state parts (e.g. only trying to render an h1).

Sane thing. I have tried a few examples, including those in the docs, and the result is always this crash.

Update: this problem does not seem to be there with version 0.20

Update 2: this commit seems to be the problem, no? 71b0f20

This is a problem with indexmap breaking backwards-compatibility between minor releases, what worked for me was deleting the Cargo.lock in my project.

Should we report a bug against indexmap then?