Add the MSVC C++ STL library #35784
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 483 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.370
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #35784"
general
weight: 0.35
h-vetinari
This PR adds the recipe for the MSVC C++ STL to conda-forge. @h-vetinari @isuruf please comment here if you want me to add you as maintainers.
It is not every day that we add a new C++ STL to conda-forge, so I'll briefly explain for those who aren't familiar with ongoing discussions why we want to add this. The standard practice for most package managers for languages with a shared standard library like C++ is to compile all packages with a single implementation to avoid ABI conflicts between packages. On Linux we use
libstdc++and on macOS we uselibc++, which are the same as the standard libraries provided by those OSes.Windows provides the MSVC C++ library, but historically it was only convenient to target this with the MSVC compiler (
cl.exe) because the STL headers and import libraries were bundled with Visual Studio. We already use this for packages with MSVC compliant build systems, usually CMake and meson. However a great deal of open source software only provides a Unix compatible build system, which has led to the development of systems like MinGW, which provide a Unix-like environment and targetlibstdc++. In practice this has led to us using two different C++ ABIs, and this has been a source of increasing friction, along with the complexity of installing the MSVC toolchain for end usersSince 2019, the MSVC C++ STL has been available on github with an Apache-2.0 license, which gives us a new option: to package the STL ourselves and build our own Unix-compatible C++ toolchain with clang, the MinGW userspace tools and the MSVC C++ STL. The first step to building that is to add this recipe, but it would ultimately entail rebuilding all C++ shared libraries previously built against
libstdc++on Windows, along with any packages that link to them.There are few obvious things for review here I'll highlight:
msvcstlsince it was simple, but I have no attachment to this name and I'm happy to change it to something better.vc14_runtimefeedstock. The default naming stategy in the upstream repo is to append_ossto the DLL names, which I changed to_condahere just to highlight the build flag that sets this. I think we have 3 choices here, and I'm not sure which of them is preferable:- Use a suffix as I did here
- Don't ship the DLLs at all in this package and rely on
vc14_runtimeto provide them- Ship the DLLs here and don't include them in
vc14_runtime, presumably relying on this package to provide them insteadboost.mathis a git submodule from a specific commit. I instead add the archive associated with that commit as another download source so that we can use source archives instead of git clones.libcxxfeedstock as closely as I could since it seemed most similar to what we want here, so i followed the choices there, but I'm not attached to them:- Separate builds for the debug libraries, which have different file names from the regular libraries
- Including the static libraries and import libraries with the DLLs
libcxxfeedstock, except thetzdbfile, since that seemed Linux-specific, and the.cexample, since it seemed irrelevant here. The only significant change I made was to use the MSVC compiler for the tests instead of clang, since we use the MSVC compiler to actually build the library.This is not a simple package so there may be things which I missed here! I have access to a native Windows machine where I did all the testing so I can examine things there if CI is insufficient.