Skip to content

chore: build hygiene — MSRV job, cache scoping, dep dedup#73

Merged
pratyush618 merged 4 commits intomainfrom
chore/build-hygiene
Apr 24, 2026
Merged

chore: build hygiene — MSRV job, cache scoping, dep dedup#73
pratyush618 merged 4 commits intomainfrom
chore/build-hygiene

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

Three small build-hygiene wins bundled together — all pure config / deps, zero runtime behaviour change.

Cache quota

Cache storage on this repo was at 9.33 GB of 10 GB before this PR. The test matrix was writing 6 fresh caches per commit (3 OSes × 2 Python versions) because every combination had its own key and every run saved.

Fix: Swatinem/rust-cache gets a shared-key across Python versions (pyo3 / abi3 builds don't vary by Python minor) plus save-if: ${{ github.ref == 'refs/heads/main' }} so PRs read the main-branch cache but don't write new ones. New MSRV job uses the same scoping.

Expected steady-state: one authoritative cache per OS, refreshed on each main commit.

MSRV verification

We declare rust-version = "1.75" in [workspace.package] but nothing verified it. New msrv job installs 1.75 via dtolnay/rust-toolchain and runs cargo check --workspace. Uses RUSTUP_TOOLCHAIN=1.75 env override so rust-toolchain.toml (which pins contributors to stable) doesn't take precedence in CI.

RustCrypto dedup

paperjam-core had md-5 = "0.11" while the rest of the crypto stack (digest / block-buffer / sha2 / sha1 / rsa / p256 / ecdsa) sat on 0.10. Result: duplicate block-buffer 0.10 + 0.12, digest 0.10 + 0.11, md-5 0.10 + 0.11 in the dep tree. Pinning md-5 = "0.10" collapses all three duplicates. The md-5 0.10 → 0.11 API change is a no-op for how we use it.

Also drops an unused sha2::digest::Digest as Sha2Digest import that the rebuild flagged.

Test plan

  • cargo tree --workspace --duplicates | grep md-5 — no duplicates
  • cargo test --workspace — 16 Rust tests pass (4 xlsx + 5 mcp + 7 zip_safety)
  • pre-commit run --all-files — every hook passes
  • MSRV job on CI — first run will tell us whether 1.75 is actually honest; if a transitive dep needs newer, we either bump the MSRV claim or patch the dep pin

Aligns with the rest of the crypto stack (digest / block-buffer /
sha2 / sha1 / rsa / p256 / ecdsa), removing duplicate compilations.
Also drops an unused `Sha2Digest` import surfaced by the rebuild.
New job verifies the declared rust-version = "1.75" actually compiles.
Matrix and MSRV caches now save only on main (PRs read-only) with a
shared key across Python versions — the old setup was writing ~6 GB
of per-PR caches and nearing the 10 GB repo quota.
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code rust Pull requests that update rust code labels Apr 24, 2026
CI verified that a transitive dep (ravif 0.13 via the image crate)
needs edition2024, which stabilised in 1.85. The 1.75 claim was
inherited from earlier in the project and never verified.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 24, 2026
Without a committed lockfile the MSRV job resolves fresh deps on
every run and drifts with upstream crate releases. Committing
Cargo.lock plus `cargo check --locked` makes the MSRV stable until a
deliberate `cargo update`. 1.88 is the current floor across the
resolved tree (image 0.25.10, darling 0.23, time 0.3.47, libloading
0.9 all require it).
@pratyush618 pratyush618 merged commit d59dab8 into main Apr 24, 2026
16 checks passed
@pratyush618 pratyush618 mentioned this pull request Apr 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant