-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Redundant cloning of git submodules #30107
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
Comments
At the very least it should probably do a shallower clone of those repos. As best I can tell, you should be able to just pass |
Yep, that would be a great start. However the gist of this report is to completely forego downloading the source trees that are never going to be used. |
With this commit, if one bootstraps rust against system llvm then the src/llvm submodule is not updated/checked-out. This saves considerable network bandwith when starting from a fresh clone of rust-lang/rust as the llvm submodule is never cloned. cc rust-lang#30107
rustbuild: smarter `git submodule`-ing With this commit, if one bootstraps rust against system llvm then the src/llvm submodule is not updated/checked-out. This saves considerable network bandwith when starting from a fresh clone of rust-lang/rust as the llvm submodule is never cloned. cc #30107 r? @alexcrichton cc @petevine ~~We could also avoid updating the jemalloc submodule if --disable-jemalloc is used. It just hasn't been implemented.~~ Done This probably doesn't handle "recursive" submodules correctly but I think we don't have any of those right now. I'm still testing a bootstrap but already confirmed that the llvm submodule doesn't get updated when `--llvm-root` is passed to `configure`.
@japaric I've just tested your patch, having done a I also paid attention to the amount of data downloaded by fully cloning other modules, like |
When building from git source, the build system makes a deep clone of git submodules, even those, like
jemalloc
orllvm
, that had been disabled with configure options. (--disable-jemalloc
and--llvm-root
respectively)Not downloading a couple hundred megabytes of data spread over tens of thousands of small files is especially important on flash devices (and slow connections).
The text was updated successfully, but these errors were encountered: