Skip to content

deps: switch to modernc.org/sqlite for pure go builds#221

Open
AlexCuse wants to merge 3 commits intokeratin:mainfrom
AlexCuse:modernc-sqlite
Open

deps: switch to modernc.org/sqlite for pure go builds#221
AlexCuse wants to merge 3 commits intokeratin:mainfrom
AlexCuse:modernc-sqlite

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 😅

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