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

Stabilise --skip-children #5024

Open
Timmmm opened this issue Oct 13, 2021 · 6 comments
Open

Stabilise --skip-children #5024

Timmmm opened this issue Oct 13, 2021 · 6 comments
Labels
stabilisation-request A request to stabilise an option or argument

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Oct 13, 2021

It's unlikely that Rustfmt 2.0 will be released for a while, if ever, so it would be nice if --skip-children could be stabilised so we can use stable Rustfmt with arc lint (a Phabricator tool). It's been around for "a long time".

@calebcartwright
Copy link
Member

I'd forgotten this still hadn't been stabilized 👀 It's been around for north of four years so it would certainly be a candidate for stabilization, however, I think this may turn out to be a good thing.

Changing this behavior (non-recursive by default, if you are running rustfmt directly then include the new --recursive flag which cargo fmt will do on your behalf) is something that I wanted to try to push through anyway, and it'll be easier to do so since this is not a stable option.

I'll see if the dev tools team is onboard with this, and hopefully will be able to make the main change soon. If not, will certainly consider stabilizing this option.

@calebcartwright calebcartwright added the stabilisation-request A request to stabilise an option or argument label Oct 23, 2021
@Timmmm
Copy link
Contributor Author

Timmmm commented Nov 25, 2021

Did you manage to ask the dev tools team about it?

@calebcartwright
Copy link
Member

Updates will be posted as and when they are available, and the absence of posted updates means that there are no updates. Stay tuned

@Timmmm
Copy link
Contributor Author

Timmmm commented May 19, 2022

Can you actually change the default behaviour to be non-recursive? Wouldn't that be a breaking change?

@calebcartwright
Copy link
Member

calebcartwright commented May 20, 2022

I feel like there's a lot of subtext behind your question which I'll largely avoid except to say that I have no intention of stabilizing this option unless something dramatic changes (and yes I realize that's a change in position from several months ago, but that's due to this being part of a broader strategy that's evolved since then)

Can you actually change the default behaviour to be non-recursive? Wouldn't that be a breaking change?

This is of course part of the calculus and has always been part of the considerations and discussions. It's a grey area, but no not necessarily breaking. This can be done in a way that's transparent with no behavioral change for cargo fmt, causes no errors for the rarer cases of those running rustfmt directly, and fixes a long standing bug in editor formatting behavior.

@Timmmm
Copy link
Contributor Author

Timmmm commented May 20, 2022

I feel like there's a lot of subtext behind your question

I'm not sure what you mean. I was just wondering if you really were considering making a breaking change to the behaviour, since this project seems to care quite a lot about stability (e.g. requiring nightly for --unstable-features). It definitely is a breaking change, but I'm not a zero-breaking-changes extremist so I'm all for it (maybe selfishly since it doesn't break anything of mine!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stabilisation-request A request to stabilise an option or argument
Projects
None yet
Development

No branches or pull requests

2 participants