modules and my v2 package only partly appearing on go.dev

86 views
Skip to first unread message

Paul Hankin

unread,
Feb 28, 2020, 2:43:16 PM2/28/20
to golang-nuts
I am rather confused about modules, and have trouble making them work.

I have a package: https://github.com/paulhankin/poker

The go.mod looks like this: `
module github.com/paulhankin/poker/v2

go 1.13
`

The package has a v1, and v2. At v2, I moved the main part of the package into a subdirectory "poker" so the import would be "github.com/paulhankin/poker/v2/poker" rather than "github.com/paulhankin/poker/v2".

I can successfully import the v2 package in a new modules-aware project, and goproxy seems to pick up new versions:

$ go list -m --versions
github.com/paulhankin/poker/v2 v2.0.0 v2.0.2 v2.0.3 v2.0.4 v2.0.5 v2.0.6 v2.0.7


I can't find the documentation on go.dev though. The closest I can find is this:
https://pkg.go.dev/github.com/paulhankin/poker/v2
which contains the cmd subdirectory, but not the poker subdirectory.

Am I doing something wrong? Did I make a mistake in moving the package into a subdirectory, or is there an easier way to avoid the import name being "v2"?

I'd file a bug against go.dev if I thought it was broken, but I find modules so complicated that I don't know if it's my understanding that's wrong, or if I made a mistake, or if go.dev isn't working correctly. I'm pretty frustrated with the experience so far.

Thanks,
Paul Hankin

Paul Hankin

unread,
Feb 28, 2020, 3:04:04 PM2/28/20
to golang-nuts
Oh, I see the problem. I created the subdirectory after tagging v2.0.0.

-- 
Paul Hankin

Paul Hankin

unread,
Feb 28, 2020, 3:10:20 PM2/28/20
to golang-nuts
I deleted the tag, and go.dev has removed the v2.0.0 release, but the package /poker is still not showing up on https://pkg.go.dev/mod/github.com/paulhankin/poker/v2?tab=packages

Can someone please help?

-- 
Paul Hankin 

Paul Hankin

unread,
Feb 29, 2020, 6:11:26 AM2/29/20
to golang-nuts
On Friday, 28 February 2020 20:43:16 UTC+1, Paul Hankin wrote:
Just to finish up here, go.dev now contains the documentation for the package. I guess I had to wait for the v2.0.0 version to disappear from some cache.

-- 
Paul Hankin
Reply all
Reply to author
Forward
0 new messages