Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: tell go install to install deps from a certain github.com org first #39058

Closed
ORESoftware opened this issue May 13, 2020 · 7 comments
Closed

Comments

@ORESoftware
Copy link

@ORESoftware ORESoftware commented May 13, 2020

We sometimes have to wait for a long time for 3rd party libs to install before our org's dependencies are installed. Since our deps change all the time, but the 3rd party libs are more static, we want a fail fast methodology to be in place - and install our deps first.

One idea is to have two separate go.mod files or contents. Copy our org's deps to one, go install, and then install 3rd party libs as a second step. Might that work?

@ianlancetaylor ianlancetaylor changed the title Tell go install to install deps from a certain github.com org first cmd/go: tell go install to install deps from a certain github.com org first May 13, 2020
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 13, 2020

@bcmills
Copy link
Member

@bcmills bcmills commented May 14, 2020

Since the go command now requires a build cache, running go install on library dependencies should be unnecessary anyway.

Moreover, since the go command now requires a build cache, the static third-party libraries should take essentially no time to install when they are unchanged. Can you give some more detail about why that caching is not effective for your use-case?

@ORESoftware
Copy link
Author

@ORESoftware ORESoftware commented May 14, 2020

cache is not good bc we are in dockerfile / docker build

@bcmills
Copy link
Member

@bcmills bcmills commented May 14, 2020

Docker is capable of saving caches. (You can relocate the Go build cache to a specific location for later reuse by setting the GOCACHE environment variable.)

See the discussion on #27719.

@ORESoftware
Copy link
Author

@ORESoftware ORESoftware commented May 14, 2020

yes but of course I am taking about the very first call to go mod download or go install not the subsequent calls. roger?

@bcmills
Copy link
Member

@bcmills bcmills commented May 14, 2020

If you save the cache, “the very first” call happens only ~once (perhaps once per Go release?), the first time you set up the Docker image. Why is it important to have fail-fast behavior for something that happens so infrequently?

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 18, 2020

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.