Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
CGO_ENABLED = 1
COMMIT_HASH := $(shell git --no-pager describe --tags --always --dirty)
LDFLAGS = "-X github.com/sqlc-dev/sqlc/internal/info.Version=$(COMMIT_HASH)-wicked-fork"
# macOS 15.4+ needs strchrnul fix
BUILD_ENV = $(shell [ "$$(uname -s)" = "Darwin" ] && [ "$$(sw_vers -productVersion | cut -d. -f1)" -ge 15 ] && echo 'MACOSX_DEPLOYMENT_TARGET=15.4 CGO_CFLAGS="-DHAVE_STRCHRNUL"')

.PHONY: build build-endtoend test test-ci test-examples test-endtoend regen start psql mysqlsh proto

build:
CGO_ENABLED=$(CGO_ENABLED) go build -ldflags=$(LDFLAGS) -o bin/ ./cmd/...
$(BUILD_ENV) CGO_ENABLED=$(CGO_ENABLED) go build -ldflags=$(LDFLAGS) -o bin/ ./cmd/...

install:
CGO_ENABLED=$(CGO_ENABLED) go install -ldflags=$(LDFLAGS) ./cmd/...
$(BUILD_ENV) CGO_ENABLED=$(CGO_ENABLED) go install -ldflags=$(LDFLAGS) ./cmd/...

test:
CGO_ENABLED=$(CGO_ENABLED) go test ./...
Expand Down
2 changes: 1 addition & 1 deletion internal/codegen/golang/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
SQLDriverPGXV5 = "github.com/jackc/pgx/v5"
SQLDriverLibPQ = "github.com/lib/pq"
SQLDriverGoSQLDriverMySQL = "github.com/go-sql-driver/mysql"
SQLDriverWPGX = "github.com/stumble/wpgx"
SQLDriverWPGX = "github.com/one2x-ai/wpgx"
)

func parseDriver(sqlPackage string) SQLDriver {
Expand Down
4 changes: 2 additions & 2 deletions internal/codegen/golang/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (i *importer) dbImports() fileImports {
pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v5"})
case SQLDriverWPGX:
std = []ImportSpec{}
pkg = append(pkg, ImportSpec{Path: "github.com/stumble/wpgx"})
pkg = append(pkg, ImportSpec{Path: "github.com/one2x-ai/wpgx"})
pkg = append(pkg, ImportSpec{Path: "github.com/stumble/dcache"})
default:
std = append(std, ImportSpec{Path: "database/sql"})
Expand Down Expand Up @@ -496,7 +496,7 @@ func (i *importer) batchImports() fileImports {
case SQLDriverPGXV5:
pkg[ImportSpec{Path: "github.com/jackc/pgx/v5"}] = struct{}{}
case SQLDriverWPGX:
pkg[ImportSpec{Path: "github.com/stumble/wpgx"}] = struct{}{}
pkg[ImportSpec{Path: "github.com/one2x-ai/wpgx"}] = struct{}{}
}

return sortedImports(std, pkg)
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
}

if *docker {
x := "-extldflags \"-static\" -X github.com/sqlc-dev/sqlc/internal/cmd.version=" + version
x := "-extldflags \"-static\" -X github.com/sqlc-dev/sqlc/internal/info.Version=" + version
args := []string{
"build",
"-a",
Expand Down