-
Notifications
You must be signed in to change notification settings - Fork 884
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
Auto-install toolchains more consistently #2252
Conversation
7e0a9ac
to
af1f031
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good. Let's see how the CI feels.
c0a8e03
to
c579abe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think the names of the test functions are okay as-is, then you're good to merge, otherwise rename them and then merge :D
expect_err( | ||
expect_stderr_ok( | ||
config, | ||
&["rustc"], | ||
for_host!("toolchain 'nightly-{0}' is not installed"), | ||
&["rustc", "--version"], | ||
"info: installing component", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, I feel the function name for the test isn't brilliant. If you can't be bothered to fix it I don't mind, otherwise it'd be nice if it were renamed something like remove_default_toolchain_auto_reinstalls
or somesuch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove_default_toolchain_autoinstalls
is what my fingers put put :P. I noticed after doing it that the very next test, for overridden toolchains, had the same naming bug, but ce la vie.
expect_err( | ||
expect_stderr_ok( | ||
config, | ||
&["rustc"], | ||
for_host!("toolchain 'nightly-{0}' is not installed"), | ||
&["rustc", "--version"], | ||
"info: installing component", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here.
This combines all auto-installation logic to the root of the codepaths leading to running a binary, which should lead to auto-installation happening for all cases, as long as a toolchain has been selected. Config.find_default no longer verifies the toolchain in order to permit this auto-installation to take place in one location; the callers of find_default do not generally need verified toolchains, so this should be fine.
c579abe
to
0c5178e
Compare
This combines all auto-installation logic to the root of the codepaths
leading to running a binary, which should lead to auto-installation
happening for all cases, as long as a toolchain has been selected.
Config.find_default no longer verifies the toolchain in order to permit
this auto-installation to take place in one location; the callers of
find_default do not generally need verified toolchains, so this should
be fine.