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

Tracking issue: rustfmt 2.0 #3887

Closed
7 of 8 tasks
topecongiro opened this issue Oct 25, 2019 · 12 comments
Closed
7 of 8 tasks

Tracking issue: rustfmt 2.0 #3887

topecongiro opened this issue Oct 25, 2019 · 12 comments

Comments

@topecongiro
Copy link
Contributor

topecongiro commented Oct 25, 2019

Also, see Milestone for 2.0.

Blocking issues

Help wanted

Non-blocking issues

Any issues concerning formatting bugs will be non-blocking.

@calebcartwright
Copy link
Member

I didn't find any related issues on this, but I'd suggest considering an update/refresh of some sections in the README as part of 2.0

As an example, the Limitations section starts with several mentions of approaching 1.0:

Rustfmt tries to work on as much Rust code as possible, sometimes, the code doesn't even need to compile! As we approach a 1.0 release we are also looking to limit areas of instability; in particular, post-1.0, the formatting of most code should not change as Rustfmt improves. However, there are some things that Rustfmt can't do or can't do well (and thus where formatting might change significantly, even post-1.0). We would like to reduce the list of limitations over time.

@calebcartwright
Copy link
Member

Also, I'm still working on chains ATM, but I'd be happy to work on adding the --recursive flag and/or deprecating the --backup flag if those are still up for grabs?

@topecongiro
Copy link
Contributor Author

I didn't find any related issues on this, but I'd suggest considering an update/refresh of some sections in the README as part of 2.0

Will do. Thanks!

Also, I'm still working on chains ATM, but I'd be happy to work on adding the --recursive flag and/or deprecating the --backup flag if those are still up for grabs?

Yes, you are more than welcome to work on those :)

@calebcartwright
Copy link
Member

Just to clarify, the goal is just to deprecate the --backup flag, not to entirely remove the flag/FilesWithBackupEmitter/etc., correct?

@scampi
Copy link
Contributor

scampi commented Nov 2, 2019

@calebcartwright I would think so, just a deprecation for --backup

@calebcartwright
Copy link
Member

Thanks @scampi! Seems straightforward enough for --backup, though in the case of --skip-children, won't there be the potential for conflict once --recursive is added?

For example, if a user still has skip_children in a rustfmt.toml file, and then rustfmt is invoked with the --recursive flag (most likely scenario being via cargo fmt ... since that will include --recursive by default), what's the expected outcome?

Should rustfmt exit with an error? Or emit a warning and let one of the conflicting options take precedence?

@scampi
Copy link
Contributor

scampi commented Nov 4, 2019

Since rustfmt is invoked with the --recursive flag, it should have higher priority over the skip_children option in rustfmt.toml.
I think that logic should be applied regardless of the deprecation here, i.e., CLI flags have precedence over rustfmt.toml. What do you think ?

@calebcartwright
Copy link
Member

I'd vote for rustfmt to exit with an error. From my perspective, recursive and skip_children are separate, mutually exclusive config options and "failing loudly" in the presence of both seems logical.

It feels like a similar situation as when a user specifies both --check and --emit flags; you can't have both so rustfmt exits with an error

@scampi
Copy link
Contributor

scampi commented Nov 4, 2019

Indeed makes sense @calebcartwright , error it is then!

@topecongiro
Copy link
Contributor Author

Closing this as we are using the GitHub's milestone to track issues for 2.0.

@Keavon
Copy link

Keavon commented Feb 15, 2021

What's the status of rustfmt 2.0's release? The milestone tracking issue only shows one incomplete issue, but it hasn't had activity in months. The rustfmt-2.0 branch in the repo also has not had a commit since 2019.

@calebcartwright
Copy link
Member

@Keavon - 2.0 development has been happening on the master branch for a long time, the rustfmt-2.0 branch hasn't had any activity because it hasn't been used/needed.

version = "2.0.0-rc.2"

To be perfectly transparent though, rustfmt 2.0 may not happen ever, but even if it does it certainly won't happen any time soon. If and when there will be a 2.0, rest assured that will be communicated loudly and broadly. Until then I'd suggest largely forgetting about it and working with the 1.x versions of rustfmt available today.

You can find a bit more information in #4346, but please note that neither that issue nor this one are intended for status update questions.

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

No branches or pull requests

4 participants