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

Optional .toml extension for rust-toolchain file? #2652

Closed
phil-opp opened this issue Feb 7, 2021 · 4 comments · Fixed by #2653
Closed

Optional .toml extension for rust-toolchain file? #2652

phil-opp opened this issue Feb 7, 2021 · 4 comments · Fixed by #2653

Comments

@phil-opp
Copy link
Contributor

phil-opp commented Feb 7, 2021

Describe the problem you are trying to solve

The rust-toolchain file accepts TOML syntax since #2438, but it still can't have a toml file extension (i.e. rust-toolchain.toml). Thus, the used markup language is not clear to both users and IDEs.

Describe the solution you'd like

Allow an optional .toml extension for the file so that both rust-toolchain and rust-toolchain.toml are valid.

Notes

A similar approach was taken for Cargo's .cargo/config files, which now can be named .cargo/config.toml too: rust-lang/cargo#7295

@kinnison
Copy link
Contributor

kinnison commented Feb 7, 2021

If we were to do this, I'd want to say:

  1. The rust-toolchain.toml file must ONLY support the toml style content
  2. If both are present, use rust-toolchain and emit a warning that rust-toolchain.toml is being ignored

This would match the cargo PR in the top post.

@phil-opp
Copy link
Contributor Author

phil-opp commented Feb 7, 2021

I agree on both points. Should I try to send a PR for this?

@kinnison
Copy link
Contributor

kinnison commented Feb 7, 2021

Sure, if you want to discuss it you can find me on discord too.

@phil-opp
Copy link
Contributor Author

phil-opp commented Feb 7, 2021

Great! I already started looking into it and I'll send a PR in a moment.

Edit: I opened #2653.

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

Successfully merging a pull request may close this issue.

2 participants