today's little puzzle: if I don't pipe /dev/null explicitly to cargo-nextest here, running it through watchexec like that hangs:

❯ watchexec -w shapely-codegen -- just codegenThank you.

@fasterthanlime Is it attempting to read from stdin for some reason? If you explicitly close stdin via `<&-` does that change the behaviour you see?

@fasterthanlime did you figure it out?

As others pointed out anything trying to read from stdin might be causing a hang but it can be more subtle than that, programs can change there behaviour based on if there is a terminal or not and this is often detected via the properties of stdin. Rust std actually has isterminal() which you can call on the std structures. I have written a load of bugs by not setting the right properties of stdin/stdout but also not reading from them can also cause hangs

@fasterthanlime eg without https://gitlab.com/girderstream/girderstream/-/blob/main/crates/girderstream/src/build/localbuild.rs?ref_type=heads#L93 explicitly setting stdin to a pipe this code would hang if the process tried to read from stdin. I think it has a very similar effect to your </dev/null. In that any attempt to read from it will return straight away.
crates/girderstream/src/build/localbuild.rs · main · girderstream / Girderstream · GitLab

Book: https://girderstream.gitlab.io/girderstream/book/main/about.html API documentation: https://girderstream.gitlab.io/girderstream/doc/girderstream/index.html

GitLab
@fasterthanlime I have never known nextest to read from stdin, maybe one of the tests is? That would be pretty odd..
@pointswaves I haven't figured it out! I've been deep in other problems, sorry — I can check later if it's still reproducible