Skip to content

fix: use /v2 module path so v2 is consumable as a Go module (#39) - #40

Merged
wudidapaopao merged 1 commit into
mainfrom
fix/issue-39-v2-module-path
Jul 3, 2026
Merged

fix: use /v2 module path so v2 is consumable as a Go module (#39)#40
wudidapaopao merged 1 commit into
mainfrom
fix/issue-39-v2-module-path

Conversation

@wudidapaopao

@wudidapaopao wudidapaopao commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Fixes #39.

The v2.0.0 tag can't be consumed by the Go toolchain because its go.mod module path lacks the required major-version suffix:

$ go get github.com/chdb-io/chdb-go/v2@v2.0.0
go: ...: invalid version: go.mod has non-.../v2 module path "github.com/chdb-io/chdb-go" ...

Go's semantic import versioning requires that modules tagged v2.0.0+ declare the major version in the module path (github.com/chdb-io/chdb-go/v2). Since v0/v1 share the unsuffixed path, this never came up before the v2 bump.

Changes

  • go.mod: module github.com/chdb-io/chdb-gomodule github.com/chdb-io/chdb-go/v2
  • Rewrote all internal imports of .../chdb and .../chdb-purego to the /v2 path
  • Updated import examples in README.md, chdb.md, chdb/doc.md, lowApi.md
  • Updated the go install github.com/chdb-io/chdb-go/v2@latest instruction
  • Left genuine GitHub URLs (/issues/, /blob/, /actions/) untouched

Verification

go build ./...   # OK
go vet ./...      # OK
go build -o chdb-go .   # CLI OK

Follow-up (maintainer action)

This corrects the source, but the broken v2.0.0 tag remains. After merging, please cut a new patch tag so consumers can depend on it:

git tag v2.0.1 && git push origin v2.0.1

Then go get github.com/chdb-io/chdb-go/v2@v2.0.1 will work.

Note

Update module path to github.com/chdb-io/chdb-go/v2 for Go semantic import versioning

Updates go.mod module declaration and all internal import paths across the repository to use the /v2 suffix, making the v2 release consumable as a proper Go module. Documentation and example snippets in README and API docs are also updated to reflect the new import paths.

Macroscope summarized 7ad721c.

The v2.0.0 tag cannot be consumed by the Go toolchain because its
go.mod module path lacks the required major-version suffix. Go's
semantic import versioning mandates that modules tagged v2.0.0+ declare
the major version in the module path.

Update the module path to github.com/chdb-io/chdb-go/v2 and rewrite all
internal imports, doc examples, and the `go install` instruction to the
/v2 path. Real GitHub URLs (issues/blob/actions) are left untouched.

After merging, cut a v2.0.1 tag so consumers can depend on it via
`go get github.com/chdb-io/chdb-go/v2`.

Fixes #39

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wudidapaopao

Copy link
Copy Markdown
Contributor Author

@chibugai, review this PR.

Comment thread go.mod
@wudidapaopao
wudidapaopao merged commit bc098f2 into main Jul 3, 2026
4 checks passed
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.

v2.0.0 is not consumable as a Go module because module path lacks /v2

2 participants