Skip to content

fix(release): scope sqlrite-engine crate with include allowlist (fixes crates.io 413)#154

Merged
joaoh82 merged 1 commit into
mainfrom
sqlr-fix-crate-package-size
Jun 1, 2026
Merged

fix(release): scope sqlrite-engine crate with include allowlist (fixes crates.io 413)#154
joaoh82 merged 1 commit into
mainfrom
sqlr-fix-crate-package-size

Conversation

@joaoh82
Copy link
Copy Markdown
Owner

@joaoh82 joaoh82 commented Jun 1, 2026

Problem

The v0.11.0 publish run failed at Publish sqlrite crate to crates.io (run 26738895572):

error: failed to publish sqlrite-engine v0.11.0 to registry at https://crates.io
the remote server responded with an error (status 413 Payload Too Large): max upload size is: 10485760

That cascaded: sqlrite-mcp (needs the engine) and the umbrella finalize were skipped.

Root cause

The engine [package] is the workspace root and had no include/exclude, so cargo publish packaged the entire repo tree. Uncompressed it was ~25 MiB, dominated by files that have no business in the library crate:

file size from
examples/desktop-journal/docs/demo.gif 9.0 MiB SQLR-43
examples/desktop-journal/docs/demo.mp4 8.7 MiB SQLR-43
web/public/playground/pkg/sqlrite_wasm_bg.wasm 2.1 MiB SQLR-42
screenshots, lockfiles, images/, … rest

SQLR-42 and SQLR-43 are exactly the two PRs merged since v0.10.2, which is why the previous (patch) releases stayed under the 10 MiB cap and this minor release was the first to trip it.

Fix

Add an include allowlist to the engine [package] — ship only src/**, the three declared [[example]] targets, README, and LICENSE. An allowlist (vs. a fragile exclude list) means future large files anywhere in the repo can't silently re-bloat the crate.

The three [[example]] .rs files are included deliberately: their paths are declared as targets in Cargo.toml, so they must exist in the tarball or cargo publish's verify step fails to parse the manifest.

Verification (local)

  • cargo package -p sqlrite-engine376 KiB .crate (was ~25 MiB uncompressed) and the packaged crate compiles clean against the already-published sqlrite-ask 0.11.0.
  • Packaged file list is src/** + the 3 example targets + README/LICENSE (+ cargo's auto Cargo.toml/Cargo.lock). No media, no web/, no images/.

How the v0.11.0 release gets completed after this merges

sqlrite-ask, @joaoh82/sqlrite, @joaoh82/sqlrite-wasm, Python wheels (PyPI), C FFI, the Go SDK, and the desktop apps already published at 0.11.0. Only sqlrite-engine + sqlrite-mcp are missing. A full release.yml re-dispatch would collide with those already-published artifacts (the npm/PyPI/etc. jobs have no already-exists guard), so the missing two are published surgically from fixed main:

cargo publish -p sqlrite-engine      # now 376 KiB → accepted
# wait for the crates.io index to carry 0.11.0, then:
cargo publish -p sqlrite-mcp

Follow-ups filed separately: make release.yml publish jobs idempotent (skip-if-already-published) so partial-failure recovery is a clean re-dispatch; set up the sqlrite-notes npm trusted publisher; consider moving the journal demo media out of the repo.

🤖 Generated with Claude Code

…tes.io 413)

The `sqlrite-engine` crate publish for v0.11.0 was rejected by crates.io:

  status 413 Payload Too Large: max upload size is: 10485760

The package root is the workspace root and the engine [package] had no
`include`/`exclude`, so `cargo publish` swept the ENTIRE repo tree —
every sibling member plus `web/`, `images/`, and the journal example's
demo media. After SQLR-42 (web/public/playground/pkg/*.wasm, 2.1 MiB)
and SQLR-43 (examples/desktop-journal/docs/demo.gif 9 MiB + demo.mp4
8.7 MiB + screenshots) landed since v0.10.2, the uncompressed tarball
hit ~25 MiB and blew the 10 MiB cap. Patch releases before that stayed
under the limit, which is why this is the first time it broke.

Fix: add an `include` allowlist so only the library/REPL sources, the
three declared `[[example]]` targets (their .rs files must be in the
tarball or `cargo publish`'s verify step can't parse the manifest), and
the readme/license ship. An allowlist beats `exclude` here because new
large files anywhere in the repo can't silently re-bloat the crate.

Verified locally: `cargo package -p sqlrite-engine` produces a 376 KiB
.crate (down from ~25 MiB uncompressed) and the packaged crate compiles
clean against the already-published sqlrite-ask 0.11.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rust-sqlite Ready Ready Preview, Comment Jun 1, 2026 6:40am

Request Review

@joaoh82 joaoh82 merged commit a19a2df into main Jun 1, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant