BashCommandKit: install SwiftPorts' shellkit Commands; drop SQLiteKit dep - #85
Merged
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
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'sShellCommandKit); SwiftBash just places them as virtual bins. Final piece of the toolchain layering.Changes (
c923c7c)registerSwiftPortsCommands()installs the instances fromSwiftPortsCommands.argumentParserCommandsinstead of re-bridging each*Commandtype locally.registerSqlite3()installs SwiftPorts'Sqlite3Builtin(the AP-free ShellKit-Commandface); SwiftBash's own copy of that command is deleted. The builtin now comes from SwiftPorts'Sqlite3Shellproduct — still AP-free, so it installs on Android too.Package.swift: drop the directSQLiteKitdependency and the 14 per-command product deps, replaced by the singleSwiftPortsCommandsproduct (+Sqlite3Shell, both from SwiftPorts).BinCataloggainsfd(was special-cased with an explicitat:path).Behavior change (test updated)
sqlite3 --versionnow reports the SQLite library version — matching-version, the real sqlite3 CLI, and the standalonesqlite3executable. SwiftBash no longer hijacks--versionfor a(SwiftBash) x.y.zbanner (a parity deviation). Sandbox-path redaction for the bridged ports is preserved by the matching change in Cocoanetics/ShellKit#16.Verification
Full
swift build+ theSqlite3CommandTests(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: thesqlite3builtin now resolves through SwiftPorts'Sqlite3Shellproduct (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
mainis red (SQLiteKit#2 removes theSqlite3Shellproduct this used to depend on). The branch also contains an intermediate commit (63d2924, "get the driver from SQLiteKit") thatc923c7creverses — a squash-merge keepsmainhistory clean.🤖 Generated with Claude Code