nicoburns / blessed-rs

A community guide to the Rust ecosystem
https://blessed.rs
1.17k stars 66 forks source link

Potentially add a tooling section #26

Closed CosmicHorrorDev closed 1 year ago

CosmicHorrorDev commented 1 year ago

Not sure if it's outside the scope of this website, but there are some useful external tools like

epage commented 1 year ago

I'd add "release automation". I list several tools in this space on cargo release's README

epage commented 1 year ago

Maybe also cargo expand and either cargo bloat or cargo llvm-lines.

Probably cargo-edit as well though cargo rm will be in 1.66, there is still cargo upgrade.

nicoburns commented 1 year ago

Tooling section added. Leaving this issue open for people to add more tool suggestions.

epage commented 1 year ago

Thanks!

In looking at it, the docs.rs links seems less useful.

nicoburns commented 1 year ago

Hmm... yes, good point. I've added custom links (mostly to github repos) specifically to this section. This automatically suppresses the doc links.

CosmicHorrorDev commented 1 year ago

Other cargo plugins I have installed that I also see recommended often

djc commented 1 year ago

I would probably not mention cargo-outdated, which has limited utility once you use cargo upgrade (which is included in cargo-edit).

I think cargo-deny is great and probably merits a mention. It encompasses cargo-audit and could probably also replace cargo-license (which I'm not that familiar with).

pacak commented 1 year ago

cargo-outdated would repeatedly pull the same git repo over and over again if you have git dependencies (slow) and would crash without producing any useful output if it can't figure out how to upgrade something.

cargo-upgrades is much better in that respect - no redundant pulls, no crashes.

cargo upgrade is pretty meh since it mixes both semver compatible and semver incompatible changes - you usually want to upgrade semver incompatible stuff one by one.

pacak commented 1 year ago

cargo-show-asm might be useful somewhere around "Performance" part of the tooling section.

djc commented 1 year ago

cargo upgrade is pretty meh since it mixes both semver compatible and semver incompatible changes - you usually want to upgrade semver incompatible stuff one by one.

The current version does actually offer options for this -- I use cargo upgrade --compatible=ignore --incompatible=allow, for example.

nicoburns commented 1 year ago

I would probably not mention cargo-outdated, which has limited utility once you use cargo upgrade

My workflow is similar to pacak's: I upgrade semver compatible versions using a simple command (cargo update can do this natively: no need for a separate tool). For major/minor changes I usually want a list of available versions which I can selectively upgrade. I want to upgrade a single library at a time, fix any breakage, then do the next one. For this I need a list of available updates. A command that just upgrades everything isn't very useful (although a command that upgraded a single library to the latest version would be).

epage commented 1 year ago

cargo upgrade --dry-run will report a report similar to cargo outdated. We are wanting to settle on a design to stablize in cargo and figured the table would be directly helpful and could allow reducing the need for extra commands (similarly, cargo add can act as a minimal feature editor).

A command that just upgrades everything isn't very useful (although a command that upgraded a single library to the latest version would be).

cargo upgrade can do that with cargo upgrade --package clap (or cargo upgrade -p clap for short) which works well when combined with --dry-run for seeing what upgrade options are available. I should check with the cargo team if there is a reason against adding the common dry-run short of -n to existing cargo commands which would make more more comfortable adding it to cargo upgrade.

pacak commented 1 year ago

The current version does actually offer options for this -- I use cargo upgrade --compatible=ignore --incompatible=allow, for example.

New behavior seems better, but it's about 5 times slower compared cargo upgrades - 1 vs 5 seconds.

The way it outputs things though is still worse compared to cargo upgrades:

epage commented 1 year ago

@pacak mind providing that feedback on https://internals.rust-lang.org/t/feedback-on-cargo-upgrade-to-prepare-it-for-merging/17101?

EDIT: Ideally with sample output

pacak commented 1 year ago

mind providing that feedback on

Sure. Is there a place on github with this merge request?

Anyway, I'll read though that, but will probably take a day or two.

epage commented 1 year ago

The above internals thread that I linked is where we are collecting feedback and discussing the design on its path towards being merged into cargo.

nicoburns commented 1 year ago

Closing this now. Any additional suggestions can be submitted via a new issue :)