Skip to content

feat(cli): make sqlbuild a small forwarder to sqb - #1333

Merged
kvlonge merged 4 commits into
mainfrom
feat/sqlbuild-forwarder
Nov 7, 2026
Merged

kvlonge merged 4 commits into
mainfrom
feat/sqlbuild-forwarder

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Why

The sqlbuild executable was a second full copy of the sqb launcher, which roughly doubled the size of every wheel and installation.

Changes

  • sqlbuild is now a small forwarder. It finds the sqb installed beside it and runs it with the same arguments and streams. On Unix it execs sqb. On Windows it waits on a child process, and only the child handles Ctrl+C and Ctrl+Break. If sqb is missing, it prints sqlbuild: cannot find sqb beside …; reinstall sqlbuild-cli and exits 1.
  • The binary compiles only the launcher's hand-off module, without linking the library: 0.37 MB stripped instead of 6.4 MB.
  • Forwarder integration tests run in the macOS and Windows scheduler recovery jobs. The wheel smoke step runs sqlbuild --version, checks that an unknown command exits 2, and writes a size summary.
  • DuckShop: no edge case added. This changes only how the CLI is packaged; no project shape, data value or lifecycle sequence is involved.

Verification

  • Forwarder tests pass locally on Linux and in CI on macOS (5/5) and Windows (5/5), including the Windows case where the build and temp directory are on different drives. Clippy, Windows clippy and fensu pass, and so does make check-ci.
  • Wheel sizes in bytes, base → this change, measured by CI:
Platform Wheel Installed sqlbuild
linux-x86_64 26,084,507 → 13,269,524 64,828,736 → 33,037,814 371,192
linux-aarch64 21,345,025 → 10,887,249 49,995,339 → 25,663,321 398,216
macos-x86_64 20,943,220 → 10,677,092 50,722,965 → 25,935,611 358,016
macos-arm64 19,989,622 → 10,202,714 46,476,332 → 23,863,674 377,312
windows-x86_64 22,420,132 → 11,363,307 62,852,577 → 31,928,799 254,464
  • Independent review: two findings, both fixed. The tests now copy instead of hard-linking across drives, and the size summary reads the correct wheel directory.

sqlbuild was a second full copy of the sqb launcher. It now finds the sqb
installed beside it and hands over the same arguments and streams: exec on
Unix, a child that alone handles Ctrl+C and Ctrl+Break on Windows. Without
sqb beside it, it names the missing program and exits 1.

The bin compiles only the launcher hand-off file, so it stays at about
0.37 MB stripped instead of 6.4 MB when linking the library.

Validated locally on Linux: forwarder integration tests, clippy, fensu,
and Windows clippy of the bin and tests. Windows tests run in CI.
Windows runners keep the temporary directory and the build on different
drives, where hard links fail, so the tests copy the forwarder instead.
The size summary reads the wheels from the workspace, because the smoke
step has already changed directory.

Validated locally on Linux: forwarder tests, fensu, and the summary block
under bash -eo pipefail.
@kvlonge
kvlonge enabled auto-merge (squash) November 6, 2026 23:03
@kvlonge
kvlonge merged commit 821385d into main Nov 7, 2026
49 checks passed
@kvlonge
kvlonge deleted the feat/sqlbuild-forwarder branch November 7, 2026 00:10
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