runtime/race: improve public documentation
Move the documentation from race.go to doc.go, because
race.go uses +build race, so it's not normally parsed by go doc.
Rephrase the documentation for end users, provide link to race
detector manual.
Fixes issue 5444.
On 2013/05/12 16:15:18, minux wrote: > description: s/documentatino/documentation/. done > should we also fix cmd/godoc? ...
11 years, 11 months ago
(2013-05-13 06:24:51 UTC)
#6
On 2013/05/12 16:15:18, minux wrote:
> description: s/documentatino/documentation/.
done
> should we also fix cmd/godoc?
what exactly do you mean?
I think it's bad idea to parse all files. There can be "+build" (disabled) files
and lots of duplicates and irrelevant functions for e.g. syscall.
*** Submitted as https://code.google.com/p/go/source/detail?r=d29da2ced72b *** runtime/race: improve public documentation Move the documentation from race.go to ...
11 years, 11 months ago
(2013-05-13 06:28:32 UTC)
#7
*** Submitted as https://code.google.com/p/go/source/detail?r=d29da2ced72b ***
runtime/race: improve public documentation
Move the documentation from race.go to doc.go, because
race.go uses +build race, so it's not normally parsed by go doc.
Rephrase the documentation for end users, provide link to race
detector manual.
Fixes issue 5444.
R=golang-dev, minux.ma, adg, r
CC=golang-dev
https://codereview.appspot.com/9144050
On Mon, May 13, 2013 at 2:24 PM, <dvyukov@google.com> wrote: > > should we also ...
11 years, 11 months ago
(2013-05-13 07:56:38 UTC)
#8
On Mon, May 13, 2013 at 2:24 PM, <dvyukov@google.com> wrote:
> > should we also fix cmd/godoc?
> what exactly do you mean?
> I think it's bad idea to parse all files. There can be "+build"
> (disabled) files and lots of duplicates and irrelevant functions for
> e.g. syscall.
>
sorry, i should have been more specific here.
do you think it's a bug of godoc to regard runtime/race as a command prior
to this CL?
(there is no package main in runtime/race)
$ godoc runtime 2>/dev/null |head -1
PACKAGE DOCUMENTATION
$ godoc runtime/race 2>/dev/null |head -1
COMMAND DOCUMENTATION
On Mon, May 13, 2013 at 11:56 AM, minux <minux.ma@gmail.com> wrote: > > On Mon, ...
11 years, 11 months ago
(2013-05-13 08:18:17 UTC)
#9
On Mon, May 13, 2013 at 11:56 AM, minux <minux.ma@gmail.com> wrote:
>
> On Mon, May 13, 2013 at 2:24 PM, <dvyukov@google.com> wrote:
>>
>> > should we also fix cmd/godoc?
>> what exactly do you mean?
>> I think it's bad idea to parse all files. There can be "+build"
>> (disabled) files and lots of duplicates and irrelevant functions for
>> e.g. syscall.
>
> sorry, i should have been more specific here.
>
> do you think it's a bug of godoc to regard runtime/race as a command prior
> to this CL?
> (there is no package main in runtime/race)
>
> $ godoc runtime 2>/dev/null |head -1
> PACKAGE DOCUMENTATION
> $ godoc runtime/race 2>/dev/null |head -1
> COMMAND DOCUMENTATION
Probably it's a bug, I don't know.
On Mon, May 13, 2013 at 4:18 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Mon, ...
11 years, 11 months ago
(2013-05-13 08:56:43 UTC)
#10
On Mon, May 13, 2013 at 4:18 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Mon, May 13, 2013 at 11:56 AM, minux <minux.ma@gmail.com> wrote:
> >
> > On Mon, May 13, 2013 at 2:24 PM, <dvyukov@google.com> wrote:
> >>
> >> > should we also fix cmd/godoc?
> >> what exactly do you mean?
> >> I think it's bad idea to parse all files. There can be "+build"
> >> (disabled) files and lots of duplicates and irrelevant functions for
> >> e.g. syscall.
> >
> > sorry, i should have been more specific here.
> >
> > do you think it's a bug of godoc to regard runtime/race as a command
> prior
> > to this CL?
> > (there is no package main in runtime/race)
> >
> > $ godoc runtime 2>/dev/null |head -1
> > PACKAGE DOCUMENTATION
> > $ godoc runtime/race 2>/dev/null |head -1
> > COMMAND DOCUMENTATION
>
> Probably it's a bug, I don't know.
>
Ah, it's a special case for the tools written in C,
from cmd/godoc/godoc.go:
// collect package files
pkgname := pkginfo.Name
pkgfiles := append(pkginfo.GoFiles, pkginfo.CgoFiles...)
if len(pkgfiles) == 0 {
// Commands written in C have no .go files in the build.
// Instead, documentation may be found in an ignored file.
// The file may be ignored via an explicit +build ignore
// constraint (recommended), or by defining the package
// documentation (historic).
pkgname = "main" // assume package main since pkginfo.Name
== ""
pkgfiles = pkginfo.IgnoredGoFiles
}
so any package without Go source is treated as a command.
Issue 9144050: code review 9144050: runtime/race: improve public documentation
(Closed)
Created 11 years, 11 months ago by dvyukov
Modified 11 years, 11 months ago
Reviewers:
Base URL:
Comments: 0