Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Fetch deps if SRCLIB_FETCH_DEPS env var is set #54

Merged
merged 1 commit into from
Oct 2, 2015
Merged

Fetch deps if SRCLIB_FETCH_DEPS env var is set #54

merged 1 commit into from
Oct 2, 2015

Conversation

sqs
Copy link
Member

@sqs sqs commented Oct 1, 2015

Currently the grapher only fetches deps (with go get) if IN_DOCKER_CONTAINER is true:

cmd := exec.Command(goBinaryName, "get", "-d", "-t", "-v", dep)

This makes sense if you are running srclib in your development GOPATH; you don't want it checking out different revisions of your GOPATH code. But if you are running srclib-go on a dedicated server without Docker, you do want it to create a temporary GOPATH and fetch deps, just like it would if Docker were enabled.

The current behavior results in unresolved refs for any deps that aren't already in the GOPATH, which means a lot of unresolved refs if running on a dedicated, non-Docker server.

Currently the grapher only fetches deps (with go get) if IN_DOCKER_CONTAINER is true:

https://github.com/sourcegraph/srclib-go/blob/fd67bff078ee774c13278bd6e709ee4ef7c30136/graph.go#L150

This makes sense if you are running srclib in your development GOPATH; you don't want it checking out different revisions of your GOPATH code. But if you are running srclib-go on a dedicated server without Docker, you do want it to create a temporary GOPATH and fetch deps, just like it would if Docker were enabled.

The current behavior results in unresolved refs for any deps that aren't already in the GOPATH, which means a lot of unresolved refs if running on a dedicated, non-Docker server.
@dmitshur
Copy link
Contributor

dmitshur commented Oct 2, 2015

That explains a lot.

LGTM.

sqs added a commit that referenced this pull request Oct 2, 2015
Fetch deps if SRCLIB_FETCH_DEPS env var is set
@sqs sqs merged commit 568a1ff into master Oct 2, 2015
@sqs sqs deleted the fetch-deps branch October 2, 2015 00:09
beyang pushed a commit that referenced this pull request Mar 5, 2016
Fetch deps if SRCLIB_FETCH_DEPS env var is set
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants