Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AlexCuse
Copy link
Contributor

@AlexCuse AlexCuse commented Nov 5, 2023

For evaluation with #129

Another pure go sqlite client that may be worth considering is https://github.com/glebarez/go-sqlite

@AlexCuse
Copy link
Contributor Author

AlexCuse commented Nov 5, 2023

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.

@AlexCuse AlexCuse changed the title deps: switch to modernc.org/sqlite3 for pure go builds deps: switch to modernc.org/sqlite for pure go builds Nov 5, 2023
Copy link
Contributor Author

@AlexCuse AlexCuse left a 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
Copy link
Contributor Author

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant