sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

Go get src errors #68

Closed iamnewton closed 9 years ago

iamnewton commented 9 years ago
$ go get github.com/sourcegraph/srclib/cmd/src
# github.com/sourcegraph/vcsstore
/usr/local/lib/go/src/github.com/sourcegraph/vcsstore/service.go:98: undefined: vcs.OpenMirror
/usr/local/lib/go/src/github.com/sourcegraph/vcsstore/service.go:159: undefined: vcs.CloneMirror
sqs commented 9 years ago

Thanks for reporting this. Fixing this tonight. We will likely move to vendored dependencies using Godep to avoid this issue in the future.

iamnewton commented 9 years ago

K. Thanks. Any idea when the ViM plugin will be ready?

sqs commented 9 years ago

The latest is at https://github.com/lazywei/vim-sourcegraph. We aren't working on it internally at the moment but I will check in with the author to see if we can help.

iamnewton commented 9 years ago

Awesome, thanks for that. Also, question. After you install the srclib using go get, do you have to run anything like make or does go handle all of that? Sorry noob with go here.

sqs commented 9 years ago

go get compiles the src binary and puts it in your $GOBIN (or, if that's not set, your $GOPATH/bin). The common case is where GOPATH=$HOME, and many people have their $HOME/bin in their $PATH, so the go get installation method results in srclib's src being in your $PATH. Running go get always compiles it (or fails with an error), so if it's not in your $PATH then it put it somewhere else (one of those locations).

Happy to help. :smile:

iamnewton commented 9 years ago

Cool. I have my GOPATH set up in my $PATH, so if it compiles with this error fixed, than it should theoretically work.

sqs commented 9 years ago

Out of curiosity, why don't you want to use the binaries?

iamnewton commented 9 years ago

I like to automate my installations. So similar to Ruby and the Gemfile, and the once used Brewfile for Homebrew, I have created an automated script that will install any of the libraries/packages so that I can easily maintain my setup.

iamnewton commented 9 years ago

Any word on this?

sqs commented 9 years ago

Sorry for the lack of response.

Try running it with -u to update the other dependencies:

$ go get -u -v sourcegraph.com/sourcegraph/srclib/cmd/src
iamnewton commented 9 years ago

K. That didn't error out, but not sure how I can test this out to ensure its working.

sqs commented 9 years ago

Try installing the toolchains:

src toolchain install-std

or just src version.

Then you can install an editor plugin (Emacs/Sublime/Atom for now).

Or run it manually:

src api describe --file FILE --start-byte BYTE

where FILE is a JS/Ruby/Go/Python code file in a git repo and BYTE is some byte that is part of an identifier in source code.

iamnewton commented 9 years ago
go get -u -v sourcegraph.com/sourcegraph/srclib/cmd/src
sourcegraph.com/sourcegraph/srclib (download)
# cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib; git pull --ff-only
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
package sourcegraph.com/sourcegraph/srclib/cmd/src: exit status 1
sqs commented 9 years ago

go get works by just running git pull --ff-only in the srclib dir. Do you have unstaged changes such that git pull --ff-only fails? If so, either commit or stash them and try again.

iamnewton commented 9 years ago

I haven't updated or touched anything. But this is modified in the library.

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   docs/theme/images/srclib_symbol.svg

no changes added to commit (use "git add" and/or "git commit -a")
sqs commented 9 years ago

I don't know why that file would have changed, but just run git checkout -- docs/theme/images/srclib_symbol.svg to revert it to its original contents.

iamnewton commented 9 years ago

Doesn't do anything. It keeps the changes for some reason.

iamnewton commented 9 years ago

Regardless, I was able to update the repo, but it doesn't appear to be installed. I can't run src anything.

sqs commented 9 years ago

What's your $GOBIN and $GOPATH? Is your $GOBIN or ${GOPATH}/bin in your $PATH? Thanks for your patience. Our installation-from-source instructions assume knowledge of Go's tooling, which isn't very kind to non-Go users.

iamnewton commented 9 years ago

Nothing in the $GOBIN, but $GOPATH is as follows:

$ echo $GOPATH
/usr/local/lib/go

And that is in my $PATH. And thank you for your patience with someone not so up on Go.

sqs commented 9 years ago

When you install something with go get whatever, it puts the binary into either $GOBIN if it is set, or else $GOPATH/bin. If that dir where the binary resides is not in your $PATH, then you won't be able to run it by just invoking its name. So you either need to run src with the full path like /usr/loca/lib/go/bin/src or set GOBIN=$HOME/bin (for example) and then make sure your $PATH includes $HOME/bin.

iamnewton commented 9 years ago

K. So my $GOPATH/bin is within my $PATH. I've installed a library using Go before, called Pup and that is working correctly. I can't get srclib to install correctly because of the previous errors. So there is no src within my /usr/local/lib/go/bin directory, but there is code within my /usr/local/lib/go/src.

sqs commented 9 years ago

Can you paste the output of go get -v -x -u sourcegraph.com/sourcegraph/srclib/cmd/src?

If you are still getting the git error and git checkout -- . doesn't work, remove that repository directory altogether and rerun the go get command above.

iamnewton commented 9 years ago

Back to square 1, still getting the original errors.

$ go get github.com/sourcegraph/srclib/cmd/src
# github.com/sourcegraph/vcsstore
/usr/local/lib/go/src/github.com/sourcegraph/vcsstore/service.go:98: undefined: vcs.OpenMirror
/usr/local/lib/go/src/github.com/sourcegraph/vcsstore/service.go:159: undefined: vcs.CloneMirror
sqs commented 9 years ago

You need to run the full go get -v -x -u sourcegraph.com/sourcegraph/srclib/cmd/src command. When I referred to the "go get command above", I meant that one, sorry.

iamnewton commented 9 years ago

Its still erring out. For some reason the code has something checked out when its pulling.

$ go get -v -x -u sourcegraph.com/sourcegraph/srclib/cmd/src
…
github.com/sourcegraph/vcsstore (download)
cd /usr/local/lib/go/src/github.com/sourcegraph/vcsstore
git symbolic-ref HEAD
cd /usr/local/lib/go/src/github.com/sourcegraph/vcsstore
git pull --ff-only
# cd /usr/local/lib/go/src/github.com/sourcegraph/vcsstore; git pull --ff-only
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
package sourcegraph.com/sourcegraph/srclib/cmd/src
    imports bitbucket.org/kardianos/osext
    imports code.google.com/p/go.tools/godoc/vfs
    imports code.google.com/p/go.tools/godoc/vfs/mapfs
    imports code.google.com/p/rog-go/parallel
    imports github.com/aybabtme/color
    imports github.com/aybabtme/color/brush
    imports github.com/fsouza/go-dockerclient
    imports github.com/docker/docker/pkg/archive
    imports github.com/Sirupsen/logrus
    imports github.com/docker/docker/pkg/fileutils
    imports github.com/docker/docker/pkg/ioutils
    imports github.com/docker/docker/pkg/pools
    imports github.com/docker/docker/pkg/promise
    imports github.com/docker/docker/pkg/system
    imports github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar
    imports github.com/google/go-querystring/query
    imports github.com/gorilla/context
    imports github.com/inconshreveable/go-update
    imports github.com/inconshreveable/go-update/download
    imports github.com/kr/binarydist
    imports github.com/inconshreveable/go-update/check
    imports github.com/jmoiron/sqlx/types
    imports github.com/kr/fs
    imports github.com/petar/GoLLRB/llrb
    imports github.com/peterbourgon/diskv
    imports github.com/sourcegraph/go-blame/blame
    imports github.com/sourcegraph/go-nnz/nnz
    imports github.com/sourcegraph/go-vcs/vcs
    imports github.com/sourcegraph/httpcache
    imports github.com/sourcegraph/httpcache/diskcache
    imports github.com/sourcegraph/makex
    imports github.com/sourcegraph/rwvfs
    imports github.com/sourcegraph/s3vfs
    imports github.com/sqs/s3
    imports github.com/sqs/s3/s3util
    imports github.com/sourcegraph/vcsstore: exit status 1
…
sqs commented 9 years ago

Can you just delete the entire repo dir and rerun that command? I have never seen this before, sorry.

iamnewton commented 9 years ago

So should I only delete whats in the /src directory? What about the pkg/?

sqs commented 9 years ago

pkg should be ok. You can delete it but don't need to. BTW, if you have other Go code that's valuable in there, don't delete that (I am assuming you don't).

