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

go.dev: 404 error should include a link to instructions on how to add a missing module #36986

Closed
thepudds opened this issue Feb 2, 2020 · 17 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@thepudds
Copy link
Contributor

thepudds commented Feb 2, 2020

Some packages seem to show a 404 Not Found error, such as:

https://pkg.go.dev/github.com/natefinch/markbates

Sorry for the quick report. Seen via https://twitter.com/NateTheFinch/status/1223427948260347904

CC @natefinch

@heschi
Copy link
Contributor

heschi commented Feb 2, 2020

From https://go.dev/about:

To add a package or module, simply fetch it from proxy.golang.org. Documentation is generated based on Go source code downloaded from the proxy.golang.org/@.zip. New module versions are fetched from index.golang.org and added to the go.dev site every few minutes.

Nobody had ever downloaded it. It's on pkg.go.dev now.

@heschi heschi closed this as completed Feb 2, 2020
@natefinch
Copy link
Contributor

This is still a bug. If you go to the url, clearly the site should try to download it and generate the docs. Otherwise it just looks broken, which is why this bug was filed.

@thepudds
Copy link
Contributor Author

thepudds commented Feb 2, 2020

Hi @heschik, what would you think about using this issue to track a friendlier message for this situation that points people in the right direction?

Might save some future bug reports, and probably ends up being friendlier.

@thepudds
Copy link
Contributor Author

thepudds commented Feb 2, 2020

Or maybe the suggestion from @natefinch is better... though maybe a message is easier to change in near term...

@heschi heschi added the pkgsite label Feb 2, 2020
@heschi heschi changed the title go.dev: 404 error shown for some packages such as github.com/natefinch/markbates go.dev: 404 error should include a link to instructions on how to add a missing module Feb 2, 2020
@heschi
Copy link
Contributor

heschi commented Feb 2, 2020

@natefinch That may be clear to you but it is not clear to me. The repository you linked to is a two year old test, not exactly something I would expect people to need to find in search or read documentation for. Packages with actual usage are highly likely to already be populated. If you think that pkg.go.dev should fetch on demand, feel free to file an issue for that, perhaps with a more realistic example.

@thepudds Adding a pointer to the about page seems reasonable to me. I'll switch this over to that. cc @julieqiu.

@julieqiu
Copy link
Member

julieqiu commented Feb 2, 2020

Adding a link to go.dev/about#adding-a-package on the 404 page makes sense to me. I'll work on adding that.

@julieqiu julieqiu self-assigned this Feb 2, 2020
@julieqiu julieqiu added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 2, 2020
@natefinch
Copy link
Contributor

Eight years of people using godoc.org and it working exactly that way is why I think it should work that way. Also you assume that every package is widely used, many are hyper specific and may only be used by people that have a corporate proxy.... Until someone tries to view the docs here.

I just honestly don't know why you wouldn't just try to fetch it.

@mvdan
Copy link
Member

mvdan commented Feb 3, 2020

@natefinch why not file the issue, as @heschik mentioned? I agree that the two issues are related, but this change is a step in the right direction, so I think we should let it happen.

@natefinch
Copy link
Contributor

Yeah, sorry, was on mobile, doing that now.

@julieqiu
Copy link
Member

julieqiu commented Feb 3, 2020

Instructions link to go.dev/about#adding-a-package has been added.

image

Closing this issue.

@julieqiu julieqiu closed this as completed Feb 3, 2020
@natefinch
Copy link
Contributor

Just a note... these instructions aren't actually actionable:

To add a package or module, simply fetch it from proxy.golang.org. 

I don't know what "fetch it from proxy.golang.org" means or how to go about doing that. I'm sure I'm not the only one.

Also, avoid putting "simply" or "just" in directions, because they trivialize a step which may actually not be trivial for the person attempting it. Like, me, trying to figure out how to fetch something from a go proxy. Remove the word and it reads exactly the same, except if I don't know how to do it, I don't feel like I've been talked down to.

@julieqiu
Copy link
Member

julieqiu commented Feb 3, 2020

Thanks for the input, @natefinch. Would you mind filing a separate issue for this, since it is related to updating content go.dev/about?

@natefinch
Copy link
Contributor

sure

@hunterloftis
Copy link

@julieqiu, should I expect to see that link when I search for a package url and get no matches?

Screen Shot 2020-02-07 at 10 48 48 AM

@julieqiu
Copy link
Member

julieqiu commented Feb 7, 2020

At the moment it only appear on the 404 page:
http://pkg.go.dev/github.com/doesnot/exist

We can add the link on the search results page too when there are no matches if you think it would be helpful.

@hunterloftis
Copy link

hunterloftis commented Feb 7, 2020 via email

@julieqiu
Copy link
Member

This change is now live.

image

gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
A link is added to /about#adding-a-package on the 404 page.

Details at golang/go#36986.

Change-Id: I30665bdcc93b9ab6d18027638fb2c70be49538ad
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/655402
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
golang/go#36986 (comment)

Change-Id: Idfd0eb2514accdd23204a8bbe7d9bbdb66cea276
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/668098
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@golang golang locked and limited conversation to collaborators Feb 18, 2021
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

7 participants