x/pkgsite: pkg.go.dev/constraints works when maybe it should not
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:
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.
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.
Related Issues
- x/pkgsite: cannot view docs of package `golang.org/x/text/encoding` #47954 (closed)
- x/pkgsite: #73645 (closed)
- x/pkgsite: unexpected redirect for invalid version #45107 (closed)
- x/pkgsite: module root page not rendered #65701 (closed)
- x/pkgsite: flag packages that are no longer present in the latest version of the containing module #37631 (closed)
- x/pkgsite: Go 1.18 packages with generics are not listed #50012 (closed)
- x/pkgsite: #49838 (closed)
- x/pkgsite: fails to display packages from launchpad.net #73957 (closed)
- x/pkgsite: #44275 (closed)
- x/pkgsite: std's reflect expands with zero subpackages in the directory view #70313 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)