killercup / killercup/cargo-edit
`cargo install cargo-edit --no-default-features` fails to compile
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.5k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
[zack@laptop ~]$ cargo install cargo-edit --no-default-features
⋮
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `clap`
--> /home/zack/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cargo-edit-0.13.7/src/errors.rs:55:11
|
55 | impl From<clap::Error> for CliError {
| ^^^^ use of unresolved module or unlinked crate `clap`
|
= help: if you wanted to use a crate named `clap`, use `cargo add clap` to add it to your `Cargo.toml`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `clap`
--> /home/zack/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cargo-edit-0.13.7/src/errors.rs:56:18
|
56 | fn from(err: clap::Error) -> CliError {
| ^^^^ use of unresolved module or unlinked crate `clap`
|
= help: if you wanted to use a crate named `clap`, use `cargo add clap` to add it to your `Cargo.toml`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `cargo-edit` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-edit v0.13.7`, intermediate artifacts can be found at `/tmp/cargo-installgFtuDU`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Machine info:
[zack@laptop ~]$ uname -a
Linux laptop 6.16.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 23 Aug 2025 15:32:49 +0000 x86_64 GNU/Linux
[zack@laptop ~]$ cargo -V
cargo 1.89.0 (c24e10642 2025-06-23)
If one must enable certain features, ideally compile_error would be used informing a user the minimum set of features that must be enabled; otherwise any use of clap should be gated behind a cfg attribute based on the set of features that enable it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce cargo install cargo-edit --no-default-features and start with the reported src/errors.rs references to clap::Error, then inspect the feature configuration that controls clap. Done means the command either compiles without unresolved clap references or reports a clear minimum-feature requirement; verify with the no-default-features installation command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100