Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(189)

Issue 7333046: code review 7333046: cmd/godoc: use go/build to determine package and exampl... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by gri
Modified:
12 years, 2 months ago
Reviewers:
gburd, dave
CC:
adg, rsc, bradfitz, golang-dev
Visibility:
Public.

Description

cmd/godoc: use go/build to determine package and example files Also: - faster code for example extraction - simplify handling of command documentation: all "main" packages are treated as commands - various minor cleanups along the way For commands written in Go, any doc.go file containing documentation must now be part of package main (rather then package documentation), otherwise the documentation won't show up in godoc (it will still build, though). For commands written in C, documentation may still be in doc.go files defining package documentation, but the recommended way is to explicitly ignore those files with a +build ignore constraint to define package main. Fixes issue 4806.

Patch Set 1 #

Patch Set 2 : diff -r 864c37196df8 https://code.google.com/p/go #

Patch Set 3 : diff -r 864c37196df8 https://code.google.com/p/go #

Patch Set 4 : diff -r 3836bcbafa69 https://code.google.com/p/go/ #

Patch Set 5 : diff -r ddad93a43297 https://code.google.com/p/go/ #

Patch Set 6 : diff -r f30bdd45914c https://code.google.com/p/go #

Patch Set 7 : diff -r f30bdd45914c https://code.google.com/p/go #

Patch Set 8 : diff -r f30bdd45914c https://code.google.com/p/go #

Total comments: 11

Patch Set 9 : diff -r e93de8482d59 https://code.google.com/p/go #

Patch Set 10 : diff -r e93de8482d59 https://code.google.com/p/go #

Patch Set 11 : diff -r e93de8482d59 https://code.google.com/p/go #

Patch Set 12 : diff -r d46d4fb24d4f https://code.google.com/p/go #

Patch Set 13 : diff -r bd83fa6162f2 https://code.google.com/p/go #

Patch Set 14 : diff -r bd83fa6162f2 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -236 lines) Patch
M lib/godoc/package.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/godoc/package.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M misc/dashboard/builder/doc.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M misc/goplay/doc.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/5a/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/5c/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/5g/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/5l/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/6a/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/6c/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/6g/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/6l/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/8a/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/8c/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/8g/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/8l/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/cc/doc.go View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M src/cmd/cgo/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/cov/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/fix/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gc/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/go/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/go/main.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/godoc/dirtrees.go View 1 2 chunks +3 lines, -5 lines 0 comments Download
M src/cmd/godoc/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/godoc/godoc.go View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +108 lines, -157 lines 0 comments Download
M src/cmd/godoc/parser.go View 1 2 3 3 chunks +10 lines, -41 lines 0 comments Download
M src/cmd/gofmt/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/ld/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/nm/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/pack/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/prof/doc.go View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/vet/doc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/yacc/doc.go View 1 5 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exp/ebnflint/doc.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/exp/gotype/doc.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18
gri
Hello adg@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years, 2 months ago (2013-02-18 07:11:00 UTC) #1
dave_cheney.net
Good riddance to the documentation package. On Mon, Feb 18, 2013 at 6:11 PM, <gri@golang.org> ...
12 years, 2 months ago (2013-02-18 07:16:15 UTC) #2
bradfitz
https://codereview.appspot.com/7333046/diff/13039/src/pkg/go/build/build.go File src/pkg/go/build/build.go (left): https://codereview.appspot.com/7333046/diff/13039/src/pkg/go/build/build.go#oldcode378 src/pkg/go/build/build.go:378: // - .go files in package documentation this and ...
12 years, 2 months ago (2013-02-18 15:42:38 UTC) #3
gri
I suppose that's correct. Existing binaries written in Go containing a package documentation will have ...
12 years, 2 months ago (2013-02-18 17:07:25 UTC) #4
adg
On 2013/02/18 15:42:38, bradfitz wrote: > https://codereview.appspot.com/7333046/diff/13039/src/pkg/go/build/build.go > File src/pkg/go/build/build.go (left): > > https://codereview.appspot.com/7333046/diff/13039/src/pkg/go/build/build.go#oldcode378 > ...
12 years, 2 months ago (2013-02-19 05:19:21 UTC) #5
adg
LGTM https://codereview.appspot.com/7333046/diff/13039/src/cmd/godoc/godoc.go File src/cmd/godoc/godoc.go (right): https://codereview.appspot.com/7333046/diff/13039/src/cmd/godoc/godoc.go#newcode974 src/cmd/godoc/godoc.go:974: // directories, PageInfo.Dirs is nil. If error occurred, ...
12 years, 2 months ago (2013-02-19 05:35:39 UTC) #6
gri
PTAL https://codereview.appspot.com/7333046/diff/13039/src/cmd/godoc/godoc.go File src/cmd/godoc/godoc.go (right): https://codereview.appspot.com/7333046/diff/13039/src/cmd/godoc/godoc.go#newcode974 src/cmd/godoc/godoc.go:974: // directories, PageInfo.Dirs is nil. If error occurred, ...
12 years, 2 months ago (2013-02-19 05:57:30 UTC) #7
adg
Looping in Gary Burd, one of the more prominent users of go/build. How would removing ...
12 years, 2 months ago (2013-02-19 06:13:22 UTC) #8
adg
On 19 February 2013 16:57, <gri@golang.org> wrote: > Need to re-check. My preference is still ...
12 years, 2 months ago (2013-02-19 06:15:01 UTC) #9
rsc
I would love to see package documentation disappear, but I think Andrew is right that ...
12 years, 2 months ago (2013-02-19 16:05:59 UTC) #10
gri
PTAL. I removed the go/build changes. Packages and commands will still build as before, unchanged. ...
12 years, 2 months ago (2013-02-19 19:10:50 UTC) #11
bradfitz
LGTM
12 years, 2 months ago (2013-02-19 19:18:14 UTC) #12
gri
*** Submitted as https://code.google.com/p/go/source/detail?r=3633a89bb56d *** cmd/godoc: use go/build to determine package and example files Also: ...
12 years, 2 months ago (2013-02-19 19:20:02 UTC) #13
gburd
> How would removing support for "package documentation" > affect godoc.org? I will remove the ...
12 years, 2 months ago (2013-02-20 06:20:12 UTC) #14
gri
Thanks. Apologies for jumping the gun here. - gri On Tue, Feb 19, 2013 at ...
12 years, 2 months ago (2013-02-20 06:28:03 UTC) #15
dave_cheney.net
I believe this has caused a regression, see https://groups.google.com/d/topic/golang-nuts/Jv70Gj2nSmc/discussion
12 years, 2 months ago (2013-02-21 01:45:29 UTC) #16
gri
Thanks. I answered to that thread. This is not technically an API change but a ...
12 years, 2 months ago (2013-02-21 02:40:43 UTC) #17
dave_cheney.net
12 years, 2 months ago (2013-02-21 02:47:40 UTC) #18
Thanks Robert.
On 21 Feb 2013 13:40, "Robert Griesemer" <gri@golang.org> wrote:

> Thanks. I answered to that thread. This is not technically an API change
> but a change of how godoc interprets package documentation. Clearly we need
> to address this if it causes major issues, but at the same time we'd like
> to move forward.
> - gri
>
>
> On Wed, Feb 20, 2013 at 5:45 PM, <dave@cheney.net> wrote:
>
>> I believe this has caused a regression, see
>>
https://groups.google.com/d/**topic/golang-nuts/Jv70Gj2nSmc/**discussion<http...
>>
>>
https://codereview.appspot.**com/7333046/<https://codereview.appspot.com/7333...
>>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b