fix: [#983] upgrade go-sqlite3 and drop the unnecessary embed import - #31
Merged
Merged
Conversation
3 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #31 +/- ##
=========================================
Coverage ? 38.15%
=========================================
Files ? 11
Lines ? 629
Branches ? 0
=========================================
Hits ? 240
Misses ? 389
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
📑 Description
Closes goravel/goravel#983
sqlite.goanddocker.goboth importgithub.com/ncruces/go-sqlite3/embed. Since go-sqlite3 v0.33.2 that package is an empty stub whoseinitprints:The driver still pins go-sqlite3 v0.25.0, so the line only shows up once an application pulls a newer version into the build, which is what the reporter hit. A plain app that imports the driver and requires go-sqlite3 v0.35.5 prints the warning on every start.
This raises the minimum Go version for anyone using the driver from 1.25 to 1.26, since that is what go-sqlite3 requires from v0.33.2 on. It is the reason the upgrade has been sitting: happy to hold it for a release where a bump like that is acceptable.
What changed
_ "github.com/ncruces/go-sqlite3/embed"imports removeddialector.go(a copy of gormlite'ssqlite.go) picks up the one upstream change since v0.24: a clause builder set by the caller is no longer overwrittengo.modmoves togo 1.26.0Since v0.33.2 the SQLite wasm build is compiled to Go with
wasm2goinstead of being embedded and interpreted, sogithub.com/tetratelabs/wazerois gone from the dependency graph.Verification
A small app that imports the driver and requires go-sqlite3 v0.35.5:
If you're reading this, you're unnecessarily importing...thenapp startedapp startedgo test ./...passes, includingTestDockerTestSuite, which builds a database, writes to it and refreshes it.Trade-off worth knowing: the compiled SQLite makes binaries larger. The same app built against the current default (go-sqlite3 v0.25.0) is 25.1 MB, against this branch 29.3 MB. Speed is unchanged in a rough check: 50k inserts in one transaction take ~45ms before and ~42ms after, a
count/sumover them 3ms and 4ms.Scope
go.mod,go.sum: dependency upgradesqlite.go,docker.go: one import eachdialector.go: the upstream clause builder changeNo public API changed.
✅ Checks