Because we're using cargo nextest, which can't easily learn about
doctests from RustDoc, the just test command currently only runs
normal unit and integration tests. This means that we have a bunch of
doctests which were silently not being run on CI or when running tests
locally through the Justfile. Whoopsie!
This branch adds a cargo test --doc invocation to just test as well,
so that doctests are also run. Since CI also invokes just test, we
don't need to do anything else to ensure that doctests also happen on
CI.
After fixing this, I found that a bunch of our doctests are currently
broken, because...we were never actually testing them lol. In
particular:
The mnemos-abi crate's bbqueue_ipc module had a bunch of super
broken tests referincing APIs that don't actually exist in this
module. I believe this probably happened due to @jamesmunns copying
code from his upstream bbqueue crate, changing the APIs, and
forgetting to update the doctests? Anyway, I just removed them.
mnemos-config had a bunch of doctests which didn't compile any
longer because I had renamed some APIs and didn't update them, so I
fixed that.
Because we're using
cargo nextest
, which can't easily learn about doctests from RustDoc, thejust test
command currently only runs normal unit and integration tests. This means that we have a bunch of doctests which were silently not being run on CI or when running tests locally through the Justfile. Whoopsie!This branch adds a
cargo test --doc
invocation tojust test
as well, so that doctests are also run. Since CI also invokesjust test
, we don't need to do anything else to ensure that doctests also happen on CI.After fixing this, I found that a bunch of our doctests are currently broken, because...we were never actually testing them lol. In particular:
mnemos-abi
crate'sbbqueue_ipc
module had a bunch of super broken tests referincing APIs that don't actually exist in this module. I believe this probably happened due to @jamesmunns copying code from his upstreambbqueue
crate, changing the APIs, and forgetting to update the doctests? Anyway, I just removed them.mnemos-config
had a bunch of doctests which didn't compile any longer because I had renamed some APIs and didn't update them, so I fixed that.