chore: read the fold version from the linked crate, not the lockfile - #4
Merged
Conversation
yoagent-state 0.5.2 exports VERSION, baked in at its own compile time.
That reports what the checker actually LINKED rather than what a lockfile
resolved — strictly stronger, since a stale lockfile entry cannot drift
from it — and it needs no build script.
Deletes build.rs, which shipped three bugs in a day:
- packaged builds printed "unknown": cargo package puts Cargo.lock
beside build.rs, not one level up, so it worked in the workspace and
failed in every installed build
- a two-version lockfile reported the LOWEST, naming 0.4.0 while
linking 0.5.1 — the exact skew the line exists to expose, backwards
- collecting every match over-collected [[patch.unused]], so a local
[patch.crates-io] override reported a single resolved version as
ambiguous
Fifty lines of string parsing over a format we do not own, replaced by
one const. Verified where build.rs failed: an extracted .crate now
reports 0.5.2 rather than "unknown".
Floors the dependency at 0.5.2, since VERSION lands there.
23 passed. Real store still 7/7 with the skip named.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
yoagent-state 0.5.2exportsVERSION, baked in at its own compile time — so it reports what the checker linked, not what a lockfile resolved. Strictly stronger, and it needs no build script.Deletes
build.rs, which shipped three bugs in a dayCargo.lockunknown—cargo packageputs the lockfile besidebuild.rs, so it worked in the workspace and failed where it ships[[patch.unused]], so a local[patch.crates-io]override reported one resolved version asambiguous(...)Fifty lines of string parsing over a format we don't own, replaced by one
const. The lockfile approach also had a subtler flaw: it reports what resolved, which can differ from what was compiled until someone runscargo update.Verified where
build.rsfailedExtracted
.crate, built standalone:Previously
unknown.Real store (
yoyo-gasp, 8,882 events) still 7/7 with the skip named in the certificate. 23 tests pass.Floors the dependency at
0.5.2, sinceVERSIONlands there.🤖 Generated with Claude Code