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: -src flag misbehaves on some systems [1.14 backport] #38993

Closed
adg opened this issue May 11, 2020 · 5 comments
Closed

cmd/doc: -src flag misbehaves on some systems [1.14 backport] #38993

adg opened this issue May 11, 2020 · 5 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@adg
Copy link
Contributor

adg commented May 11, 2020

Under go1.14.2, if you run go doc -src strings.Compare on macOS you get a bunch of unrelated comments.

Commit 585e31d fixes this issue, but it is not applied in the current release (go1.14.2). It would be great to get this trivial fix cherry picked into the next point release.

(Apologies if I should be using @gopherbot to create this issue; I would have but there wasn't a corresponding issue for the original fix.)

@adg adg added the CherryPickCandidate Used during the release process for point releases label May 11, 2020
@adg adg added this to the Go1.14.3 milestone May 11, 2020
@andybons andybons modified the milestones: Go1.14.3, Go1.14.4 May 14, 2020
@andybons
Copy link
Member

Approved as this is a minor change with no workaround.

@andybons andybons added the CherryPickApproved Used during the release process for point releases label May 27, 2020
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label May 27, 2020
@andybons
Copy link
Member

@adg can you create the cherry-pick CL (per https://golang.org/wiki/MinorReleases) and add me as a reviewer?

@adg
Copy link
Contributor Author

adg commented May 27, 2020

Note that only the authors of the original CL (or maintainers with the "impersonate" permission) have the ability to create the cherry-pick.

I don't have that permission anymore it seems. :)

@gopherbot
Copy link

Change https://golang.org/cl/235579 mentions this issue: [release-branch.go1.14] cmd/doc: fix merging comments in -src mode

gopherbot pushed a commit that referenced this issue May 28, 2020
These changes fix go doc -src mode that vomits comments from random files if
filesystem does not sort files by name. The issue was with parse.ParseDir
using the Readdir order of files, which varies between platforms and filesystem
implementations. Another option is to merge comments using token.FileSet.Iterate
order in cmd/doc, but since ParseDir is mostly used in go doc, I’ve opted for
smaller change because it’s unlikely to break other uses or cause any perfomance
issues.

Example (macOS APFS): `go doc -src net.ListenPacket`

Fixes #38993

Change-Id: I7f9f368c7d9ccd9a2cbc48665f2cb9798c7b3a3f
GitHub-Last-Rev: 654fb45
GitHub-Pull-Request: #36104
Reviewed-on: https://go-review.googlesource.com/c/go/+/210999
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
(cherry picked from commit 585e31d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/235579
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
@gopherbot
Copy link

Closed by merging a68b7d3 to release-branch.go1.14.

@golang golang locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants