sourcegraph / go-sourcegraph

https://sourcegraph.com/github.com/sourcegraph/go-sourcegraph
MIT License
42 stars 9 forks source link

Make go generate directives work on more setups. #49

Closed dmitshur closed 9 years ago

dmitshur commented 9 years ago

Add support for running go generate successfully on OS X.

Add support for running go generate with multiple GOPATH workspaces.

slimsag commented 9 years ago

LGTM

dmitshur commented 9 years ago

When this is done being reviewed and ready to merge, I'm happy to move gopathexec under sourcegraph namespace if desired.

sqs commented 9 years ago

lgtm except 1 comment

dmitshur commented 9 years ago

Addressed the comment, PTAL.

After too much energy spent considering/looking for a portable way of using sed/perl/awk or sh or similar, I decided for the simple use of sed, it's nicer just to replace it with a 45 line Go program (which would even work on Windows).

sqs commented 9 years ago

This'll work, but I just was looking and we only use sed here (and nowhere else). We might be able to eliminate sed entirely by putting pbtypes.Timestamp and pbtypes.Void in the same .proto file in github.com/sqs/pbtypes.

dmitshur commented 9 years ago

Since this PR works (it resolves the original issue), if it LGTY, what do you think about merging it as is, and removing gen/gorename.go in an optional followup?

sqs commented 9 years ago

sgtm

dmitshur commented 9 years ago

I believe everything should work without problems (make note of the updated steps in the README) from now on. Please report any issues if you do encounter them.

dmitshur commented 9 years ago

I've created a similar change for srclib at https://github.com/sourcegraph/srclib/pull/177.