mrk-its / bevy_webgl2

WebGL2 renderer plugin for Bevy game engine
MIT License
172 stars 46 forks source link

Failed to select a version for 'wasm-bindgen' #46

Open The-DevBlog opened 3 years ago

The-DevBlog commented 3 years ago

Im adding the required dependencies to my .toml file. I keep running into an error "failed to select a version for 'wasm-bindgen'.

Here is my toml file dependencies:

[dependencies]
bevy = {version = "0.5.0", default-features = false}
bevy_webgl2 = "0.5.2"
cfg-if = "1.0.0"
js-sys = "0.3.50"
parking_lot = "0.11.0"
regex = "1.4"
wasm-bindgen = "0.2.69"
web-sys = {version = "0.3.50", features = [
  'Document',
  'Element',
  'HtmlCanvasElement',
  'WebGlBuffer',
  'WebGlRenderingContext',
  'WebGl2RenderingContext',
  'WebGlProgram',
  'WebGlShader',
  'Window',
  'WebGlFramebuffer',
  'WebGlTexture',
  'WebGlUniformLocation',
  'WebGlActiveInfo',
  'WebGlVertexArrayObject',
  'WebGlSync',
]}
winit = {version = "0.24.0", features = ["web-sys"]}

[dev-dependencies]
compile-time-run = "0.2"
getrandom = {version = "0.2.3", features = ["wasm-bindgen"]}
rand = "0.8"

Here is the error:

error: failed to select a version for `wasm-bindgen`.
    ... required by package `js-sys v0.3.50`
    ... which is depended on by `bevy_blazor v0.1.0 (C:\Users\Andrew\Desktop\code\projects\Blazor-Bevy\Blazor-Bevy)`
versions that meet the requirements `^0.2.73` are: 0.2.74, 0.2.73

all possible versions conflict with previously selected packages.

  previously selected package `wasm-bindgen v0.2.69`
    ... which is depended on by `bevy_webgl2 v0.5.2`
    ... which is depended on by `bevy_blazor v0.1.0 (C:\Users\Andrew\Desktop\code\projects\Blazor-Bevy\Blazor-Bevy)`

failed to select a version for `wasm-bindgen` which could resolve this conflict

I've changed the version for wasm-bindgen back and forth but no luck.

GuillaumeDesforges commented 2 years ago

I tried to fork and patch: https://github.com/GuillaumeDesforges/bevy_webgl2

But got

error: failed to select a version for `syn`.
    ... required by package `darling_core v0.13.0`
    ... which satisfies dependency `darling_core = "=0.13.0"` of package `darling v0.13.0`
    ... which satisfies dependency `darling = "^0.13"` of package `ndk-macro v0.3.0`
    ... which satisfies dependency `ndk-macro = "^0.3.0"` of package `ndk-glue v0.5.0`
    ... which satisfies dependency `ndk-glue = "^0.5"` of package `bevy_internal v0.8.0`
    ... which satisfies dependency `bevy_internal = "^0.8.0"` of package `bevy v0.8.1`
    ... which satisfies dependency `bevy = "^0.8.1"` of package `rust-webpack-template v0.1.0 (/home/arsleust/perso/rust/battle)`
versions that meet the requirements `^1.0.69` are: 1.0.99, 1.0.98, 1.0.97, 1.0.96, 1.0.95, 1.0.94, 1.0.93, 1.0.92, 1.0.91, 1.0.90, 1.0.89, 1.0.88, 1.0.87, 1.0.86, 1.0.85, 1.0.84, 1.0.83, 1.0.82, 1.0.81, 1.0.80, 1.0.79, 1.0.78, 1.0.77, 1.0.76, 1.0.75, 1.0.74, 1.0.73, 1.0.72, 1.0.71, 1.0.70, 1.0.69

all possible versions conflict with previously selected packages.

  previously selected package `syn v1.0.65`
    ... which satisfies dependency `syn = "=1.0.65"` of package `bevy v0.5.0`
    ... which satisfies dependency `bevy = "^0.5.0"` of package `bevy_webgl2 v0.5.2 (https://github.com/GuillaumeDesforges/bevy_webgl2#0335f6a5)`
    ... which satisfies git dependency `bevy_webgl2` of package `rust-webpack-template v0.1.0 (/home/arsleust/perso/rust/battle)`

failed to select a version for `syn` which could resolve this conflict
mockersf commented 2 years ago

This crate is not needed for Bevy and WebGL2 since Bevy 0.6, and has very little chances of still working...