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

the version option is deprecated -- but which "style_edition" should I set? #6340

Closed
RalfJung opened this issue Sep 21, 2024 · 5 comments · Fixed by #6361
Closed

the version option is deprecated -- but which "style_edition" should I set? #6340

RalfJung opened this issue Sep 21, 2024 · 5 comments · Fixed by #6361
Labels
documentation good first issue Issues up for grabs, also good candidates for new rustfmt contributors

Comments

@RalfJung
Copy link
Member

I am now getting warnings like this:

Warning: the `version` option is deprecated. Use `style_edition` instead.

I assume this refers to version = "Two" in my rustfmt.toml. However, how do I find out which value for style_edition this corresponds to?

@ytmimi
Copy link
Contributor

ytmimi commented Sep 21, 2024

It's mentioned in the changelog. Do you think the warning message should be changed to include that information?

@ytmimi
Copy link
Contributor

ytmimi commented Sep 21, 2024

We should probably update the configuration docs too:

@ytmimi ytmimi added good first issue Issues up for grabs, also good candidates for new rustfmt contributors documentation labels Sep 21, 2024
@RalfJung
Copy link
Member Author

RalfJung commented Sep 22, 2024

It would be good to include a link with some sort of context in the error, yes. Like an issue tracking the deprecation of this field and giving actionable advice for what to do.

@calebcartwright
Copy link
Member

I think we can update the warning text as well with the corresponding specific value of style_edition to use

@RalfJung
Copy link
Member Author

RalfJung commented Sep 23, 2024

Two is likely the only value version is explicitly set to, so it'd probably suffice to just cover that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue Issues up for grabs, also good candidates for new rustfmt contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants