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 prints spurious package lines #37969

Closed
rsc opened this issue Mar 20, 2020 · 4 comments
Closed

cmd/doc: go doc prints spurious package lines #37969

rsc opened this issue Mar 20, 2020 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Mar 20, 2020

In my home directory (so GOPATH mode):

$ go doc template.ZZZ
package template // import "html/template"

package template // import "text/template"

<long pause>

The long pause is unfortunate but understandable.
The output lines should not happen at all.
That line should be delayed until actual results are found in a package.

@rsc rsc added this to the Go1.15 milestone Mar 20, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 21, 2020
@dmitshur
Copy link
Contributor

dmitshur commented Apr 2, 2020

/cc @robpike @mvdan per owners.

@mvdan
Copy link
Member

mvdan commented Apr 2, 2020

I agree with the report. I also don't get why the package line is being printed twice - even if we wanted it, it should only be there once.

@robpike
Copy link
Contributor

robpike commented Apr 3, 2020

It's actually two lines, one for each package that might have ZZZ. I suspect this is a bug from the refactoring to make the package name come out always. I can take a look.

@gopherbot
Copy link

Change https://golang.org/cl/226998 mentions this issue: cmd/doc: don't print package clauses on error

@golang golang locked and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants