golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.02k stars 17.68k forks source link

x/pkgsite: adding a package via request button description is misleading #60552

Open bernhardreiter opened 1 year ago

bernhardreiter commented 1 year ago

What is the URL of the page with the issue?

https://pkg.go.dev/about#adding-a-package

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

What did you do?

Tried to follow the first variant for adding a package, which says:

Visiting that page on pkg.go.dev, and clicking the “Request” button. For example:
https://pkg.go.dev/example.com/my/module

Went to a couple of those modules and searched for the "Request" button

Could not find the "Request" button.

What did you expect to see?

That any url that matches the example URL of the documentation works like it is written there and offers a "Request" button.

Or that the documentation tells me instead, under which conditions the button should appear.

Or the documentation is corrected to remove this possibility, if it is gone by now.

What did you see instead?

Searching "Request" on the pages did yield results.

jamalc commented 1 year ago

The packages you referenced are available on pkg.go.dev. Were they unavailable when you filed this issue?

bernhardreiter commented 1 year ago

The packages you referenced are available on pkg.go.dev. Were they unavailable when you filed this issue?

They were available. Ah, now I see how the text made me think in the wrong way.

Going to https://pkg.go.dev/github.com/DTGlov/go-basics there is a "Request" button.

My use case was to add a new version of a package and the instructions do not explicitly mention this case. The second and third variant in the instructions under "adding package" seem to refer to a specific version, so I guess they can be used to update to a new major version of the package. The first variant at least cannot.

My suggestion to improve the text is to add a condition when the "request" buttons is shown, e.g. make it read like:

Try the page you expect on pkg.go.dev, which will offer a “Request” button
in case the package is not listed at all. Then click it. For example:
https://pkg.go.dev/example.com/my/module

A different way to fix this would be to mention how packages are updated instead of added.

bernhardreiter commented 1 year ago

@jamalc with the last message I've given the requested information, how is the label WaitingforInfo removed now? (I lack permission to remove it.)

jamalc commented 1 year ago

Would adding the version string or an additional example with the version string make it clear?

Adding a package

Data for the site is downloaded from [proxy.golang.org](https://proxy.golang.org/).
We monitor the [Go Module Index](https://index.golang.org/index) regularly for new
packages to add to pkg.go.dev. If you don’t see a package on pkg.go.dev, you can
add it by doing one of the following:

Visiting that page on pkg.go.dev, and clicking the “Request” button. For example:
https://pkg.go.dev/example.com/my/module@v1.0.0
bernhardreiter commented 1 year ago

Would adding the version string or an additional example with the version string make it clear?

It would be an improvement, because a "Request" button appears if the url is used with a version number that is not yet found.

Even better would be if there was a mention that this also works to add another - like a new - version of a package. Maybe like

If you don’t see a specific version of a package on pkg.go.dev, you can
add it by doing one of the following: