killercup / killercup/cargo-edit

Warning about ignoring workspace dependencies should not display when also upgrading workspace dependencies

Open
#898 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

When upgrading an entire workspace, cargo upgrade first shows `Checking virtual workspace's dependencies` and goes through those, and then goes through the crates in the workspace. When doing the latter, in verbose mode (which is necessary to see the list of crates that need upgrading) it'll print a warning like `warning: ignoring cratename, source is workspace` for every workspace dependency.

This warning would be useful if cargo upgrade was only running on a single package in the workspace, to explain why it doesn't upgrade workspace dependencies. However, in the case where cargo upgrade is already looking at workspace dependencies in the same run, it seems unnecessary.

Suggestion: remember if cargo upgrade looked at workspace dependencies before, and if so:
- Skip printing this warning
- When printing "Checking cratename's dependencies", add "non-workspace" to that line

Contributor guide

Open the contributing guide

Research direction

Start with the cargo upgrade workspace path and reproduce a verbose upgrade on a virtual workspace. Trace where “Checking virtual workspace's dependencies” and “ignoring ..., source is workspace” are emitted; done means the warning is suppressed after workspace dependencies were checked and the later line identifies non-workspace dependencies.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.