diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-10-03 14:42:51 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-10-03 14:42:51 +0000 |
| commit | 9e5655e21a3ec486b1d52d342156de0edc06df76 (patch) | |
| tree | b8530b35c96b7aae2f95ffaf5fee5182298a4c1d /docs | |
| parent | 32ccedb2737f7c8754c52dfd74bbaa4e1fb56e80 (diff) | |
| download | genenetwork4-9e5655e21a3ec486b1d52d342156de0edc06df76.tar.gz | |
doc: Sharpen SKILL.md's rustc-mismatch section with what actually worked.
* docs/SKILL.md (Guix packaging): Replace the generic "pin crates down or bump rust" note with the concrete sequence used to fix this in genenetwork4: one-crate-at-a-time --precise pins (and why re-running generate-lockfile undoes them), the mysql_common let-chains/is_multiple_of case where no patch version within a minor line helps and the dependent itself needs downgrading, and querying the sparse crates.io index directly to compare MSRVs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDDpXvZBQat9uSgDeEMJ8d
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/SKILL.md | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/docs/SKILL.md b/docs/SKILL.md index 443a2a7..ead9df4 100644 --- a/docs/SKILL.md +++ b/docs/SKILL.md @@ -118,10 +118,28 @@ Two parallel suites exercising the same endpoints: than the Guix-packaged rust supports (crates.io keeps publishing; cargo's own relocking step inside the build will refuse with "rustc X.Y is not supported by CRATE, requires rustc Z"). This is a - packaging-environment mismatch, not a code bug -- fix by pinning the - offending crates down with `cargo update -p CRATE --precise VERSION` - or bumping the Guix rust input, before assuming a build failure is - caused by whatever code change prompted the build. + packaging-environment mismatch, not a code bug -- rule that out + before assuming a build failure is caused by whatever code change + prompted the build. To fix it: + - `cargo update -p CRATE --precise VERSION`, one crate at a time (per + the error list), picks the newest release still compatible -- + `cargo generate-lockfile` alone re-derives these correctly for + most transitive deps (it already favors the rustc-compatible + version), but re-running it also undoes any manual `--precise` pin + you already made, so apply pins one at a time without regenerating + the whole lockfile afterwards. + - A crate's own non-macro code can need a newer rustc regardless of + which version you pick -- e.g. mysql_common adopted `let`-chains + and `is_multiple_of` (both stabilized in rustc 1.88) in every + 0.36.x/0.37.x release, so no `--precise` pin within those lines + helps; the fix was downgrading the *dependent* (`mysql` in + Cargo.toml) to the last major version pinning the still-compatible + mysql_common 0.35.x. Check a candidate version actually builds, + don't assume a lower semver number is automatically safe. + - Query `https://index.crates.io/<2-or-3-letter-prefix-dirs>/<name>` + (the sparse registry index, one JSON line per version, with a + `rust_version` field when the crate declares an MSRV) to compare + versions without a full `cargo update` round-trip per guess. ## Commits |
