Asking to learn -- I started to work on this <iss...
# development
s
Asking to learn -- I started to work on this issue and successfully moved
docker
out to its own crate. However, there are calls in the
<http://docker_tests.rs|docker_tests.rs>
file that reference the
<http://local_tests.rs|local_tests.rs>
file from
process_execution
crate. Despite having scoped the
<http://lib.rs|lib.rs>
file and
Cargo.toml
correctly (as indicated by other dependencies that check out), this will fail
/.cargo test -p docker
with a
Copy code
use process_execution::local_tests::named_caches_and_immutable_inputs
                       ^^^^^^^^^^^ could not find `local_tests` in `process_execution`

Process::new(owned_string_vec(&["/bin/echo", "-n", "foo"]))
         ^^^ function or associated item not found in `Process`
error. For reference, relevant code snippets:
Copy code
// in docker/Cargo.toml
[dependencies]
...
process_execution = { path = "../process_execution" }

// in process_execution/lib.rs
pub mod local;

#[cfg(test)]
pub mod local_tests

// also an import problem:

pub struct Process { /*..*/ };

impl Process {

#[cfg(test)
pub fn new()....
}
Is there something special about test configurations that prevent cross-crate references?
w
yes: it’s impossible to depend on the tests of another crate, AFAIK.
BUT: i happen to have encountered that case in my thrashing about in the docker tests recently, and i’m pretty sure that you can just delete the test in
<http://docker_tests.rs|docker_tests.rs>
that uses
named_caches_and_immutable_inputs
… AFAICT, it was copy-pasta’d from the local runner’s tests
🙌 1
s
good to know! thanks for the direction fistbump
w
thank you!