Skip to content

Conversation

xrgzs
Copy link
Member

@xrgzs xrgzs commented Jun 30, 2025

This PR fixes incorrect versioning on pkg.go.dev:

https://pkg.go.dev/github.com/OpenListTeam/OpenList

Currently, the module on pkg.go.dev lacks proper tagging and versioning metadata:

  • Tagged version
    Modules with tagged versions give importers more predictable builds.
  • Stable version
    When a project reaches major version v1 it is considered stable.

Current pkg.go.dev view:

Problems encountered when using go get:

# Default go get behavior pulls incorrect module due to mismatched module path
> go get github.com/OpenListTeam/OpenList
go: github.com/OpenListTeam/OpenList@upgrade (v1.0.6) requires github.com/OpenListTeam/[email protected]: parsing go.mod:
        module declares its path as: github.com/Xhofe/alist
                but was required as: github.com/OpenListTeam/OpenList

# Using semantic versioning directly fails due to missing /v4 in module path
> go get github.com/OpenListTeam/[email protected]
go: github.com/OpenListTeam/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/OpenListTeam/OpenList/v4")
> go get github.com/OpenListTeam/OpenList/v4
go: module github.com/OpenListTeam/OpenList@upgrade found (v1.0.6), but does not contain package github.com/OpenListTeam/OpenList/v4
> go get github.com/OpenListTeam/OpenList/[email protected]
go: github.com/OpenListTeam/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/OpenListTeam/OpenList/v4")

According to Go Modules: v2 and Beyond, for any version v2 or higher, the module path must include the /vN suffix. In this case, the module should declare:

module github.com/OpenListTeam/OpenList/v4

And it should be located in a v4/ subdirectory (optional).

@xrgzs xrgzs merged commit 874dc29 into main Jul 1, 2025
12 checks passed
@j2rong4cn j2rong4cn deleted the gopkg-v4 branch July 19, 2025 17:35
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.

2 participants