Repository navigation
fix(go): compile the wrapper against the pinned ffi before releasing - #3999
Conversation
#3949 merged after moq-ffi-v0.4.0 was tagged and made the wrapper call TrackDemand/Demand. The next main push released moq.dev/moq v0.7.0 pinned to moq.dev/moq-ffi v0.4.0 (the Cargo.toml version), which lacks that API, so every consumer fails to build. package-wrapper.sh only ran go mod tidy, which never type-checks; build the staged module so a mismatch fails the release instead of publishing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 15 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Recommendation: MERGEPositive improvement? Yes. Worth the complexity? Yes. Five lines in the existing tidy block, gated by the same Different approach? Alternatives like relying on smoke after publish, bumping FFI before merging wrapper API use, or a separate compile-only CI job are either too late (smoke) or orthogonal (process discipline). The compile check belongs here because this script is what decides the published tree. One caveat to watch: confirm the stock Ship this, then land the FFI bump so consumers and smoke go green again. This is an automated review, not the maintainer's decision |
moq.dev/moqv0.7.0 doesn't build. It pinsmoq.dev/moq-ffi v0.4.0, but it callsDemand/MoqTrackDemand, which that FFI doesn't have:How it shipped
moq-ffi-v0.4.0was tagged at 10:47.TrackDemandto moq-ffi and used it from the Go wrapper, without bumping moq-ffi's version (release-plz does that later).rs/moq-ffi/Cargo.toml(still 0.4.0) and passed the gate, becausemoq-go-ffi v0.4.0exists. It then published the wrapper.package-wrapper.shonly runsgo mod tidy, which never type-checks, so nothing caught the mismatch.Fix
After tidy,
package-wrapper.shnow runsgo build ./...in the staged module against the pinned FFI, so a mismatch fails the release instead of publishing it. The build only compiles, never links, andmoq-go-ffishipsmoq.h, so it works on the stock runner.Verified locally:
moq-ffi-v0.4.0wrapper against ffi 0.4.0 passes.Trade-off: until #3945 releases moq-ffi 0.4.1, Release Go will fail on main pushes instead of silently shipping a broken module.
Unbreaking consumers
Merging release-plz #3945 bumps moq-ffi to 0.4.1, which includes #3949. The resulting
moq-ffi-v0.4.1tag runs Release Go FFI and then Release Go, which publishes a wrapper pinned to 0.4.1. Until then,go get moq.dev/moq@latestgives a module that doesn't compile. moq-dev/smoke's Go cells are red for this reason.🤖 Generated with Claude Code
(written by Opus 5.5)