Skip to content

BashCommandKit: install SwiftPorts' shellkit Commands; drop SQLiteKit dep - #85

Merged
odrobnik merged 3 commits into
mainfrom
claude/sqlite3shell-from-sqlitekit
Jun 9, 2026
Merged

BashCommandKit: install SwiftPorts' shellkit Commands; drop SQLiteKit dep#85
odrobnik merged 3 commits into
mainfrom
claude/sqlite3shell-from-sqlitekit

Conversation

@odrobnik

@odrobnik odrobnik commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Makes SwiftBash a thin installer of SwiftPorts' CLI ports — it no longer bridges any SwiftPorts command itself. SwiftPorts vends each port as a ready-to-install ShellKit Command (bridged through ShellKit's ShellCommandKit); SwiftBash just places them as virtual bins. Final piece of the toolchain layering.

Changes (c923c7c)

  • registerSwiftPortsCommands() installs the instances from SwiftPortsCommands.argumentParserCommands instead of re-bridging each *Command type locally.
  • registerSqlite3() installs SwiftPorts' Sqlite3Builtin (the AP-free ShellKit-Command face); SwiftBash's own copy of that command is deleted. The builtin now comes from SwiftPorts' Sqlite3Shell product — still AP-free, so it installs on Android too.
  • Package.swift: drop the direct SQLiteKit dependency and the 14 per-command product deps, replaced by the single SwiftPortsCommands product (+ Sqlite3Shell, both from SwiftPorts).
  • BinCatalog gains fd (was special-cased with an explicit at: path).

Behavior change (test updated)

sqlite3 --version now reports the SQLite library version — matching -version, the real sqlite3 CLI, and the standalone sqlite3 executable. SwiftBash no longer hijacks --version for a (SwiftBash) x.y.z banner (a parity deviation). Sandbox-path redaction for the bridged ports is preserved by the matching change in Cocoanetics/ShellKit#16.

Verification

Full swift build + the Sqlite3CommandTests (8) green on macOS, with the sibling branches wired in locally. Full suite green apart from load-induced timing flakes in the streaming-pipeline suites (pass on isolated re-run). Android: the sqlite3 builtin now resolves through SwiftPorts' Sqlite3Shell product (was SQLiteKit's) — worth confirming on the Android CI job.

Landing

Merge last, after Cocoanetics/ShellKit#16, Cocoanetics/SQLiteKit#2, and Cocoanetics/SwiftPorts#58 are on their mains. This closes the brief window where SwiftBash main is red (SQLiteKit#2 removes the Sqlite3Shell product this used to depend on). The branch also contains an intermediate commit (63d2924, "get the driver from SQLiteKit") that c923c7c reverses — a squash-merge keeps main history clean.

🤖 Generated with Claude Code

odrobnik and others added 2 commits June 9, 2026 12:53
The sqlite3 shell driver moved from SwiftPorts into the Cocoanetics/
SQLiteKit package (alongside the SDK it was already built on). Repoint
the `sqlite3` builtin's dependency accordingly:

- Add a direct SQLiteKit package dependency (pinned to main).
- BashCommandKit now takes `Sqlite3Shell` from `package: "SQLiteKit"`
  instead of `package: "SwiftPorts"`.

`Shell+Sqlite3.swift` is unchanged — the module is still named
`Sqlite3Shell` and the `Sqlite3Executable.run(...)` entry point is the
same, so the `sqlite3` builtin keeps working on every platform (the
driver stays ArgumentParser-free, so Android included).

Requires the companion SQLiteKit change (new Sqlite3Shell product) and
the SwiftPorts change (drops its Sqlite3Shell) to merge first, since both
are pinned to main.

Verified on macOS: BashCommandKit and the swift-bash executable build
against the SQLiteKit / SwiftPorts branches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… dep

SwiftBash becomes a thin installer of SwiftPorts' CLI ports — it no longer
bridges any SwiftPorts command itself. SwiftPorts vends each port as a
ready-to-install ShellKit `Command` (bridged through ShellKit's own
`ShellCommandKit`); SwiftBash just places them as virtual bins.

  * `registerSwiftPortsCommands()` now installs the instances vended by
    `SwiftPortsCommands.argumentParserCommands` instead of re-bridging each
    `*Command` type locally.
  * `registerSqlite3()` installs SwiftPorts' `Sqlite3Builtin` (the
    ArgumentParser-free ShellKit-Command face of its `sqlite3` shell port);
    SwiftBash's own copy of that command is deleted. The `sqlite3` builtin
    now comes from SwiftPorts' `Sqlite3Shell` product — still AP-free, so it
    installs on Android too.
  * Package.swift: drop the direct `SQLiteKit` dependency (the shell port
    moved to SwiftPorts) and the 14 individual `*Command` product deps,
    replaced by the single `SwiftPortsCommands` product.
  * BinCatalog gains `fd` (so the uniform install loop finds its
    `/usr/local/bin/fd` path; it was previously special-cased with `at:`).

Behavior change, now covered by the updated test: `sqlite3 --version` reports
the SQLite library version (matching `-version`, the real sqlite3 CLI, and the
standalone SwiftPorts `sqlite3` executable). SwiftBash no longer hijacks
`--version` for a "(SwiftBash) x.y.z" banner — that was a deviation from real
sqlite3. Sandbox-path redaction for the bridged ports is preserved by the
matching change in ShellKit's `ShellCommandKit` bridge.

Depends on ShellKit's `Shell.parsableCommand(_:)` + Sandbox.Denial redaction
and on SwiftPorts vending `SwiftPortsCommands` + `Sqlite3Shell`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…QLiteKit's

main's #84 (72f5850) repointed the sqlite3 builtin at SQLiteKit's Sqlite3Shell;
this branch deliberately gets it from SwiftPorts (the toolchain layering:
SwiftPorts owns the shell port + vends the shellkit Commands, SwiftBash just
installs). Keep our tree; #84 is superseded.
@odrobnik
odrobnik merged commit 9c61413 into main Jun 9, 2026
10 of 11 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