-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(sqlite3): Switch to modernc.org/sqlite
While github.com/mattn/sqlite3 is one of the better libraries for sqlite3, I want to use a library that does not use CGO. This would make it easier to build binaries. Am also interested in automatically building binaries for each release. One such tool to do this is GoReleaser. There are some limitations with cross-compiling golang with CGO on Windows. Some info is at: https://goreleaser.com/cookbooks/cgo-and-crosscompiling/ This tool's use of sqlite3 is very basic, and should be covered by any good sqlite3 library, whether or not it uses CGO. FWIW, when running "go mod tidy", there were some interesting error messages about how golang v1.16 chooses transitive dependencies vs how golang 1.17. For example: github.com/rafaelespinoza/godfish/drivers/sqlite3 imports modernc.org/sqlite imports modernc.org/ccgo/v3/lib imports golang.org/x/tools/go/packages loaded from golang.org/x/tools@v0.0.0-20201124115921-2c860bdd6e78, but go 1.16 would select v0.1.12 So, I ran "go mod tidy -compat=1.17" b/c I don't care for reproducibility with go 1.16. Bump golang version in go.mod because the library requires v1.18 update CGO usage - fix compilation err - fix go vet issue - fix driver registration runtime issue - fix test for missed teardown - adjust CI for required golang version
- Loading branch information
1 parent
ae2f913
commit 2fdc3ab
Showing
7 changed files
with
81 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
FROM godfish_test/client_base:latest | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV DB_DSN="file:/godfish_test.db" | ||
|
||
WORKDIR /src | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
module github.com/rafaelespinoza/godfish | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/denisenkom/go-mssqldb v0.12.0 | ||
github.com/go-sql-driver/mysql v1.5.0 | ||
github.com/gocql/gocql v0.0.0-20211222173705-d73e6b1002a7 | ||
github.com/lib/pq v1.10.0 | ||
github.com/mattn/go-sqlite3 v1.14.7 | ||
github.com/rafaelespinoza/alf v0.2.0 | ||
modernc.org/sqlite v1.24.0 | ||
) | ||
|
||
require ( | ||
github.com/dustin/go-humanize v1.0.1 // indirect | ||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect | ||
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 // indirect | ||
github.com/golang/snappy v0.0.3 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect | ||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect | ||
github.com/mattn/go-isatty v0.0.16 // indirect | ||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect | ||
golang.org/x/crypto v0.6.0 // indirect | ||
golang.org/x/mod v0.3.0 // indirect | ||
golang.org/x/sys v0.5.0 // indirect | ||
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 // indirect | ||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
lukechampine.com/uint128 v1.2.0 // indirect | ||
modernc.org/cc/v3 v3.40.0 // indirect | ||
modernc.org/ccgo/v3 v3.16.13 // indirect | ||
modernc.org/libc v1.22.5 // indirect | ||
modernc.org/mathutil v1.5.0 // indirect | ||
modernc.org/memory v1.5.0 // indirect | ||
modernc.org/opt v0.1.3 // indirect | ||
modernc.org/strutil v1.1.3 // indirect | ||
modernc.org/token v1.0.1 // indirect | ||
) |
This file contains 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
This file contains 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