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

Issue 9144050: code review 9144050: runtime/race: improve public documentation (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by dvyukov
Modified:
10 years, 10 months ago
Reviewers:
CC:
golang-dev, minux1, adg, r
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r ce5b441d2fc6 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r ce5b441d2fc6 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r ce5b441d2fc6 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r ce5b441d2fc6 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 880991592ded https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
A src/pkg/runtime/race/doc.go View 1 1 chunk +9 lines, -0 lines 0 comments Download
M src/pkg/runtime/race/race.go View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 10
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 10 months ago (2013-05-12 11:11:52 UTC) #1
minux1
description: s/documentatino/documentation/. should we also fix cmd/godoc?
10 years, 10 months ago (2013-05-12 16:15:18 UTC) #2
minux1
the change itself LGTM.
10 years, 10 months ago (2013-05-12 16:16:40 UTC) #3
adg
LGTM I'll also apply this to the release branch.
10 years, 10 months ago (2013-05-13 00:32:31 UTC) #4
r
LGTM
10 years, 10 months ago (2013-05-13 01:28:20 UTC) #5
dvyukov
On 2013/05/12 16:15:18, minux wrote: > description: s/documentatino/documentation/. done > should we also fix cmd/godoc? ...
10 years, 10 months ago (2013-05-13 06:24:51 UTC) #6
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=d29da2ced72b *** runtime/race: improve public documentation Move the documentation from race.go to ...
10 years, 10 months ago (2013-05-13 06:28:32 UTC) #7
minux1
On Mon, May 13, 2013 at 2:24 PM, <dvyukov@google.com> wrote: > > should we also ...
10 years, 10 months ago (2013-05-13 07:56:38 UTC) #8
dvyukov
On Mon, May 13, 2013 at 11:56 AM, minux <minux.ma@gmail.com> wrote: > > On Mon, ...
10 years, 10 months ago (2013-05-13 08:18:17 UTC) #9
minux1
10 years, 10 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.
Sign in to reply to this message.

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