FAQ
Below side-effects are seen with latest change of godoc moving to go.tools.
Related suggestions as well are listed. If this is acceptable will create a
issue & prepare a CL for the same.

1. godoc from $GOPATH/code.google.com/p/go.tools is getting installed in
$GOROOT/bin
proposal: install godoc in gopath as done for all packages that are not
part of golang repo proper (no surprises).

2. "go doc" has dependency on (specific revision of)godoc which is from a
different repo
If this assumption is OK, a corollary is that incase of people building
from source, it is a reasonable expectation that go.tools must exist in
their GOPATH or it is not a bad surprise if hg cloned to their GOPATH when
not present.

3. go build from source does not complete the build unless internet
connectivity exists due to hg clone of go.tools (for api compatibility
check)

Current handling:
create a temporary gopath and clone the go.tools repo to relevant revision.
run the tool.

    I suggest below changes for current handling:

If gopath does not exist:
set gopath to tempdir (current handling)

if go.tools does not exist in gopath(s) download the tool:
go get -d -u code.google.com/p/go.tools/cmd/godoc

if goToolsVersion does exist in current repo:
hg pull

hg update -r ${goToolsVersion} $gopath/code.google.com/p/go.tools/godoc
go install $gopath/code.google.com/p/go.tools/godoc

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Shivakumar GN at Aug 11, 2013 at 9:05 am
    I seem to have mixed 2 different issues related to go.tools that I was
    facing at the same time.
    Can anyone confirm if there is merit in fixing these?

    1. Local godoc instance does not seem to work(readTemplate complains about
    missing $GOROOT/lib/godoc/codewalk.html & exits).
        Also it installs in incorrect path ($GOROOT/bin instead of $GOPATH/bin).
        This is since below change:
    hg log -r dcbec1059423
    changeset: 17486:dcbec1059423
    user: Andrew Gerrand <adg@golang.org>
    date: Thu Aug 01 11:21:17 2013 +1000
    summary: cmd/godoc: delete from core repository

    2. go build from source does not complete (api compatibility check) without
    internet connection due cmd/api in go.tools is pulled during the test.
        This is since below change:
    hg log -r17619
    changeset: 17619:08ad5d12478d
    user: Brad Fitzpatrick <bradfitz@golang.org>
    date: Thu Aug 08 11:06:38 2013 -0700
    summary: cmd/api: update run.go to fetch from go.tools when needed

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brad Fitzpatrick at Aug 13, 2013 at 1:13 am

    On Sun, Aug 11, 2013 at 2:05 AM, Shivakumar GN wrote:

    I seem to have mixed 2 different issues related to go.tools that I was
    facing at the same time.
    Can anyone confirm if there is merit in fixing these?

    1. Local godoc instance does not seem to work(readTemplate complains about
    missing $GOROOT/lib/godoc/codewalk.html & exits).
    Also it installs in incorrect path ($GOROOT/bin instead of $GOPATH/bin).
    This is since below change:
    hg log -r dcbec1059423
    changeset: 17486:dcbec1059423
    user: Andrew Gerrand <adg@golang.org>
    date: Thu Aug 01 11:21:17 2013 +1000
    summary: cmd/godoc: delete from core repository
    Yes. I have a pending CL to start to fix some of this. I think this was
    deleted from the core repo too soon.

    2. go build from source does not complete (api compatibility check)
    without internet connection due cmd/api in go.tools is pulled during the
    test.
    This is since below change:
    hg log -r17619
    changeset: 17619:08ad5d12478d
    user: Brad Fitzpatrick <bradfitz@golang.org>
    date: Thu Aug 08 11:06:38 2013 -0700
    summary: cmd/api: update run.go to fetch from go.tools when needed
    Please review https://codereview.appspot.com/12814043

    Feel free to reply with LGTM and I'll submit it.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 10, '13 at 5:35p
activeAug 13, '13 at 1:13a
posts3
users2
websitegolang.org

2 users in discussion

Shivakumar GN: 2 posts Brad Fitzpatrick: 1 post

People

Translate

site design / logo © 2021 Grokbase