Skip to content

Should settings.toml allow unqualified toolchain names? #4945

Description

@rami3l

Split from #4944 (comment).

For now, rustup default <toolchain> resolves the full toolchain name from <toolchain>, which could be a function of default_host_tuple, and then stores that in settings.toml.

I can see two downsides of the current approach:

  • If the user changes default_host_tuple after setting default_toolchain to a generic name such as stable, the default toolchain would still be in the original host triple since it has been resolved beforehand.
  • This has made the config file hostile to cross-platform dotfile management, since one may want to use the stable toolchain specific to the default host tuple of that platform.

Maybe rustup can start storing the unresolved name (or if it is breaking too many things, under a new subcommand/option) for default_toolchain instead? The idea is that one can always store the fully qualified toolchain name to go back to the old behavior.

This way:

  • In the first point, after changing default_host_tuple, the default toolchain will be resolved in the new host triple.
  • In the second point, you will be able to use stable in your dotfiles as default_toolchain without problems.

Update: The same logic also applies to rustup override set, as discovered in #5044.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions