fix(ci): build and test the Rust crate on every PR - #4
Merged
Conversation
The crate is emitted from the same src/index.tish as dist/deck.js, and that is the whole mechanism keeping the JS host and tish-gba's build-time bake from drifting. CI never built it. So a change that broke the rust-lib emit, or that made the two targets parse the same file differently, would have gone unnoticed until release — or until a consumer hit it. The guarantee was asserted, not tested. Adds a `rust_crate` job that emits the crate and runs `cargo test` — the same conformance corpus the JS build is checked against — plus a `cargo publish --dry-run` so a crate that cannot be packaged fails on the PR rather than at publish time. `release` now depends on it, so a broken crate cannot be released. Also carries the @tishlang/tish 3.2.2 bump onto a release. That landed as `chore:`, which is not release-triggering, so the push failed the repo's "require incremental release" gate and left the bump untagged. It should have been `fix:` — the old `>=2.43.0` floor declared support for versions that cannot emit the crate at all.
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.
The gap
The
deckfilecrate is emitted from the samesrc/index.tishasdist/deck.js. That shared origin is the entire mechanism keeping the JS host and tish-gba's build-time bake from drifting.CI never built it.
So a change that broke the rust-lib emit — or, worse, one that made the two targets parse the same
.deckfile differently — would have gone unnoticed until release, or until a consumer hit it. The guarantee this whole effort is built on was asserted, not tested.Fix
A
rust_cratejob that:cargo test— the same conformance corpus the JS build is checked against, so both targets are held to one contract on every PRcargo publish --dry-run, so a crate that can't be packaged fails on the PR instead of at publish timereleasenow depends on it: a broken crate can't be released.Also: re-lands the tish 3.2.2 bump onto a release
That change merged as
chore:, which isn't release-triggering. The push failed this repo's own "require incremental release" gate and left the bump untagged — v1.2.0 is the last prerelease and doesn't contain it.It should have been
fix:from the start: the old>=2.43.0floor declared support for tish versions that cannot emit the crate at all. This commit is typedfix:, so the next prerelease carries both it and the 3.2.2 bump sitting on main.Verification
Ran the new job's steps locally: