-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for the specification of the rustfmt path
In some situations, rustfmt can't be counted on to be in your PATH. In those cases, this adds a format_with(...) function to the builder to specify the path to rustfmt, which is then passed into the new format_with function. A small dance is done here with fmt(...) and format_with(...) to preserve the public API of the crate, so this, if I understand correctly, should be an API-compatible change. I'm not 100% this would be the way I would want to go, but I wanted to put it up for discussion. There are more roundabout approaches I could take to format each file in our build system, but I had deferred from doing that previously. The relevant section of a public draft of the implementation I had put together is here: https://github.com/bazelbuild/rules_rust/pull/479/files#r583439508 Also open to suggestions as to where this should be tested. I didn't see, but may have missed, a good place for it.
- Loading branch information
David Freese
committed
Feb 26, 2021
1 parent
61555ff
commit bb56617
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters