beads/internal/storage/embeddeddolt/open_stub.go
beads/crew/emma 0cac11fbb6 fix(release): add CGO build constraints for embeddeddolt, bump to v0.63.2
Gate embeddeddolt package on //go:build cgo with stub files for !cgo.
Android and freebsd targets use CGO_ENABLED=0 since zig lacks sysroot
headers for these platforms. Server mode still works on all targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:57:50 -07:00

14 lines
325 B
Go

//go:build !cgo
package embeddeddolt
import (
"context"
"database/sql"
"errors"
)
// OpenSQL is a stub that returns an error when CGO is not enabled.
func OpenSQL(_ context.Context, _, _, _ string) (*sql.DB, func() error, error) {
return nil, nil, errors.New("embeddeddolt: requires CGO (build with CGO_ENABLED=1)")
}