Skip to content

Toolset update: VS 2022 17.1 Preview 5, CMake 3.22, sparse index - #2514

Merged
Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
StephanTLavavej:sparse-index
Feb 12, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 7 commits into
microsoft:mainfrom
StephanTLavavej:sparse-index

Conversation

@StephanTLavavej

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) commented Feb 3, 2022 •

Copy link
Copy Markdown
Member

Update the toolset to VS 2022 17.1 Preview 5 containing CMake 3.22 (now required).

Use --sparse-index when checking out libcxx from llvm-project. See GitHub's blog post Make your monorepo feel small with Git's sparse index.

git 2.36 is expected to improve git clean performance with the sparse index, but AFAIK there are no correctness concerns.

Also, git sparse-checkout init has been deprecated and fused into git sparse-checkout set. See GitHub's blog post Highlights from Git 2.35 and Git's documentation.

Tested with:

git clone https://github.com/microsoft/STL.git
cd STL\llvm-project
git init
git remote add llvm https://github.com/llvm/llvm-project.git
git config --local extensions.partialClone llvm
git fetch --filter=tree:0 --depth=1 llvm 605751790418ca4fb1df1e94dfbac34cfcc1b96f
git sparse-checkout set --cone --sparse-index libcxx/test libcxx/utils/libcxx llvm/utils/lit
git reset --quiet --hard FETCH_HEAD
git clean --quiet -x -d -f

This shrinks llvm-project\.git from 20,234,297 bytes to 9,109,231 bytes and shrinks llvm-project from 42,340,692 bytes to 31,215,626 bytes.

https://github.blog/2021-11-10-make-your-monorepo-feel-small-with-gits-sparse-index/

git 2.36 will improve `git clean` performance with the sparse index.

Also, `git sparse-checkout init` has been deprecated
and fused into `git sparse-checkout set`:

https://github.blog/2022-01-24-highlights-from-git-2-35/

Tested with:

```
git clone https://github.com/microsoft/STL.git
cd STL\llvm-project
git init
git remote add llvm https://github.com/llvm/llvm-project.git
git config --local extensions.partialClone llvm
git fetch --filter=tree:0 --depth=1 llvm 605751790418ca4fb1df1e94dfbac34cfcc1b96f
git sparse-checkout set --cone --sparse-index libcxx/test libcxx/utils/libcxx llvm/utils/lit
git reset --quiet --hard FETCH_HEAD
git clean --quiet -x -d -f
```

Shrinks `llvm-project\.git` from 20,234,297 bytes to 9,109,231 bytes
and shrinks `llvm-project` from 42,340,692 bytes to 31,215,626 bytes.
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the infrastructure Related to repository automation label Feb 3, 2022
@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) marked this pull request as ready for review February 3, 2022 01:35
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej

Copy link
Copy Markdown
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Related to repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants