Despite the fact that I executed lake exe cache get, lake build keeps on building Mathlib, which takes hours.
lake exe cache get
lake build
This happens because lake build will keep building mathlib if your mathlib dependency uses a lean version different from yours.
So, to build everything using cache:
Copy your mathlib's Lean version into your project's lean-toolchain
cp lake-packages/mathlib/lean-toolchain lean-toolchain
Clean cache to make sure everything goes fine
rm -rf lake-packages rm -rf build lake exe cache clean!
Get cached built files
Finally, build
Copyright © 2021 Jogjafile Inc.
This happens because
lake buildwill keep building mathlib if your mathlib dependency uses a lean version different from yours.So, to build everything using cache:
Copy your mathlib's Lean version into your project's lean-toolchain
Clean cache to make sure everything goes fine
Get cached built files
Finally, build