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

wasm-bindgen dep check should not fail on dep map #221

Closed
turboladen opened this issue Jul 24, 2018 · 4 comments · Fixed by #224
Closed

wasm-bindgen dep check should not fail on dep map #221

turboladen opened this issue Jul 24, 2018 · 4 comments · Fixed by #224
Labels
bug Something isn't working help wanted Extra attention is needed PR attached there's a PR open for this issue
Milestone

Comments

@turboladen
Copy link

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!

@ashleygwilliams ashleygwilliams added bug Something isn't working needs reproduction labels Jul 24, 2018
@ashleygwilliams ashleygwilliams added this to the 0.5.0 milestone Jul 24, 2018
@ashleygwilliams
Copy link
Member

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!

@ashleygwilliams ashleygwilliams changed the title Unable to use wasm-bindgen's "serde-serialize" feature wasm-bindgen dpe check should not fail on dep map Jul 24, 2018
@ashleygwilliams ashleygwilliams added help wanted Extra attention is needed and removed needs reproduction labels Jul 24, 2018
@ashleygwilliams
Copy link
Member

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

@ashleygwilliams ashleygwilliams changed the title wasm-bindgen dpe check should not fail on dep map wasm-bindgen dep check should not fail on dep map Jul 24, 2018
@turboladen
Copy link
Author

Awesome! Thanks for checking into this so quickly!

@ashleygwilliams ashleygwilliams modified the milestones: 0.5.0, 0.4.2 Jul 24, 2018
@ashleygwilliams
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed PR attached there's a PR open for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants