From 4a352ff06a1356619764f099694a6698cd1a41e7 Mon Sep 17 00:00:00 2001 From: aksops Date: Sun, 26 Apr 2026 06:25:02 +0000 Subject: [PATCH] ci: pass -tags sqlite_fts5 to go test and release binary builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mattn/go-sqlite3 only compiles FTS5 support when the sqlite_fts5 build tag is set. internal/serve/store's schema uses CREATE VIRTUAL TABLE … USING fts5(…) which fails at runtime with "no such module: fts5" without the tag. The release-on-main run that followed the UI-build fix (24950003140) made it past `make ui` and then blew up on ~25 store/serve tests with this error. Two release.yml steps were missing the tag: - "Run tests" → go test -tags sqlite_fts5 ./... - cross-compile loop → go build -trimpath -tags sqlite_fts5 … Side note: v0.1.0 / v0.1.1 binaries (last successful releases) were built without this tag, so they panic in OpenCostStore on first boot. Once this lands, the next release tag will be the first usable one since the FTS5 feature shipped. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80436d7..f66400d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,12 @@ jobs: run: make ui - name: Run tests - run: go test ./... + # sqlite_fts5: mattn/go-sqlite3 only compiles FTS5 in when this + # tag is set. internal/serve/store's schema uses + # `CREATE VIRTUAL TABLE … USING fts5(…)` — without the tag, + # OpenCostStore() fails at runtime with "no such module: fts5" + # and ~25 store/serve tests blow up. + run: go test -tags sqlite_fts5 ./... - name: Determine bump level id: level @@ -201,8 +206,10 @@ jobs: mkdir -p "dist/${stage}" echo "→ building ${target}" + # -tags sqlite_fts5: see "Run tests" step. Released binaries + # without this tag panic at boot in OpenCostStore. CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" \ - go build -trimpath -ldflags "$LDFLAGS" \ + go build -trimpath -tags sqlite_fts5 -ldflags "$LDFLAGS" \ -o "dist/${stage}/ctm" \ ./