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

cmd/doc: go doc rsc.io/quote/v3 in module mode shows wrong import path #30778

Open
rsc opened this Issue Mar 12, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@rsc
Copy link
Contributor

rsc commented Mar 12, 2019

In module mode, in a module with rsc.io/quote/v3 as a dependency:

$ go doc rsc.io/quote/v3
package quote // import "rsc.io/quote"

Package quote collects pithy sayings.

func Concurrency() string
func GlassV3() string
func GoV3() string
func HelloV3() string
func OptV3() string
$ 

Note the import comment on the first line of output.
It should say rsc.io/quote/v3.
I do not know why it says rsc.io/quote instead.

@rsc rsc added this to the Go1.13 milestone Mar 12, 2019

@rsc rsc added the release-blocker label Mar 12, 2019

@go101

This comment has been minimized.

Copy link

go101 commented Mar 12, 2019

It looks the specified import path doesn't work when modules feature is enabled.

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Mar 20, 2019

/cc @robpike

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Mar 20, 2019

I'll be able to look into this issue.

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Mar 20, 2019

Actually, I can't reproduce this with Go 1.12.1 nor Go tip (at commit fd270d8):

$ cd $(mktemp -d)
$ go mod init m
go: creating new go.mod: module m
$ go get rsc.io/quote/v3
$ go doc rsc.io/quote/v3
package quote // import "rsc.io/quote/v3"

Package quote collects pithy sayings.

func Concurrency() string
func GlassV3() string
func GoV3() string
func HelloV3() string
func OptV3() string

@rsc What version of Go did you use? Where were the commands you ran before to initialize the main module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.