Skip to content

Fails to use profile from workspace #1490

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

Open
NiklasEi opened this issue Apr 8, 2025 · 0 comments
Open

Fails to use profile from workspace #1490

NiklasEi opened this issue Apr 8, 2025 · 0 comments

Comments

@NiklasEi
Copy link

NiklasEi commented Apr 8, 2025

🐛 Bug description

When specifying a profile e.g. wasm-pack build --profile wasm-release a_crate, it will fail if the crate is part of a workspace and the workspace is not a package itself.

Error: failed to parse manifest: /home/code/project/Cargo.toml
Caused by: failed to parse manifest: /home/code/project/Cargo.toml
Caused by: TOML parse error at line 1, column 1
  |
1 | [workspace]
  | ^
missing field `package`

🤔 Expected Behavior

wasm-pack should use the profile defined in the workspace Cargo.toml.

👟 Steps to reproduce

  1. Create a workspace with a profile called wasm-release
  2. Add a crate to the workspace
  3. Try to build that crate with wasm-pack build --profile wasm-release <crate>

🌍 Your environment

wasm-pack version: 0.13.1
rustc version: 1.85.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant