On 02/19/2018 01:29 PM, Florian Weimer wrote:
On 02/19/2018 08:09 PM, Josh Stone wrote:
>> Could you just obsolete the rustfmt package with the rust package and
>> ship the program there?
> Perhaps, but it also comes with a cargo-fmt binary that ought to require
> the cargo package, and I don't really want that circular dependency.
Hmm. You could put that binary in its own package (say cargo-fmt).
Is cargo-fmt supposed to be called directly, or used by cargo to
implement the reformatting? It looks like the dependency should go in
the other direction …
You're supposed to run this as "cargo fmt", which invokes cargo-fmt.
That's not a cargo dependency though, as it will do this for *any*
"cargo foo" subcommand it doesn't recognize, much like git does.
cargo-fmt will invoke "cargo metadata" to get the file list, which makes
this a real dependency from cargo-fmt to cargo.