Skip to content

rustc --version should not trigger/initiate toolchain updates #3943

@rami3l

Description

@rami3l

Transferred from rust-lang/rust#127649.

I expect rustc --version to just output version information, like how --version would behave in any other application.

In my humble opinion, rustc --version should not be responsible for upgrading toolchains. The user should do that either explicitly or maybe when running rustc with any other flags for which it makes more sense for silent updates to be performed.

The --version argument should really just be a 'request' for version information and not trigger any other actions.

To be clear... I think it's ok to trigger silent updates for different calls to rustc with different arguments, but I believe --version should really only output the version (and maybe a hint that the current version is a mismatch by what is specified in rust-toolchain.toml).

Performing silent updates, and maybe even more actions, may even pose security risks to users that do not expect these actions to happen silently when running a command like rustc --version.

Originally posted by @Doineann in #3635 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions