fix(mod): declare /v2 module path for Go SIV#69
Merged
autholykos merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
Go SIV (mandatory since go 1.11 for modules with a go.mod) requires
the module path for v2+ to carry a /v2 suffix; without it, the Go
proxy rejects the module with:
invalid version: module contains a go.mod file, so module path
must match major version ("github.com/dusk-network/stroma/v2")
This is exactly what sum.golang.org returned when v2.0.0 was
published at the non-/v2 path, so v2.0.0 is unconsumable by any
Go toolchain — the broken tag was never cached by proxy.golang.org
either (SIV rejected the fetch before caching).
Fix:
- go.mod: module github.com/dusk-network/stroma -> /v2
- rewrite every internal import of github.com/dusk-network/stroma/X
-> github.com/dusk-network/stroma/v2/X (11 .go files, 31 sites)
Verification:
- go build ./... clean
- go vet ./... clean
- gofmt -l . empty
- go test ./... all packages pass under the new module path
After this lands, v2.0.0 will be retagged in place at the post-fix
HEAD. Retagging is safe because proxy.golang.org never cached the
broken tag (confirmed via HEAD against both /@v/v2.0.0.info and
/v2/@v/v2.0.0.info — both 404).
There was a problem hiding this comment.
Pull request overview
Updates the repository to comply with Go Semantic Import Versioning for v2+ so that v2.0.0 is consumable via the Go module proxy and standard go tooling.
Changes:
- Change module path in
go.modtogithub.com/dusk-network/stroma/v2. - Rewrite internal imports across
chunkandindexpackages (including tests/benchmarks) to use the/v2-suffixed module path.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Declares the /v2 module path required for SIV. |
| chunk/policy.go | Updates corpus import to /v2 path. |
| chunk/policy_test.go | Updates corpus import to /v2 path. |
| index/index.go | Updates internal imports (chunk, corpus, embed, store) to /v2. |
| index/snapshot.go | Updates internal imports (corpus, store) to /v2. |
| index/reuse.go | Updates internal imports (chunk, corpus, store) to /v2. |
| index/context_test.go | Updates internal imports (corpus, embed, store) to /v2. |
| index/fusion_test.go | Updates internal imports (corpus, embed, store) to /v2. |
| index/index_test.go | Updates internal imports (chunk, corpus, embed, store) to /v2. |
| index/policy_test.go | Updates internal imports (chunk, corpus, embed, store) to /v2. |
| index/reuse_bench_test.go | Updates internal imports (corpus, embed, store) to /v2. |
| index/reuse_scan_test.go | Updates internal imports (corpus, embed, store) to /v2. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Blocker
Go's Semantic Import Versioning (mandatory since Go 1.11 for modules with a
go.mod) requires the module path for v2+ to carry a/v2suffix. We tagged v2.0.0 at commita375e69withmodule github.com/dusk-network/stroma— no suffix. The Go proxy rejects it:So v2.0.0 is currently unconsumable by any Go toolchain. Consumer repos (Hippocampus, Pituitary) cannot
go getit at all.Fix
go.mod:module github.com/dusk-network/stroma→…/v2github.com/dusk-network/stroma/X→.../v2/X(11 .go files, 31 import sites acrosschunk,index)Pure mechanical rewrite — no behavior change.
Retag plan
After this lands, v2.0.0 will be retagged in place at the post-fix HEAD. Retagging is safe because proxy.golang.org never cached the broken tag:
SIV rejected the proxy fetch before any checksum could be cached, so no downstream consumer has a frozen hash to collide with.
Test plan
go build ./...cleango vet ./...cleangofmt -l .emptygo test ./...— all five packages pass under the new module pathanalyzers+go+macosjobs greengo get github.com/dusk-network/stroma/v2@v2.0.0from a scratch dir