feat: migrate DuckDB driver to duckdb-go/v2 (DuckDB 1.5.4)#390
Merged
Conversation
Replaces github.com/marcboeker/go-duckdb v1.8.5 with the canonical successor github.com/duckdb/duckdb-go/v2 v2.10504.0, which bundles DuckDB 1.5.4 — an exact match for Homebrew's duckdb formula (was 1.1.3, four minors behind). msgvault uses go-duckdb purely as a database/sql driver (blank imports only), and the new module still registers under the "duckdb" driver name, so this is a module-path change across the 9 blank imports plus go.mod/go.sum — no call-site changes. Also pulls arrow-go v18.1.0 -> v18.5.1, whose refactored Arrow integration is the prerequisite for ever linking a system libduckdb instead of the vendored static blob. marcboeker/go-duckdb is deprecated and tops out at DuckDB 1.4.1; duckdb-go is the org-owned continuation that tracks DuckDB releases (the 2.10504.0 tag encodes DuckDB 1.5.4). Updates nix/package.nix vendorHash for the new module graph. Verified in a Linux/arm64 container: make build, full make test (47 packages, 0 failures), go vet, and a runtime SELECT version() returning v1.5.4. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Member
|
LGTM, thank you |
Contributor
Author
|
Thanks @wesm! Mind cutting a new release with this in it? |
sweenzor
added a commit
to sweenzor/msgvault
that referenced
this pull request
Jun 19, 2026
…DB 1.5.4 kenn-io#390 bumped the bundled DuckDB to 1.5.4, whose prebuilt libduckdb_static.a is compiled with GCC 12+ and references libstdc++ symbols (e.g. std::__throw_bad_array_new_length, exception_ptr::_M_release) absent from the old release container's GCC 9 (ubuntu:20.04). The linux release build broke with "undefined reference" link errors when tagging v0.16.0. Move the build-linux container to ubuntu:22.04 (pinned by digest), which provides GCC 12 from Ubuntu's own repos — no third-party PPA in the release path. The GCC 12 libstdc++/libgcc are statically embedded so the binary keeps no runtime GLIBCXX dependency; a guard fails the build if libstdc++ ever links dynamically. Trade-off: the binary's glibc floor rises 2.31 -> 2.35 with the newer base. Verified in a matching ubuntu:22.04 arm64 container: gcc-12 from the official repo, links cleanly, runs, no dynamic libstdc++. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sweenzor
added a commit
to sweenzor/msgvault
that referenced
this pull request
Jun 19, 2026
…DB 1.5.4 kenn-io#390 bumped the bundled DuckDB to 1.5.4, whose prebuilt libduckdb_static.a is compiled with GCC 12+ and references libstdc++ symbols (e.g. std::__throw_bad_array_new_length, exception_ptr::_M_release) absent from the old release container's GCC 9 (ubuntu:20.04). The linux release build broke with "undefined reference" link errors when tagging v0.16.0. Move the build-linux container to ubuntu:22.04 (pinned by digest), which provides GCC 12 from Ubuntu's own repos — no third-party PPA in the release path. The GCC 12 libstdc++/libgcc are statically embedded so the binary keeps no runtime GLIBCXX dependency; a guard fails the build if libstdc++ ever links dynamically. Trade-off: the binary's glibc floor rises 2.31 -> 2.35 with the newer base. Verified in a matching ubuntu:22.04 arm64 container: gcc-12 from the official repo, links cleanly, runs, no dynamic libstdc++. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Swaps the DuckDB
database/sqldriver from the deprecatedgithub.com/marcboeker/go-duckdbto its canonical successorgithub.com/duckdb/duckdb-go/v2.Why — Homebrew distribution
The goal is to make msgvault installable via
brew installfrom homebrew-core. homebrew-core won't accept a formula that ships a vendored, precompiled library — the formula must build from source and link the system DuckDB (depends_on "duckdb"). With the oldmarcboeker/go-duckdb, that was impossible for two reasons:duckdbformula is on 1.5.4 — four minors apart, and a moving target.libduckdbfailed on Arrow C-Data-Interface symbols, because that driver pulled the Arrow bridge in unconditionally.Moving to
duckdb/duckdb-go/v2resolves both: it bundles DuckDB 1.5.4 (matching the Homebrew formula), and Arrow is now opt-in behind theduckdb_arrowbuild tag — which this codebase doesn't use — so a system-libduckdbbuild (-tags duckdb_use_lib) links cleanly.marcboeker/go-duckdbis also deprecated in favor ofduckdb/duckdb-go, so this is the maintained path regardless.This PR is only the prerequisite in this repo. The Homebrew formula itself lives in a separate repo and is downstream of a release that includes this change.
What changed
duckdbdriver name, so everysql.Open("duckdb", …)call site is unchanged — a module-path bump across the blank imports plusgo.mod/go.sumand the NixvendorHash.🤖 Generated with Claude Code