Open benluelo opened 7 months ago
One advantage to keeping these separate is with the new CI workflow from #1218, we'd only re-evaluate clippy and test for outputs who's nar hash has changed. I may be mistaken though, if any workspace member triggers a change in the nar hash, then my point it mute.
Yeah I was thinking about that as well, but another benefit we get from doing this is clippy gets run on the entire repo without having to specify an output for every lib/bin/etc.
Given how our codebase has grown, it no longer makes sense to run clippy on each individual package. We should instead have one check that runs
cargo clippy --workspace -- -D warnings
(and similar for tests).Steps
checks
attribute herepackages.rust-coverage
):checks.cargo-clippy
andchecks.cargo-test
.checks.cargo-clippy
: acrane.lib.cargoClippy
derivation that passes--locked --workspace -- -D warnings
ascargoExtraArgs
checks.cargo-tests
: acrane.lib.cargoTest
derivation that passes--locked --workspace
ascargoExtraArgs
cargoWorkspaceSrc
as it'ssrc
.Start with the clippy merge first, we will need to evaluate whether the tests are worth merging into one derivation.
Resources
The crane docs are quite thorough: https://crane.dev/; feel free to ping me if you have any questions!