Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: redirect semver tags with build metadata #47757

Closed
julieqiu opened this issue Aug 17, 2021 · 3 comments
Closed

x/pkgsite: redirect semver tags with build metadata #47757

julieqiu opened this issue Aug 17, 2021 · 3 comments
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@julieqiu
Copy link
Member

From https://groups.google.com/g/golang-dev/c/bduZuUdzM_o/m/lBX634unAQAJ:

https://pkg.go.dev/github.com/go-logr/zapr@v1.0.0+1 should redirect to https://pkg.go.dev/github.com/go-logr/zapr@v1.0.1-0.20210809170106-a3325063a237, per https://proxy.golang.org/github.com/go-logr/zapr/@v/v1.0.0+1.info

@gopherbot gopherbot added this to the Unreleased milestone Aug 17, 2021
@julieqiu julieqiu added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 17, 2021
@julieqiu julieqiu self-assigned this Aug 19, 2021
@gopherbot
Copy link

Change https://golang.org/cl/343649 mentions this issue: tests/e2e: add github.com/go/logr/zapr@v1.0.0+1

@gopherbot
Copy link

Change https://golang.org/cl/343631 mentions this issue: internal/frontend: fix redirects

gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 19, 2021
The go command removes build metadata as part of version
canonicalization. +incompatible is the only metadata that may remain,
but that can't appear in the vcs tag itself.

As a result, a path@version like
https://pkg.go.dev/github.com/go-logr/zapr@v1.0.0+1 will resolve to
https://pkg.go.dev/github.com/go-logr/zapr@v1.0.1-0.20210809170106-a3325063a237.
See https://proxy.golang.org/github.com/go-logr/zapr/@v/v1.0.0+1.info

pkg.go.dev now redirects appropriately.

See https://groups.google.com/g/golang-dev/c/bduZuUdzM_o/m/lBX634unAQAJ
for context.

This fix also redirects other cases where the requested and resolved
versions do not match. For example, github.com/dgrijalva/jwt-go@v3.2.0
will redirect to v3.2.0+incompatible.

For golang/go#47757

Change-Id: I236fbb9e0ed8ef0b1c3928460c2908fcbd9c2033
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343631
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@julieqiu
Copy link
Member Author

Seems like this was fixed ~this time last year :)

@golang golang locked and limited conversation to collaborators Aug 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

2 participants