Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
brianmay opened this issue May 9, 2024 · 10 comments
Labels

Comments

@brianmay
Copy link

brianmay commented May 9, 2024

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
@brianmay brianmay added the bug label May 9, 2024
@somemarco
Copy link

+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).

@yanickrochon
Copy link

yanickrochon commented May 11, 2024

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

@schvv31n
Copy link
Contributor

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

@brianmay
Copy link
Author

Should we report a bug against indexmap then?

@Jungle666
Copy link

anyone solved ?

@brianmay
Copy link
Author

Not as far as I am aware. I think somebody needs to open a bug against indexmap.

(I haven't had time recently)

Anybody know what version of indexmap broke backwards compatibility?

@pratyushV-l
Copy link

+1 this issue getting this when running the example script in the yew documentation

@brianmay
Copy link
Author

brianmay commented Jun 3, 2024

Not sure this helps, but I did the following, by adding fake indexmap dependancy:

  • Upgraded indexmap to 2.0.0 - it works.
  • Upgraded indexmap to 2.0.1 - it fails.
  • Downgraded indexmap to 2.0.0 - it still fails. What?
  • Revert all changes - it works.

Huh? I verified in each case using "cargo tree" that the yew/indexmap was the expected version.

Then I did a "cargo update" (no other changes), which updated indexmap to 2.2.6 everywhere. It still seems to work.

So now I am unclear if indexmap 2.2.6 is the solution, or if this is just coincidence. And I haven't been able to test my binary yet (unrelated issue with clippy after updating everything).

@schvv31n
Copy link
Contributor

schvv31n commented Jun 3, 2024

It still fails after reverting the version because Cargo.lock will probably probably hold onto the previously set 2.0.1, since it assumes that going from 2.0.0 to 2.0.1 shouldn't be breaking

@brianmay
Copy link
Author

brianmay commented Jun 3, 2024

Thats what I thought too, but "cargo tree" clearly showed the yew -> indexmap dependency was now on 2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants