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

Default to stable when no active toolchain is present #4102

Open
soloturn opened this issue Nov 30, 2024 · 3 comments
Open

Default to stable when no active toolchain is present #4102

soloturn opened this issue Nov 30, 2024 · 3 comments

Comments

@soloturn
Copy link

soloturn commented Nov 30, 2024

Problem

having cargo and rustup installed and call it first time it errors out, the only action i did not expect when building something. if you can print "run a command to choose stable" then really the software can choose a reasonable default by itself please. " you did not specify, so i chose ... for you".

❯ cargo build -p daemon --bin kanidmd --release
error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version


@epage
Copy link

epage commented Nov 30, 2024

@rustbot transfer rustup

@rustbot rustbot transferred this issue from rust-lang/cargo Nov 30, 2024
@rami3l
Copy link
Member

rami3l commented Dec 1, 2024

@soloturn Sorry, but I'm a bit confused. How did you install the rustup binary without getting a recent version of cargo? Maybe you have installed it through a third party distribution?

Anyway, this looks like a problem of distribution of responsibility among different subcommands. As far as rustup is concerned, it used to be very smart in that it will install the active toolchain for you before running any proxy command such as cargo, which has caused some problems to our downstream. So a rule that we are enforcing now (see #3635 for more details) is that calling a proxy should not lead to any toolchain installation (which is subsumed by rustup default), and I don't see a point in only setting the default toolchain without installing it, so we might only be able to go as far as giving a hint.

@rami3l rami3l changed the title choose reasonable default instead of erroring out automatically default to stable when no active toolchain is present Dec 1, 2024
@rami3l rami3l changed the title automatically default to stable when no active toolchain is present Default to stable when no active toolchain is present Dec 1, 2024
@soloturn
Copy link
Author

soloturn commented Dec 1, 2024

reading #3635 it makes perfectly sense. but the conclusion drawn might be insufficient. giving an error message fulfills "not silent", do something and print it as well is not silent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants