-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: switch to modernc.org/sqlite for pure go builds #221
base: main
Are you sure you want to change the base?
Conversation
Note the actual builds are not yet changed to remove CGO dependency. Validated using the docker local build and an additional make target for tests since -race requires running with CGO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was interesting to look at. Not sure how much easier it makes ARM builds if at all. But I was impressed with the SQLite implementation in general.
func NewDB(env string) (*sqlx.DB, error) { | ||
// https://github.com/mattn/go-sqlite3/issues/274#issuecomment-232942571 | ||
// https://modernc.org/sqlite/issues/274#issuecomment-232942571 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this ain't right 😅
@@ -18,7 +18,7 @@ require ( | |||
github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0 | |||
github.com/joho/godotenv v1.2.0 | |||
github.com/lib/pq v1.10.0 | |||
github.com/mattn/go-sqlite3 v1.6.0 | |||
github.com/mattn/go-sqlite3 v1.14.18 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imported for tests per https://pkg.go.dev/modernc.org/sqlite#section-readme
For evaluation with #129
Another pure go sqlite client that may be worth considering is https://github.com/glebarez/go-sqlite