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: package not shown (godoc.org works) #41318

Closed
fgergo opened this issue Sep 10, 2020 · 4 comments
Closed

x/pkgsite: package not shown (godoc.org works) #41318

fgergo opened this issue Sep 10, 2020 · 4 comments

Comments

@fgergo
Copy link

@fgergo fgergo commented Sep 10, 2020

https://godoc.org/github.com/fgergo/ip100 shows:
"... Check it out at pkg.go.dev/github.com/fgergo/ip100 and share your feedback...."

What did you do?

clicked the link.

What did you expect to see?

a page similar to https://godoc.org/github.com/fgergo/ip100

What did you see instead?

error:
Not Found
“github.com/fgergo/ip100” is not a valid package or module. Were you looking for “ip100”?

How to find out why a package (module?) is "Not Found"?

Could the pkg.go.dev url show the reason for the "Not Found" result, to help with self-diagnosing the result?

@jamalc
Copy link
Member

@jamalc jamalc commented Sep 10, 2020

Your module is not valid because its path is incorrectly declared in your go.mod file. The about page has more information on adding a package to pkg.go.dev. You can see details when you attempt to download your module from the module proxy as instructed.

❯ GOPROXY=https://proxy.golang.org GO111MODULE=on go get github.com/fgergo/ip100
go: downloading github.com/fgergo/ip100 v0.0.0-20200909082450-84dbdc14e9b1
go: github.com/fgergo/ip100 upgrade => v0.0.0-20200909082450-84dbdc14e9b1
go get: github.com/fgergo/ip100@v0.0.0-20200909082450-84dbdc14e9b1: parsing go.mod:
	module declares its path as: ip100
	        but was required as: github.com/fgergo/ip100

Once you've updated the go.mod file go get the new version through the module proxy. After a few minutes your package should be found on pkg.go.dev.

@jamalc jamalc closed this Sep 10, 2020
@fgergo
Copy link
Author

@fgergo fgergo commented Sep 10, 2020

@jamalc thanks! Maybe add the link to https://go.dev/about#adding-a-package on the "Not Found" page in case the requested module path is valid?

@fgergo
Copy link
Author

@fgergo fgergo commented Sep 11, 2020

@julieqiu
Since "go get github.com/fgergo/ip100" was working perfectly for me on completely new machines, and godoc.org was showing my package just fine, I only spent a few minutes trying to analyze the root cause for the pkg.go.dev "Not Found" error and soon assumed the root cause for the error was outside my responsibility. (I am still not sure pkg.go.dev could not have shown any search results for ip100 with the wrong go.mod file.)
I would have spent more time looking for a solution if I knew about the self-help instructions on the "about page".
I propose to add a link to the "Not Found" page to https://go.dev/about#adding-a-package .

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Sep 11, 2020

Thanks for the feedback, @fgergo! I agree that the current messaging is confusing. Since this original issue has been resolved, could you file a new issue for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants