Using github.com/glebarez/go-sqlite instead of github.com/mattn/go-sqlite3 for eliminating cgo dependencies #294
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.
Current State
Right now
sql-migrateis using github.com/mattn/go-sqlite3 which have dependency towardscgo.It build fine for consumer linux as I shown here:
Problem
When build using CGO_ENABLED=0 for CI/CD and wanted for agnostic-OS. It become unusable (just for sqlite):
Proposal
Solution
Change the package for sqlite from github.com/mattn/go-sqlite3 to github.com/glebarez/go-sqlite
Benchmark
github.com/glebarez/go-sqlite is the fork of modernc/go-sqlite but with GORM compatibility.
Tl;dr: Scoring (from the sqlite-bench)
The best time in every test, shown in bold in the tables below individual graphs, is worth one point. The scorecard shows where and how many points were awarded to each benchmarked package.
Total score ties are ranked alphabetically. Please read those as one shared rank
This score is an ad hoc aggregate metric. Its usefulness is possibly at most in showing how the scores may evolve in time when new, improved versions of packages will get benchmarked
The time results for the particular OS and HW provide a more detailed info.
Disclaimer: The score and the ranking do not show how will any package perform in your particular application on a particular system. Additionally, empirically the scores fluctuate as much as about +/- 10 points. It's complicatd to better stabilize the results to be more precise and reliable. On some machines the tests run for many hours already with n = 2.