Skip to content

Select distribution strategy for rustfix/cargo-fix #52272

Closed
@alexcrichton

Description

@alexcrichton

Currently we distribute cargo fix subcommand through cargo install cargo-fix. I discussed locally on discord though with @aturon and @Mark-Simulacrum that I'd personally prefer to distribute cargo fix by default to users. In any case, a decision should be made!

I believe we have one of three options here to us:

  • Do nothing - continue to ship cargo fix through cargo install. This has the benefit of not needing any work to get it done. It has a downside, however, of requiring users to opt-in to acquiring cargo fix. Additionally it introduces the possibility for version skew where cargo fix is either too old or too new by accident.
  • Ship a rustup component - here we'd enable something like rustup component add cargo-fix or automatically enable it by default for new installations. This allows us to control versioning and provide it by default, but it requires a relatively large amount of rustbuild/dist work.
  • Merge cargo-fix into Cargo - here we'd merge the cargo fix subcommand inside the rustfix repository to Cargo itself upstream, depending on the rustfix crate from crates.io. This has the benefits of shipping a rustup component but it's a little easier to do in terms of distribution. The downside of this approach is that, like a component, it ties rustfix to the trains so getting out a hotfix is more fuss (needs a full Rust release)

I'm personally inclined to go the route of "merge cargo-fix into Cargo". I don't believe rustfix has had many major changes and/or big bugs reported, so merging it into Cargo should require little-to-no fuss and the need for a hotfix should be pretty low. I'm curious to hear what others think though!

cc @killercup

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions