go icon indicating copy to clipboard operation
go copied to clipboard

x/pkgsite: pkg.go.dev/constraints works when maybe it should not

Open danp opened this issue 3 weeks ago • 2 comments

What is the URL of the page with the issue?

https://pkg.go.dev/constraints

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Screenshot

No response

What did you do?

Tried to remember if there was a std "constraints" package, visited https://pkg.go.dev/constraints

What did you see happen?

It loaded, initially making me think that package exists.

However I eventually noticed this:

Image

What did you expect to see?

If constraints is not available in a released version of Go I would expect going to https://pkg.go.dev/constraints to behave the same as, say, https://pkg.go.dev/doesnotexist.

danp avatar Dec 05 '25 15:12 danp

Thanks for reporting. That little triangle inside the "Latest" badge does say that the package doesn't exist in the latest version of the standard library, but admittedly it is small and pretty uncommon to see in a standard library package. I'm not sure how important it is to preserve the ability to look up a historical package that was only ever present in pre-release versions like go1.18beta1 and go1.18beta2, but that's something to consider if the fix is to outright hide it.

CC @golang/pkgsite.

dmitshur avatar Dec 05 '25 15:12 dmitshur