Skip to content

cargo fmt has surprising behavior in a workspace without --all #2280

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

Closed
sgrif opened this issue Dec 14, 2017 · 0 comments
Closed

cargo fmt has surprising behavior in a workspace without --all #2280

sgrif opened this issue Dec 14, 2017 · 0 comments

Comments

@sgrif
Copy link

sgrif commented Dec 14, 2017

I had recently gotten out of the habit of type --all since it seemed that cargo fmt did what I wanted without it when I ran it from the root of the workspace. However, after a build failure that occurred when updating to 0.3.1 (unrelated: that was a surprising amount of churn...), I noticed that cargo fmt when run in Diesel's root directory is only formatting the diesel repo, and nothing else. I'm assuming it's choosing that because that directory is the first of our 23 workspace members.

This is really surprising behavior. I would expect it to either:

  • Do exactly the same thing as cargo fmt --all
  • Error and complain that I'm in a workspace, not a real project.
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

1 participant