Problem
I just ran into an issue where I mistyped the name of a package in my workspace, and got an error message that is completely unrelated, which is confusing and led me into a complete different direction than what would have fixed the issue.
Steps
- Try to
cargo build -p nonexisting-pkg --all-features a package that does not exist in the workspace
- Get
error: cannot specify features for packages outside of workspace
Possible Solution(s)
I would expect an error message along the lines of
"Did not find package nonexisting-pkg in workspace"
Notes
No response
Version
cargo 1.85.0 (d73d2caf9 2024-12-31)
release: 1.85.0
commit-hash: d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
commit-date: 2024-12-31
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: NixOS 24.11.0 [64-bit]
Problem
I just ran into an issue where I mistyped the name of a package in my workspace, and got an error message that is completely unrelated, which is confusing and led me into a complete different direction than what would have fixed the issue.
Steps
cargo build -p nonexisting-pkg --all-featuresa package that does not exist in the workspaceerror: cannot specify features for packages outside of workspacePossible Solution(s)
I would expect an error message along the lines of
"Did not find package
nonexisting-pkgin workspace"Notes
No response
Version