build(deps): bump production-dependencies, register fts5/rtree explicitly - #4531
Merged
Conversation
…y with 3 updates Bumps the production-dependencies group with 3 updates in the / directory: [github.com/google/cel-go](https://github.com/google/cel-go), [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) and [golang.org/x/sync](https://github.com/golang/sync). Updates `github.com/google/cel-go` from 0.29.0 to 0.30.0 - [Release notes](https://github.com/google/cel-go/releases) - [Commits](cel-expr/cel-go@v0.29.0...v0.30.0) Updates `github.com/ncruces/go-sqlite3` from 0.34.4 to 0.35.2 - [Release notes](https://github.com/ncruces/go-sqlite3/releases) - [Commits](ncruces/go-sqlite3@v0.34.4...v0.35.2) Updates `golang.org/x/sync` from 0.21.0 to 0.22.0 - [Commits](golang/sync@v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: github.com/google/cel-go dependency-version: 0.30.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: github.com/ncruces/go-sqlite3 dependency-version: 0.35.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: golang.org/x/sync dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
go-sqlite3 v0.35.0 moved the FTS5 and R*Tree/Geopoly extensions into
separate packages, so they are no longer part of the default build. This
broke schemas that use virtual tables, e.g.
CREATE VIRTUAL TABLE ft USING fts5(b);
which now fails with "no such module: fts5" when the SQLite analyzer
applies migrations.
Add an internal package that registers both extensions as auto
extensions, and import it wherever sqlc opens a SQLite connection, so
they are available on every connection as they were before the bump.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011B9zXEdnMfRMVmWQaJFXVS
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.
Supersedes #4530 — same dependency bump, plus the code change needed to keep it green.
The dependency bump
Dependabot's commit from #4530, unmodified:
github.com/google/cel-go0.29.0 → 0.30.0github.com/ncruces/go-sqlite30.34.4 → 0.35.2golang.org/x/sync0.21.0 → 0.22.0Why #4530 was failing
TestReplay/managed-db/virtual_table/sqlitefailed with:go-sqlite3 v0.35.0 is a deliberate breaking change: FTS5 and R*Tree/Geopoly were moved out of the default build into separate packages (
ext/fts5,ext/rtree) to keep code size and compile times down.internal/endtoend/testdata/virtual_table/sqlite/schema.sqlusesCREATE VIRTUAL TABLE ... USING fts5(...), so the SQLite analyzer's migration step could no longer apply it.The cel-go and x/sync bumps were fine.
The fix
New
internal/sqlite3extpackage registers both extensions viasqlite3.AutoExtension, blank-imported at the three places sqlc opens a SQLite connection:internal/engine/sqlite/analyzer/analyze.gointernal/cmd/vet_sqlite.gointernal/sqltest/sqlite.goRegistering them as auto extensions makes them available on every connection, matching pre-0.35 behavior.
rtreeis registered alongsidefts5even though no test exercises it. It was equally built-in before 0.35, so leaving it out would silently droprtree/geopolysupport for users whose schemas rely on it.No
go.mod/go.sumchanges beyond dependabot's — the bump already pulled ingo-sqlite3-wasm/v3.Testing
go test --tags=examples -timeout 20m ./...passes against local PostgreSQL and MySQL: 2967 tests, no failures. Includes an uncached re-run ofinternal/endtoendand all ofexamples/.go vet ./...reports unreachable-code warnings in the generatedinternal/engine/sqlite/parser/sqlite_parser.go; those pre-exist onmainand are unrelated to this change.🤖 Generated with Claude Code
https://claude.ai/code/session_011B9zXEdnMfRMVmWQaJFXVS
Generated by Claude Code