Skip to content

fix(cache): drop target/ outputs from test target (0.1.2)#7

Merged
joshuaboys merged 2 commits into
devfrom
fix/test-target-outputs-empty
May 12, 2026
Merged

fix(cache): drop target/ outputs from test target (0.1.2)#7
joshuaboys merged 2 commits into
devfrom
fix/test-target-outputs-empty

Conversation

@joshuaboys
Copy link
Copy Markdown
Contributor

@joshuaboys joshuaboys commented May 12, 2026

Summary

  • testTargetConfig now declares outputs: [] instead of caching the workspace target/ directory. cargo test reuses the target/ populated by build, so per-crate test targets do not own that output; snapshotting the full dir into .nx/cache for every test target dominates wall-clock with disk I/O on real workspaces. Test results remain cacheable by exit code.
  • Bumps @eddacraft/nxrust to 0.1.2.
  • Fix ported from eddacraft/anvil.

Resolves the target/ row of the risk table in plans/index.aps.md for the test target (build retains target/ outputs deliberately — it is the producer).

Test plan

  • pnpm typecheck clean
  • pnpm test — 44/44 pass
  • pnpm release:dry-run — tarball contains the expected dist/**, executors.json, generators.json, LICENSE, README.md, CHANGELOG.md; no stray files
  • CI smoke (pnpm install --frozen-lockfile && pnpm build && pnpm test && pnpm e2e) green on this branch
  • On merge: pnpm publish --access public (prepublishOnly re-runs build + test + e2e)

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.

Bumps the package to 0.1.2. Fix ported from eddacraft/anvil.
Copilot AI review requested due to automatic review settings May 12, 2026 07:18
Hardcoded 0.1.0 broke the e2e smoke as soon as the package
bumped to 0.1.2. Read the version from the root package.json so
the script tracks the package automatically.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces Nx cache I/O for Rust test targets by ensuring test targets don’t declare the workspace target/ directory as an output, while also bumping the package version and updating APS planning docs to reflect completion/progress.

Changes:

  • Update testTargetConfig to set outputs: [] (so test is cached by result/terminal output without snapshotting target/).
  • Bump @eddacraft/nxrust version to 0.1.2 and add a corresponding changelog entry.
  • Mark APS plan/module status as Complete and record the risk mitigation resolution.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/target-configs.ts Drops test outputs to avoid caching/restoring target/ for per-crate test tasks.
plans/modules/01-v0.1-shakedown.aps.md Updates module status/checklists and records resolutions/dates.
plans/index.aps.md Marks overall APS as Complete and annotates the resolved target/ caching risk for test.
package.json Bumps package version to 0.1.2.
CHANGELOG.md Adds an “0.1.2 — Unreleased” entry describing the caching change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@joshuaboys joshuaboys merged commit 3204597 into dev May 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants