Skip to content

Fails with latest cargo-generate #1245

Closed
@orhun

Description

@orhun

🐛 Bug description

I'm using cargo-generate from Arch repositories:

$ halp --no-help cargo-generate
(°ロ°)  checking 'cargo-generate -V'
\(^ヮ^)/ success '-V' argument found!
cargo generate 0.18.1

I just built wasm-pack 0.11.0 and it fails like the following:

$ wasm-pack new test
Error: expected value at line 1 column 1
Caused by: expected value at line 1 column 1

However, if I uninstall cargo-generate and let wasm-pack handle that:

$ pacman -R cargo-generate
$ wasm-pack new test
[INFO]: ⬇️  Installing cargo-generate...
🐑  Generating a new rustwasm project with name 'test'...

It works as expected.

I tracked down this issue with using strace and found out wasm-pack actually installs an older version of cargo-generate:

$ /home/orhun/.cache/.wasm-pack/cargo-generate-9349d7b81730c28d/cargo-generate -V
cargo generate 0.17.3

Thus I concluded this is something that has changed between the latest version of cargo-generate and the version that is used by wasm-pack.

🤔 Expected Behavior

Successful run.

👟 Steps to reproduce

  1. Install cargo-generate (pacman -S cargo-generate)
  2. Build 0.11.0 and install wasm-pack using this PKGBUILD.

🌍 Your environment

wasm-pack version: 0.11.0
rustc version: rustc 1.68.0 (2c8cc3432 2023-03-06) (Arch Linux rust 1:1.68.0-1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions