Skip to content

Fix CI breakage by pinning proptest 1.2.0 and locking font-kit/half versions#169

Merged
PaulLaux merged 4 commits intozsa1from
pin-proptest-1.2.0
Jul 1, 2025
Merged

Fix CI breakage by pinning proptest 1.2.0 and locking font-kit/half versions#169
PaulLaux merged 4 commits intozsa1from
pin-proptest-1.2.0

Conversation

@dmidem
Copy link

@dmidem dmidem commented Jul 1, 2025

Why

proptest ≥ 1.5 wraps rand_core::RngCore in a new trait that also needs
DerefMut; StdRng lacks that, so the crate failed to compile after
cargo update (E0277 / E0599).

What changed

  • proptest pinned to 1.2.0 (last release before the API shift)
  • font-kit 0.11.0 and half 2.2.1 locked to keep MSRV 1.70

@dmidem dmidem requested a review from PaulLaux July 1, 2025 13:12
@PaulLaux PaulLaux merged commit 6616893 into zsa1 Jul 1, 2025
17 checks passed
dmidem added a commit that referenced this pull request Jul 23, 2025
### Background

* Orchard’s CI has a `build-latest` job that deletes `Cargo.lock` before
it builds, so it always picks the newest compatible crate versions.
* Everything went well until **proptest 1.7** was released. The next CI
run removed `Cargo.lock`; the resolver upgraded proptest to 1.7, which
depends on **`rand` 0.9**. Orchard and its crypto deps still use
**`rand` 0.8** interface, and the mixed `rand_core` versions broke the
build.
* PR #169 fixed Orchard by pinning **`proptest = 1.2.0`** (that was the
version in the old lockfile, known to work).

### Why that pin now breaks Zebra

* `zebra-chain` and `zebra-scan` declares **`proptest = "1.4"`**. With
an older Orchard commit (no exact pin) all crates (including `orchard`
and `librustzcash` crates) resolved to 1.4.x.
* Updating Zebra to the new Orchard commit brings in **`=1.2.0`**, and
Cargo can’t satisfy **both** `=1.2.0` and `^1.4.0`.

### What this PR changes

* Pin proptest to **1.4.0** in Orchard *and* librustzcash:

```toml
# Cargo.toml
proptest = { version = "=1.4.0", optional = true }

[dev-dependencies]
proptest = "=1.4.0"
```

* Version 1.4.0 is still on `rand` 0.8, so no further code changes are
needed in `orchardd` and it satisfies Zebra’s `1.4.0` constraint.

### A few summarization notes

1. **Why did `proptest = "1.0.0"` work and then fail?**  
The caret requirement means “any release ≥ 1.0.0 < 2.0.0”. Deleting
`Cargo.lock` let Cargo upgrade to the newest 1.y.z (now 1.7), which
brings in `rand` 0.9 and conflicts with the rest of the tree.

2. **Why list proptest in *both* `[dependencies]` and
`[dev-dependencies]`?**
- feature `test-dependencies` includes `proptest` and `proptest` must be
an optional dependency;
   - `dev-dependencies` are not allowed to be optional.
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