about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/SKILL.md26
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