Closed FrankReh closed 1 year ago
And just wanted to say thanks for your work on Rust's spawning of tasks. Coming from Go, I would have thought how Rust spawns children would have all been wrapped up a long time ago but I found this crate because of issues you created in duct
years ago and because of the question you raised about duct
and tokio
, probably also years ago - and wanted to see how you had resolved things here since duct
doesn't seem to have an async version and calling long running sync functions from a tokio
task can cause problems with their scheduler. And then I see your spawn/nohup contributions from just a few months ago. Nice.
Bit the bullet and installed cargo-nextest and then ran cargo textest run
from the top workspace. Got similar errors but perhaps not as informative so wanted to call that out. Now I don't see it referencing anything about not finding cargo-nextest-dup
but instead:
FAIL [ 0.039s] integration-tests::integration test_list_binaries_only
--- STDOUT: integration-tests::integration test_list_binaries_only ---
running 1 test
test test_list_binaries_only ... FAILED
failures:
failures:
test_list_binaries_only
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 11 filtered out; finished in 0.00s
--- STDERR: integration-tests::integration test_list_binaries_only ---
thread 'test_list_binaries_only' panicked at 'called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)
Location:
integration-tests/tests/integration/temp_project.rs:72:9', integration-tests/tests/integration/main.rs:80:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Canceling due to test failure: 7 tests still running
Hi there, thanks for the kind words!
Yeah I ended up moving away from duct because I needed tokio support. I also wanted fine-grained control over process spawning (e.g. the "double-spawn" approach used by nextest) so it worked out quite well.
Re the test failure, what version of cargo nextest are you using? Support for NEXTEST_BIN_EXE
(which is what is used by those tests) was added in cargo-nextest 0.9.15.
I git cloned the repo today. The git hash is 04697148 and the Cargo.toml version reads
$ grep version cargo-nextest/Cargo.toml
version = "0.9.48"
And I'm happy to be seeing successful projects using tokio
(of course there are a lot by now) as I discovered it by accident at first but it and async/await in Rust seem ground-breaking so I've been spending time trying to understand it better.
Oh I mean what version of cargo nextest are you running the tests with? What does "cargo nextest --version" say?
$ cargo-nextest --version cargo-nextest 0.9.48
but ...
I can't reproduce the problem of running cargo nextest run
at the top level of the repo. When I do it now, it passes. The cargo test
still fails, like before, but presumably that's not interesting so I think you or I should just close this issue.
I've moved the repo from /tmp to a directory under my home. I've pulled the latest, and I think you had committed twice today. And I've reinstalled. So things have changed. So I am happy to move on and just start using this next gen test (too bad about not running -doc tests yet). If you care about cargo test
failing from the integration-tests package, I would be happy to help. Maybe a git bisect to figure out when it started? But I think it's okay now.
Yeah, we don't care about cargo test
failing -- cargo test
is unsupported for nextest's own repository.
Tried to run a plain
cargo test
in a new checkout of this repo, not having run or installed nextest yet. Ran into the failure of depending on cargo-nextest-dup which looks like it is part of the source tree itself. Google search didn't yield any results for that name so maybe this is a new issue.All the errors looked like this first one
Running on a Mac.