move
move copied to clipboard
[Feature Request] Optimize fetching git repo dependencies
🚀 Feature Request
Let's optimize the behaviour of git dependency fetching.
Motivation
The current behavior for the
[dependencies.AptosFramework]
git = "https://github.com/aptos-labs/aptos-core.git"
subdir = "aptos-move/framework/aptos-framework/"
rev = "a1dc2e66e49ded056c10318f476e0096d0d17a6f"
is:
-
git clone https://github.com/aptos-labs/aptos-core.git
-
git checkout a1dc2e66e49ded056c10318f476e0096d0d17a6f
Those clone
operations never cached. So, every time the revision changes, it's another clone of potentially very chunky repo.
There's also no progress feedback in the console, and for the big repos (or slow network connection) compilation seems stuck at times.
Pitch
I'd propose instead to add special $MOVE_HOME/repos
directory and:
- If no desired repo in the directory, clone the whole thing. If there is, just pull the latest commits.
- Checkout to the desired commit.
- Copy the desired subdirectory into the
$MOVE_HOME/$DEP_ROOT
.
It'll make the compilations much faster, and also make $MOVE_HOME
take less space.