fix(cache): drop target/ outputs from test target (0.1.2)#8
Merged
Conversation
cargo test reuses the workspace target/ dir that build already populates, so per-crate test targets do not own that output. Snapshotting the full dir into .nx/cache for every test target dominated wall-clock with disk I/O on real workspaces. Test results remain cacheable by exit code. Fix ported from eddacraft/anvil. Also closes the v0.1 shakedown module: R3 (CI smoke validated by the 0.1.1 prepublish gate), R5 (consumer switched onto the published package), module status Complete, and the `target/` caching risk row marked resolved for `test`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
testTargetConfignow declaresoutputs: []instead of caching the workspacetarget/directory.cargo testreuses thetarget/populated bybuild, so per-crate test targets do not own that output; snapshotting the full dir into.nx/cachefor every test target dominates wall-clock with disk I/O on real workspaces. Test results remain cacheable by exit code.@eddacraft/nxrustto0.1.2. CHANGELOG entry added.eddacraft/anvil.01-v0.1-shakedownComplete, index Status Complete,target/caching risk row marked resolved fortest.Replaces #7 (which targeted
dev).Test plan
pnpm typecheckcleanpnpm test— 47/47 passpnpm e2e—nx run smoke:checkgreen against the bumped 0.1.2 tarballpnpm release:dry-runpacks@eddacraft/nxrust-0.1.2.tgzwith the expected file set (dist/**,executors.json,generators.json,LICENSE,README.md,CHANGELOG.md)pnpm publish --access publicfrommain(prepublishOnly re-runs build + test + e2e)