Skip to content

outlinecaddy nested module: @latest resolves to the parent's v1.9.2 instead of the module's own version #293

Description

@ohnorobo

Summary

go get golang.getoutline.org/tunnel-server/outlinecaddy@latest resolves to v1.9.2 — a parent tunnel-server version — rather than the outlinecaddy nested module's own tag (v0.0.1). Consumers get a confusing/incorrect "latest."

Reproduce

GOPROXY=direct GOSUMDB=off go list -m -versions golang.getoutline.org/tunnel-server/outlinecaddy
#   -> v0.0.1                                  (the nested module's only tag)

go list -m golang.getoutline.org/tunnel-server/outlinecaddy@latest
#   -> ...outlinecaddy v1.9.2                  (WRONG: a parent tunnel-server version)

The public proxy's version list for the path even includes the full set of
parent v1.x tags:

curl https://proxy.golang.org/golang.getoutline.org/tunnel-server/outlinecaddy/@v/list

Root cause

outlinecaddy/ started as a package inside the parent module and was later promoted to its own nested module (outlinecaddy/go.mod, module path …/tunnel-server/outlinecaddy). Its only nested tag is outlinecaddy/v0.0.1. Because the import path was reachable in the parent module up through v1.9.2, those parent vX.Y.Z tags are still treated as versions of the path — and @latest prefers the highest release version, so v1.9.2 (1.9.2) wins over the nested v0.0.1.

For contrast, the sibling sdk/x nested module works correctly: its tags reach x/v0.2.0 while the parent sdk only reaches v0.0.23, so the nested version is the highest and @latest lands on it. outlinecaddy is the inverse — its nested version is below the parent's.

This is purely a tagging issue in this repo; the vanity-import setup (golang.getoutline.org) and hosting are correct.

Fix

Tag the nested module with a version greater than the parent's highest tag
(v1.9.2), e.g.:

# on the commit carrying the intended outlinecaddy/go.mod
git tag outlinecaddy/v1.9.3
git push origin outlinecaddy/v1.9.3

Then …/outlinecaddy@latest resolves to the nested module.

Alternatives: move outlinecaddy to its own repo, or bump it to v2.0.0+ —
note v2+ requires the /v2 major-version suffix in the module path and imports.

References (Go guidance)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions