Skip to content

fix(nix): skip the test suite in the release binary build (doCheck = false) - #1661

Merged
robcohen merged 1 commit into
mainfrom
fix/nix-nocheck
Jul 1, 2026
Merged

robcohen merged 1 commit into
mainfrom
fix/nix-nocheck

Conversation

@robcohen

@robcohen robcohen commented Jul 1, 2026

Copy link
Copy Markdown
Member

Fixes the recurring Test Nix release-channel failure at its root.

Why it keeps breaking

The channel test runs nix run … -- --version — it builds rustledger from the flake, and crane runs the full test suite (checkPhase) by default. But the flake's srcFilter strips test fixtures (.bin fuzz corpora, spec/*.md, the importer sample_stub) for caching, so fixture-dependent tests fail to compile. Fixing one fixture just exposes the next (validation.md → parser fuzz_regressions/*.bin → importer stub) — whack-a-mole.

Fix

doCheck = false on the rustledger crane build. The release-channel check only needs the binary to build and run; tests run in CI on the full, unfiltered repo. One change fixes the whole class, including future fixtures.

Verified: nix eval .#packages.x86_64-linux.rustledger.drvPath resolves cleanly with the change.

🤖 Generated with Claude Code

…ck = false)

The Nix release channel (Test nix run) builds rustledger from the flake and, via
crane's default checkPhase, runs the full test suite. But the flake's srcFilter
strips test fixtures (.bin fuzz corpora, spec/*.md, importer sample_stub) for
caching, so fixture-dependent tests fail to compile — repeatedly breaking the Nix
channel one fixture at a time (validation.md, then parser fuzz_regressions .bin,
then the importer stub).

Set doCheck = false on the rustledger crane build. The channel check only needs
the binary to build and run (nix run … -- --version); tests run in CI on the
full, unfiltered repo. Fixes the whole class rather than chasing each fixture.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@robcohen
robcohen requested a review from a team as a code owner July 1, 2026 03:12
Copilot AI review requested due to automatic review settings July 1, 2026 03:12
@robcohen
robcohen merged commit 2c22521 into main Jul 1, 2026
34 checks passed
@robcohen
robcohen deleted the fix/nix-nocheck branch July 1, 2026 03:12
@robcohen robcohen mentioned this pull request Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Disables running the Rust test suite during the Nix flake release binary build so nix run … -- --version doesn’t fail when srcFilter omits fixture files needed to compile some tests.

Changes:

  • Set doCheck = false for the craneLib.buildPackage derivation that builds the rustledger binary.
  • Add an explanatory comment documenting why tests are skipped for the release-channel build path.

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

Comment thread flake.nix
Comment on lines +146 to +152
# Build the binary WITHOUT running the test suite. crane's
# `srcFilter` strips test fixtures (`.bin` fuzz corpora,
# `spec/*.md`, importer stubs) for caching, so `cargo test` fails
# to compile fixture-dependent tests — repeatedly breaking the Nix
# release channel one fixture at a time. Tests run in CI on the
# full, unfiltered repo; the Nix release-channel check only needs
# the binary to build and run (`nix run … -- --version`).
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100%
Full AST Match 100%
Total Files 792
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

robcohen added a commit that referenced this pull request Jul 1, 2026
Patch release: green the Nix release channel by not running the test suite in the
Nix binary build (#1661, doCheck = false), so crane's fixture-stripping no longer
breaks fixture-dependent tests. No library/binary/component behavior change.
Workspace 0.17.3 -> 0.17.4 (cargo set-version); packages/mcp-server bumped to match.

Co-authored-by: Claude Opus 4.8 <[email protected]>
robcohen added a commit that referenced this pull request Jul 2, 2026
…#1682)

The unmodified PKGBUILD build (codegen-units=1 over the whole workspace) plus
its check() (full release-mode test suite) exceeds 90 minutes on a 2-core
runner — the job timed out on the v0.18.0/v0.19.0 channel runs at 45m and on
the v0.19.0 rerun at 90m (#1681's bump was insufficient). CI-only relaxations,
mirroring the Nix doCheck=false fix (#1661):

- yay --mflags --nocheck skips check(): the test suite runs in repo CI on
  every PR; this smoke test verifies the source package builds and runs.
- CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 parallelizes codegen (thin LTO kept).

Real AUR users still build with the PKGBUILD's full settings.

Co-authored-by: Claude Opus 4.8 <[email protected]>
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