wasm_game_of_life icon indicating copy to clipboard operation
wasm_game_of_life copied to clipboard

wasm-bindgen dependency in Cargo.toml is out of date in chapter-zero

Open reillysiemens opened this issue 7 years ago • 3 comments

Describe the bug Without an update of the wasm-bindgen dependency from v0.2.13 to v0.2.17 the initial npm run build-debug on the chapter-zero branch fails to compile.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/rustwasm/wasm_game_of_life.git
  2. cd wasm_game_of_life
  3. git checkout -b chapter-zero origin/chapter-zero
  4. npm install
  5. npm run build-debug

Expected behavior npm run build-debug compiles without error.

Screenshots npm-run-build-debug-error

Additional context It's no trouble to run cargo update -p wasm-bindgen, but I think that slows readers down. Luckily the error messages are very clear, but it might still be intimidating to a newcomer to troubleshoot this.

For what it's worth, I'm using

  • nvm - v0.33.11
  • Node.js - v10.9.0
  • npm - v6.4.0
  • cargo - 1.29.0-nightly (6a7672ef5 2018-08-14)
  • wasm-bindgen-cli - v0.2.17

reillysiemens avatar Aug 22 '18 07:08 reillysiemens

Hey @reillysiemens to avoid this we should put 0.2 as the dep for wasm-bindgen in the Cargo.toml that way it always uses the newest version and not include a Cargo.lock. Can you confirm this works for the code as is today?

mgattozzi avatar Aug 24 '18 14:08 mgattozzi

Yeah, it looks like that'll work just fine, @mgattozzi. I'd be happy to submit that as a fix if you like. :grin: removing-cargo-lock-works

reillysiemens avatar Aug 25 '18 22:08 reillysiemens

Since Cargo.toml in the master branch specifies the wasm-bindgen dependency to be 0.2, this issue is resolved in the master branch and can now be closed :+1: The project still builds and runs successfully as of today (04/29/2020)

JOE1994 avatar Apr 29 '20 21:04 JOE1994