Wasm-pack: wasm-bindgen dep check should not fail on dep map

Created on 24 Jul 2018  ·  4Comments  ·  Source: rustwasm/wasm-pack

I poked around other issues and didn't see any related info, so sorry if I'm missing something here... I was playing around with an existing wasm-pack-happy project by enabling wasm-bindgen's "serde-serialize" feature... everything was all good until I tried rerunning the project through wasm-pack:

❯ wasm-pack init -t nodejs
invalid type: map, expected a string for key `dependencies.wasm-bindgen`
Caused by: invalid type: map, expected a string for key `dependencies.wasm-bindgen`

Is there anything I can do to work around this?

Happy Cargo.toml:

[dependencies]
wasm-bindgen = "^0.2"

Unhappy Cargo.toml:

[dependencies.wasm-bindgen]
version = "^0.2"
features = ["serde-serialize"]

❯ rustc --version        
rustc 1.29.0-nightly (874dec25e 2018-07-21)
❯ wasm-pack --version
wasm-pack 0.4.1
❯ wasm-bindgen --version
wasm-bindgen 0.2.13
❯ uname -a
# OSX 10.13.5
Darwin sloveless.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

Wonderful project! TIA!

PR attached bug help wanted

All 4 comments

Hey @turboladen thanks so much for the bug report and sorry you are running into this issue! My best bet is that this is actually an error with wasm-bindgen but I'll have to reproduce it myself and poke at it a bit. In the meantime, I'm going to tag @alexcrichton into this to see if he happens to have any thoughts! Feel free to update the issue if you run into any new info or ideas!

ok! i know what the issue is. when wasm-pack checks that you have wasm-bindgen as a dependency it only expects the naive declaration, not the map version. we'll need to update this code (feat(nav): add naive nav) to be able to handle the 2 different ways to list wasm-bindgen as a dep

Awesome! Thanks for checking into this so quickly!

heads up this will be included in a point release i intend to get out today! thanks again for the report- i super appreciate it <3 :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbtcollins picture rbtcollins  ·  3Comments

ishitatsuyuki picture ishitatsuyuki  ·  5Comments

fitzgen picture fitzgen  ·  4Comments

gliheng picture gliheng  ·  3Comments

marcoscaceres picture marcoscaceres  ·  3Comments