nit/future: mockall and mockall_double are normal deps today, so they ship in non-test builds. This is consistent with every other module in the crate, but we should gate them behind cfg(test) and move them to [dev-dependencies] as a follow-up. The mockall_double README shows the canonical pattern. In short:
Providers (exec.rs, fs.rs, etc.):
#[cfg(test)]
use mockall::automock;
#[cfg_attr(test, automock)]
impl CommandExec { ... }
Consumers (this file, build/mod.rs, cli.rs, etc.):
#[cfg(test)]
use mockall_double::double;
#[cfg_attr(test, double)]
use crate::providers::{exec::CommandExec, fs::Fs};
Scope is cross-cutting (4 provider modules + 6 consumer modules + Cargo.toml), so tracking as a separate issue.
Originally posted by Melvin Wang (@wmmc88) in #638 (comment)
Adjacent work was started in PR #476
nit/future:
mockallandmockall_doubleare normal deps today, so they ship in non-test builds. This is consistent with every other module in the crate, but we should gate them behindcfg(test)and move them to[dev-dependencies]as a follow-up. The mockall_double README shows the canonical pattern. In short:Providers (
exec.rs,fs.rs, etc.):Consumers (this file,
build/mod.rs,cli.rs, etc.):Scope is cross-cutting (4 provider modules + 6 consumer modules + Cargo.toml), so tracking as a separate issue.
Originally posted by Melvin Wang (@wmmc88) in #638 (comment)
Adjacent work was started in PR #476