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

Issue 7341053: code review 7341053: cmd/godoc: add support for display Notes parsed by pkg/...

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by cnicolaou
Modified:
11 years, 2 months ago
Reviewers:
minux1, gri
CC:
gri, gri1, gburd, dsymonds, rsc, kevlar, golang-dev
Visibility:
Public.

Description

cmd/godoc: add support for display Notes parsed by pkg/go/doc pkg/go/doc: move BUG notes from Package.Bugs to the general Package.Notes field. Removing .Bugs would break existing code so it's left in for now.

Patch Set 1 #

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

Total comments: 4

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

Total comments: 2

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -39 lines) Patch
M lib/godoc/package.html View 1 2 3 2 chunks +5 lines, -14 lines 0 comments Download
M lib/godoc/package.txt View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M src/cmd/godoc/godoc.go View 1 2 3 4 4 chunks +24 lines, -5 lines 0 comments Download
M src/cmd/godoc/main.go View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M src/pkg/go/doc/doc.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M src/pkg/go/doc/reader.go View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M src/pkg/go/doc/testdata/a.0.golden View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M src/pkg/go/doc/testdata/a.1.golden View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M src/pkg/go/doc/testdata/a.2.golden View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M src/pkg/go/doc/testdata/a0.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/go/doc/testdata/template.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 26
cnicolaou
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 2 months ago (2013-02-20 00:06:56 UTC) #1
gburd
This change breaks code that uses the Package Bugs field.
11 years, 2 months ago (2013-02-20 03:41:59 UTC) #2
cnicolaou
On 2013/02/20 03:41:59, gburd wrote: > This change breaks code that uses the Package Bugs ...
11 years, 2 months ago (2013-02-20 05:19:01 UTC) #3
gburd
The Bugs field must be populated to honor the compatibility guarantee that programs will continue ...
11 years, 2 months ago (2013-02-20 06:05:41 UTC) #4
cnicolaou
ok, done. I've populated the .Bugs field and made sure the unittest covers this case. ...
11 years, 2 months ago (2013-02-20 19:50:10 UTC) #5
cnicolaou
Hello gri@golang.org, gri@google.com, gary.burd@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-02-20 19:50:11 UTC) #6
gri1
On Tue, Feb 19, 2013 at 10:05 PM, <gary.burd@gmail.com> wrote: > The Bugs field must ...
11 years, 2 months ago (2013-02-20 19:55:40 UTC) #7
gri
I think this is mostly good, but let's wait for Gary's response. Thanks. - gri ...
11 years, 2 months ago (2013-02-20 20:04:26 UTC) #8
gburd
> What programs require a non-empty BUG fields or otherwise > they will break? Or ...
11 years, 2 months ago (2013-02-20 22:33:04 UTC) #9
dsymonds
How about making the new Notes field be defined as containing all non-BUG notes. Then ...
11 years, 2 months ago (2013-02-20 23:12:08 UTC) #10
cnicolaou
On 2013/02/20 22:33:04, gburd wrote: > > What programs require a non-empty BUG fields or ...
11 years, 2 months ago (2013-02-20 23:38:29 UTC) #11
cnicolaou
On 2013/02/20 23:12:08, dsymonds wrote: > How about making the new Notes field be defined ...
11 years, 2 months ago (2013-02-20 23:39:32 UTC) #12
gri
This looks good overall now; and I've verified that it works and doesn't disturb the ...
11 years, 2 months ago (2013-02-21 20:53:42 UTC) #13
rsc
I haven't looked closely, but I see a lot of string-keyed maps floating around. Remember ...
11 years, 2 months ago (2013-02-21 20:56:10 UTC) #14
gri1
Sigh, yes, I glanced over this. We need to jave sorted data structures for reproducible ...
11 years, 2 months ago (2013-02-21 21:24:03 UTC) #15
cnicolaou
I've made the changes you asked for above. I'm using PageInfo.Notes for the top level ...
11 years, 2 months ago (2013-02-24 21:40:15 UTC) #16
kevlar
text/template sorts its map keys: "If the value is a map and the keys are ...
11 years, 2 months ago (2013-02-24 21:55:28 UTC) #17
cnicolaou
Hello gri@golang.org, gri@google.com, gary.burd@gmail.com, dsymonds@golang.org, rsc@golang.org, kevlar@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-02-25 20:58:37 UTC) #18
gri
LGTM Can you please re-sync and re-upload? I get abort: codereview issue 7341053 is out ...
11 years, 2 months ago (2013-02-26 00:31:07 UTC) #19
cnicolaou
Hello gri@golang.org, gri@google.com, gary.burd@gmail.com, dsymonds@golang.org, rsc@golang.org, kevlar@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-02-26 00:55:19 UTC) #20
gri
LGTM thanks. PS: There appears to be an extra newline between the last documented entry ...
11 years, 2 months ago (2013-02-26 04:29:59 UTC) #21
gri
*** Submitted as https://code.google.com/p/go/source/detail?r=7988a4263b4b *** cmd/godoc: add support for display Notes parsed by pkg/go/doc pkg/go/doc: ...
11 years, 2 months ago (2013-02-26 04:34:57 UTC) #22
minux1
This seems to display any Notes found not only at top (package/file) level but also ...
11 years, 2 months ago (2013-02-28 19:14:51 UTC) #23
gri1
I believe this is no different from Bugs. That said, we know that we need ...
11 years, 2 months ago (2013-02-28 19:17:30 UTC) #24
minux1
On Fri, Mar 1, 2013 at 3:17 AM, Robert Griesemer <gri@google.com> wrote: > I believe ...
11 years, 2 months ago (2013-02-28 19:26:28 UTC) #25
cnicolaou
11 years, 2 months ago (2013-02-28 23:05:02 UTC) #26
On Thu, Feb 28, 2013 at 11:26 AM, minux <minux.ma@gmail.com> wrote:

>
> On Fri, Mar 1, 2013 at 3:17 AM, Robert Griesemer <gri@google.com> wrote:
>
>> I believe this is no different from Bugs. That said, we know that we need
>> to better format the output, and do a better job with collecting the right
>> text for TODOs and other notes.
>>
> agreed.
>

yep, for sure, both for the original BUGs and arbitrary notes.

>
>
>>
>> In general, we probably don't want to show TODOs in docs - they tend to
>> be internal things.
>>
> however, sometimes one do use TODO to document limitations of a package.
> i propose we only display package level NOTEs in docs (by default), or we
> can
> arrange function level NOTEs to be displayed only as docs for that
> function.
>

If a given team/project wants to do this, they can simply agree to use one
marker for public comments and another for internal ones and then just use
godoc accordingly. E.g. TODO for top level ones and todo() for internal
ones - the second lower case one won't get detected anyway. Isn't this good
enough to achieve the desired effect - it certainly meets my goals which
led to this change originally.

Cheers, Cos.
Sign in to reply to this message.

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