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

deprecate skip_children option #3893

Closed
scampi opened this issue Oct 27, 2019 · 4 comments · Fixed by #3895
Closed

deprecate skip_children option #3893

scampi opened this issue Oct 27, 2019 · 4 comments · Fixed by #3895
Assignees
Milestone

Comments

@scampi
Copy link
Contributor

scampi commented Oct 27, 2019

No description provided.

@scampi scampi added this to the 2.0.0 milestone Oct 27, 2019
@scampi scampi self-assigned this Oct 27, 2019
@jsgf
Copy link

jsgf commented Oct 27, 2019

Why? We're actively using it to format individual files. Is there some other way to get this functionality?

@calebcartwright
Copy link
Member

@jsgf - the new default behavior of rustfmt v2.0 will be to not format sub modules (skip_children) which is why the config option is being deprecated.

An -r/--recursive flag will be added, basically inverting things: rustfmt 2.0 will be disabled by default with an optional opt-in, wheras rusftmt 1.x is enabled by default with an optional opt-out

See also #3587

@jsgf
Copy link

jsgf commented Oct 27, 2019

Ok that's great!

@jeffomatic
Copy link

For folks that are using rustfmt for format-on-save workflows, and are aren't using either 2.0 or the nightlies, here's a script that will emulate --skip-children:

https://gist.github.com/jeffomatic/fa443170b856b1af5ca3aa67e0ea3e65

Hope ya'll don't mind me posting here. I found this thread after stumbling upon rustfmt's somewhat surprising behavior of emitting formatted source of a file's dependencies.

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

Successfully merging a pull request may close this issue.

4 participants