Open hansl opened 2 years ago
Show, not just tell:
@bobthecow This is ready to review when you want, and has been rebased on laster master branch. Thanks!
How expensive are cargo lookups? Can we default to on if rustc is present?
This is a cold run, it stabilizes between 50-70 msecs. Not sure why (file lookup to see if it needs to forward to another rustc, likely).
PTAL.
Ping, @bobthecow
@bobthecow Ping. I have additional changes that I would like to submit a PR for, but they're based on this and don't want to pollute your queue.
This adds 4 options for rustc (if installed):
always
will always show the version.yes
will show the version of rustc if we can locate the Cargo.toml file (usingcargo locate-project
).diff
will show the version if there's a different result than the global rustc (as ran in the root). This is useful when using.rust-toolchain
files to enforce specific version of the toolchain, for example.