Skip to content
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

upgrade: Show technical debt #899

Open
reneleonhardt opened this issue Jul 15, 2024 · 3 comments
Open

upgrade: Show technical debt #899

reneleonhardt opened this issue Jul 15, 2024 · 3 comments

Comments

@reneleonhardt
Copy link

reneleonhardt commented Jul 15, 2024

Feature Request

Show technical debt numbers in cargo upgrade similar to like badges do to encourage increasing maintainability, minimizing vulnerabilities, improving code and using new features.
The simplest number would be to sum up days between the installed version and the last stable release for all found upgrades (12 days between the old and new version of the first upgrade, 34 days between the old and new version of the second upgrade, ...).
If you count compatible and incompatible updates separately you can show the reduced technical debt after a successful upgrade and the remaining technical debt for incompatible upgrades.

Example:

$ cargo upgrade --verbose
    Checking rewrk's dependencies
name  old req compatible latest new req note         debt
====  ======= ========== ====== ======= ====         ====
clap  2       2.34.0     4.5.9  2       incompatible 12 days
http  0.2     0.2.12     1.1.0  0.2     incompatible 34 days
hyper 0.14    0.14.30    1.4.1  0.14    incompatible 56 days
    Technical debt: 102 days
    Checking rewrk-core's dependencies
name  old req compatible latest new req note        
====  ======= ========== ====== ======= ====        
http  0.2     0.2.12     1.1.0  0.2     incompatible 78 days
flume 0.10.14 0.10.14    0.11.0 0.10.14 incompatible 90 days
hyper 0.14    0.14.30    1.4.1  0.14    incompatible 12 days
axum  0.6.20  0.6.20     0.7.5  0.6.20  incompatible 34 days
    Technical debt: 214 days

Please note that crates.io already shows the age of a crate as the very first information below Metadata:
cargo crate Metadata age

Other package managers like npm and bundler already offer an outdated command, this could be used internally by cargo upgrade and offered as a public command as well.

@epage
Copy link
Collaborator

epage commented Jul 15, 2024

FYI development focus has shifted to integrating this command into cargo.

@reneleonhardt
Copy link
Author

Thx for letting me know.
Do all feature cargo-edit requests now have to be addressed against cargo, or do we have to wait until the integration is finished, is there a milestone tracking progress?

@epage
Copy link
Collaborator

epage commented Jul 15, 2024

rust-lang/cargo#12425 is the issue for the current effort. Note that it isn't a drop-in replacement so requests like this won't make as much sense and might be better for rust-lang/cargo#4309

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

2 participants