Closed Shnatsel closed 2 years ago
Thanks!
We were going to remove this field altogether, right? :disappointed:
Ups, forgot about that
That field is a big part of why I was using cargo-subcommand in the first place. I was hoping the platform detection logic, target directory detection logic, etc could all live in a single place rather than having to be reimplemented by every subcommand.
@Shnatsel Your entire point in #19 was to not resolve "unnecessary" fields up-front (later refined to rustc -vV
being the culprit specifically). It's already a separate crate and unused by cargo-subcommand
itself and some of its users so I don't see why cargo-subcommand
needs to be clobbered with an extra dependency?
Use the
current_platform
crate for zero-cost platform detection. Shaves off 90ms off subcommand startup on my machine (invoking rustc is slow when it's managed by rustup).The
Error::RustcNotFound
variant is now never constructed, but I didn't remove it because that would be a semver-breaking change. Likewise with the superfluous.to_owned()
- not changed to avoid an API break.Fixes #19