iamnewton commented 9 years ago

Same thing happens. I deleted everything in /usr/local/lib/go/src/sourcegraph.com/

sqs commented 9 years ago

Do you have some editor or program open that is modifying those files automatically?

What version of Go do you have? Try upgrading to go1.3.3.

iamnewton commented 9 years ago

Nope, nothing that is editing it. So I upgraded to Go, deleted anything I could think of that was from sourcegraph.com in the go directory and got farther, but I'm still not able to see anything created in the $GOPATH/bin directory. The following is what happened after it downloaded all of the source code, I believe.

WORK=/var/folders/0y/l68b8szn5016zrzkb1zcgq083tcs1d/T/go-build111760940
github.com/sourcegraph/rwvfs
mkdir -p $WORK/github.com/sourcegraph/rwvfs/_obj/
mkdir -p $WORK/github.com/sourcegraph/
cd /usr/local/lib/go/src/github.com/sourcegraph/rwvfs
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/rwvfs.a -trimpath $WORK -p github.com/sourcegraph/rwvfs -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/rwvfs -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./map.go ./os.go ./sub.go ./vfs.go
github.com/sourcegraph/go-nnz/nnz
mkdir -p $WORK/github.com/sourcegraph/go-nnz/nnz/_obj/
mkdir -p $WORK/github.com/sourcegraph/go-nnz/
cd /usr/local/lib/go/src/github.com/sourcegraph/go-nnz/nnz
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/go-nnz/nnz.a -trimpath $WORK -p github.com/sourcegraph/go-nnz/nnz -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/go-nnz/nnz -I $WORK -pack ./nnz.go
sourcegraph.com/sourcegraph/srclib/db_common
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/db_common/_obj/
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/db_common
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/db_common.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/db_common -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/db_common -I $WORK -pack ./types.go
github.com/Sirupsen/logrus
# github.com/sourcegraph/rwvfs
/usr/local/lib/go/src/github.com/sourcegraph/rwvfs/map.go:11: import /usr/local/lib/go/pkg/darwin_amd64/code.google.com/p/go.tools/godoc/vfs.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
github.com/docker/docker/pkg/ioutils
mkdir -p $WORK/github.com/docker/docker/pkg/ioutils/_obj/
mkdir -p $WORK/github.com/docker/docker/pkg/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/ioutils
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/ioutils.a -trimpath $WORK -p github.com/docker/docker/pkg/ioutils -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/ioutils -I $WORK -pack ./readers.go ./writers.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/go-nnz/
mkdir -p $WORK/github.com/Sirupsen/logrus/_obj/
mkdir -p $WORK/github.com/Sirupsen/
cd /usr/local/lib/go/src/github.com/Sirupsen/logrus
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/Sirupsen/logrus.a -trimpath $WORK -p github.com/Sirupsen/logrus -complete -D _/usr/local/lib/go/src/github.com/Sirupsen/logrus -I $WORK -pack ./entry.go ./exported.go ./formatter.go ./hooks.go ./json_formatter.go ./logger.go ./logrus.go ./terminal_darwin.go ./terminal_notwindows.go ./text_formatter.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/srclib/
mv $WORK/github.com/sourcegraph/go-nnz/nnz.a /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/go-nnz/nnz.a
github.com/docker/docker/pkg/promise
mkdir -p $WORK/github.com/docker/docker/pkg/promise/_obj/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/promise
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/promise.a -trimpath $WORK -p github.com/docker/docker/pkg/promise -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/promise -I $WORK -pack ./promise.go
mv $WORK/sourcegraph.com/sourcegraph/srclib/db_common.a /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/srclib/db_common.a
sourcegraph.com/sourcegraph/srclib/person
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/person/_obj/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/person
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/person.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/person -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/person -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./errors.go ./stats.go ./user.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/
mv $WORK/github.com/docker/docker/pkg/promise.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/promise.a
github.com/docker/docker/pkg/system
mkdir -p $WORK/github.com/docker/docker/pkg/system/_obj/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/system
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/system.a -trimpath $WORK -p github.com/docker/docker/pkg/system -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/system -I $WORK -pack ./errors.go ./meminfo.go ./meminfo_unsupported.go ./stat_unsupported.go ./utimes_darwin.go ./xattrs_unsupported.go
mv $WORK/github.com/docker/docker/pkg/ioutils.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/ioutils.a
github.com/docker/docker/pkg/pools
mkdir -p $WORK/github.com/docker/docker/pkg/pools/_obj/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/pools
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/pools.a -trimpath $WORK -p github.com/docker/docker/pkg/pools -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/pools -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./pools.go
mv $WORK/github.com/docker/docker/pkg/pools.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/pools.a
github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar
mkdir -p $WORK/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/_obj/
mkdir -p $WORK/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/
cd /usr/local/lib/go/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar.a -trimpath $WORK -p github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar -complete -D _/usr/local/lib/go/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar -I $WORK -pack ./common.go ./reader.go ./stat_atimespec.go ./stat_unix.go ./writer.go
mv $WORK/github.com/docker/docker/pkg/system.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/system.a
github.com/sourcegraph/httpcache
mkdir -p $WORK/github.com/sourcegraph/httpcache/_obj/
cd /usr/local/lib/go/src/github.com/sourcegraph/httpcache
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/httpcache.a -trimpath $WORK -p github.com/sourcegraph/httpcache -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/httpcache -I $WORK -pack ./httpcache.go
mv $WORK/sourcegraph.com/sourcegraph/srclib/person.a /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/srclib/person.a
sourcegraph.com/sourcegraph/srclib/repo
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/repo/_obj/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/repo
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/repo.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/repo -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/repo -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./errors.go ./repo.go ./stats.go ./uri.go
mv $WORK/sourcegraph.com/sourcegraph/srclib/repo.a /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/srclib/repo.a
github.com/sourcegraph/httpcache/diskcache
mkdir -p $WORK/github.com/sourcegraph/httpcache/diskcache/_obj/
mkdir -p $WORK/github.com/sourcegraph/httpcache/
cd /usr/local/lib/go/src/github.com/sourcegraph/httpcache/diskcache
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/httpcache/diskcache.a -trimpath $WORK -p github.com/sourcegraph/httpcache/diskcache -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/httpcache/diskcache -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./diskcache.go
# github.com/sourcegraph/httpcache/diskcache
/usr/local/lib/go/src/github.com/sourcegraph/httpcache/diskcache/diskcache.go:10: import /usr/local/lib/go/pkg/darwin_amd64/github.com/peterbourgon/diskv.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
sourcegraph.com/sourcegraph/srclib/graph
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/graph/_obj/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/graph
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/graph.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/graph -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/graph -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./def.go ./doc.go ./errors.go ./format.go ./formatter.go ./ref.go ./stats.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/
mv $WORK/github.com/sourcegraph/httpcache.a /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/httpcache.a
github.com/sourcegraph/go-vcs/vcs
mkdir -p $WORK/github.com/sourcegraph/go-vcs/vcs/_obj/
mkdir -p $WORK/github.com/sourcegraph/go-vcs/
cd /usr/local/lib/go/src/github.com/sourcegraph/go-vcs/vcs
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/go-vcs/vcs.a -trimpath $WORK -p github.com/sourcegraph/go-vcs/vcs -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/go-vcs/vcs -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./doc.go ./open_clone.go ./remote.go ./repository.go
# sourcegraph.com/sourcegraph/srclib/graph
/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/graph/def.go:10: import /usr/local/lib/go/pkg/darwin_amd64/github.com/jmoiron/sqlx/types.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
sourcegraph.com/sourcegraph/go-diff/diff
mkdir -p $WORK/sourcegraph.com/sourcegraph/go-diff/diff/_obj/
mkdir -p $WORK/sourcegraph.com/sourcegraph/go-diff/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/go-diff/diff
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/go-diff/diff.a -trimpath $WORK -p sourcegraph.com/sourcegraph/go-diff/diff -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/go-diff/diff -I $WORK -pack ./diff.go ./doc.go ./parse.go ./print.go
# github.com/sourcegraph/go-vcs/vcs
/usr/local/lib/go/src/github.com/sourcegraph/go-vcs/vcs/repository.go:7: import /usr/local/lib/go/pkg/darwin_amd64/code.google.com/p/go.tools/godoc/vfs.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
sourcegraph.com/sourcegraph/srclib/task2
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/task2/_obj/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/task2
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/task2.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/task2 -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/task2 -I $WORK -pack ./logger.go
mv $WORK/sourcegraph.com/sourcegraph/srclib/task2.a /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/srclib/task2.a
github.com/sourcegraph/go-blame/blame
mkdir -p $WORK/github.com/sourcegraph/go-blame/blame/_obj/
mkdir -p $WORK/github.com/sourcegraph/go-blame/
cd /usr/local/lib/go/src/github.com/sourcegraph/go-blame/blame
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/sourcegraph/go-blame/blame.a -trimpath $WORK -p github.com/sourcegraph/go-blame/blame -complete -D _/usr/local/lib/go/src/github.com/sourcegraph/go-blame/blame -I $WORK -pack ./blame.go ./hg_repo_annotate_py.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/Sirupsen/
mv $WORK/github.com/Sirupsen/logrus.a /usr/local/lib/go/pkg/darwin_amd64/github.com/Sirupsen/logrus.a
github.com/docker/docker/pkg/fileutils
mkdir -p $WORK/github.com/docker/docker/pkg/fileutils/_obj/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/fileutils
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/fileutils.a -trimpath $WORK -p github.com/docker/docker/pkg/fileutils -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/fileutils -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./fileutils.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/go-diff/
mv $WORK/sourcegraph.com/sourcegraph/go-diff/diff.a /usr/local/lib/go/pkg/darwin_amd64/sourcegraph.com/sourcegraph/go-diff/diff.a
mv $WORK/github.com/docker/docker/pkg/fileutils.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/fileutils.a
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/go-blame/
mv $WORK/github.com/sourcegraph/go-blame/blame.a /usr/local/lib/go/pkg/darwin_amd64/github.com/sourcegraph/go-blame/blame.a
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/
mv $WORK/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar.a
github.com/docker/docker/pkg/archive
mkdir -p $WORK/github.com/docker/docker/pkg/archive/_obj/
cd /usr/local/lib/go/src/github.com/docker/docker/pkg/archive
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/docker/docker/pkg/archive.a -trimpath $WORK -p github.com/docker/docker/pkg/archive -complete -D _/usr/local/lib/go/src/github.com/docker/docker/pkg/archive -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./archive.go ./changes.go ./diff.go ./time_unsupported.go ./wrap.go
mv $WORK/github.com/docker/docker/pkg/archive.a /usr/local/lib/go/pkg/darwin_amd64/github.com/docker/docker/pkg/archive.a
github.com/fsouza/go-dockerclient
mkdir -p $WORK/github.com/fsouza/go-dockerclient/_obj/
mkdir -p $WORK/github.com/fsouza/
cd /usr/local/lib/go/src/github.com/fsouza/go-dockerclient
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/fsouza/go-dockerclient.a -trimpath $WORK -p github.com/fsouza/go-dockerclient -complete -D _/usr/local/lib/go/src/github.com/fsouza/go-dockerclient -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./change.go ./client.go ./container.go ./env.go ./event.go ./exec.go ./image.go ./misc.go ./signal.go ./stdcopy.go ./tar.go
mkdir -p /usr/local/lib/go/pkg/darwin_amd64/github.com/fsouza/
mv $WORK/github.com/fsouza/go-dockerclient.a /usr/local/lib/go/pkg/darwin_amd64/github.com/fsouza/go-dockerclient.a
sourcegraph.com/sourcegraph/srclib/util
mkdir -p $WORK/sourcegraph.com/sourcegraph/srclib/util/_obj/
cd /usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/util
/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64/6g -o $WORK/sourcegraph.com/sourcegraph/srclib/util.a -trimpath $WORK -p sourcegraph.com/sourcegraph/srclib/util -complete -D _/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/util -I $WORK -I /usr/local/lib/go/pkg/darwin_amd64 -pack ./colorize_diff.go ./docker.go ./errors.go ./homedir.go
# sourcegraph.com/sourcegraph/srclib/util
/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/util/colorize_diff.go:6: import /usr/local/lib/go/pkg/darwin_amd64/github.com/aybabtme/color/brush.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
sqs commented 9 years ago

Hmm, you have some leftover things in pkg from the old Go version. I guess you actually do need to delete that pkg dir when you upgrade Go.

/usr/local/lib/go/src/sourcegraph.com/sourcegraph/srclib/util/colorize_diff.go:6: import /usr/local/lib/go/pkg/darwin_amd64/github.com/aybabtme/color/brush.a: object is [darwin amd64 go1.3.2 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]
iamnewton commented 9 years ago

So after just blowing out everything in the directory and upgrading to Go 1.3.3, it appears it works…

$ src version
srclib devel
sqs commented 9 years ago

Great!