-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: get / mod: document pruning repos for "module source tree too big" error #32297
Comments
Can you provide more details as asked by @bcmills in #29210 ? What are the file types that contribute to the repo size ? Can you provide a breakdown ? Is all of it coming entirely from .go source files which are required to build it ? If not, have you tried pruning them from being included in the module by placing another go.mod in the right directory ? |
We were able to create |
@paulquerna-okta Does the repo just contain source files and test data needed by The purpose of the limit is to avoid making users download large artifacts (zip files) with files that aren't actually needed. Files that aren't part of the build (large resources, vendor directories, etc) may be removed in tagged versions to get below this limit. These files can usually still be on development branches though. |
We cannot just remove these files from "tagged" versions in git -- we are tagging a whole software project which combines multiple programming languages. You are right as far as the Go compiler / modules are concerned, there are many files that are not relevant. It's pretty common pattern to have a This is really an intersection of Go Modules and two mono-repositories. Mono-repos like this are less common in open source, so I'm less sure this is an issue about users downloading large files. We're on the path to breaking up the mono-repos, but kinda ironically that path was to first get to Go Modules tooling to make it easier. |
I agree that removing the files from tagged versions is not really a viable option. We've been using Right now the supported mechanism is to add |
@bcmills - Does it make sense to note this trick in the wiki ? Seems useful. Or is it already documented somewhere ? |
@thepudds might know. I don't see it today. |
Thanks @thepudds |
What version of Go are you using (
go version
)?What did you do?
Hello Gophers. We are attempting to migrate several large proprietary Go ecosystems to using Go Modules. Previously we have used
glide
and would like to be on track with where the community is going.When attempting to migrate repo
alpha
that depends onbeta
, we received themodule source tree too big
error. We have already migratedbeta
to Go modules in a development branch, which is the sha reference in thego get
bellow.This error also prevents commands like
go mod vendor
from working, and is seemingly hidden from showing up as an error there - it treats themodule source tree too big
error to imply the module import path is invalid, so some commands "kinda" work, but then we get later failures because the files weren't actually placed invendor/
.But, you can see the direct error when attempting a
go get
of the repo:What did you expect to see?
go mod vendor
andgo get
to work with large repos. Alternatively a flag or environment variable available to increase the limit would be viable for our environment.What did you see instead?
The
module source tree too big
error.Previous reports:
#25470
#29210
In the previous report, #29210 (comment) "Folks can file separate issues if they discover other repositories that don't fit." is the last comment, so here we are.
The text was updated successfully, but these errors were encountered: