Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d1138fc
ci(tests): add msvc@system leg on Windows and pin MSVC via setup-msvc…
ZheFeng7110 Dec 4, 2026
25ec4c4
fix(hana): guard experimental/type_name.hpp for MSVC
ZheFeng7110 Dec 4, 2026
c4a5383
fix(type_traits,variant): guard BOOST_MSVC-divergent exports
ZheFeng7110 Dec 4, 2026
a3401a0
fix(concept_check): guard BOOST_MSVC-divergent exports
ZheFeng7110 Dec 4, 2026
280ae79
fix(algorithm,math): guard is_blank and disambiguate differentiation:…
ZheFeng7110 Dec 4, 2026
060138b
fix(msvc): pass /Zc:__cplusplus and guard boost::units::si::pascal
ZheFeng7110 Dec 4, 2026
d23d731
docs(agents): record Windows native MSVC CI adaptations
ZheFeng7110 Dec 4, 2026
0570f0d
fix(uuid,convert): guard __SIZEOF_INT128__ and MSVC-divergent paramet…
ZheFeng7110 Dec 5, 2026
f49ea5d
fix(type_erasure): disable SFINAE-friendly constructors on MSVC to av…
ZheFeng7110 Dec 5, 2026
25c147f
fix(build): omit boost.sort from root closure on MSVC when range is a…
ZheFeng7110 Dec 5, 2026
b9329f7
docs(agents): record uuid, convert, type_erasure and sort closure MSV…
ZheFeng7110 Dec 5, 2026
0f09323
fix(msvc): use *.lib ldflags and pass /bigobj on native MSVC
ZheFeng7110 Dec 5, 2026
e5203ac
fix(msvc): adapt internal-linkage helpers, url, openmethod, property_…
ZheFeng7110 Dec 5, 2026
52f5c6f
fix(asio): keep executor query/require public under BOOST_ASIO_MSVC f…
ZheFeng7110 Dec 5, 2026
1d18858
docs: record MSVC test suite adaptations in patches/README and design…
ZheFeng7110 Dec 5, 2026
55e9a90
fix(msvc,gcc): fix asio proxies, url base, accumulators ops, inline c…
ZheFeng7110 Dec 5, 2026
b3aab55
fix(msvc,gcc): fix remaining 9 MSVC test failures (winapi, mqtt5, url…
ZheFeng7110 Dec 5, 2026
2af335f
fix(beast,mcpp): sequence advanced_server HTTP/WS requests, restore W…
ZheFeng7110 Dec 5, 2026
fb38dbd
fix(serialization): gate BOOST_DLLEXPORT on DYN_LINK for native MSVC …
ZheFeng7110 Dec 5, 2026
817035c
ci(examples): skip git-dep on msvc@system for pre-MSVC tag mwrap-1.92.0
ZheFeng7110 Dec 5, 2026
ac2c258
docs: finalize Windows MSVC CI adaptation design record
ZheFeng7110 Dec 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions .agents/docs/2026-12-04-windows-msvc-ci-adaptations-design.md

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion .agents/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- `todos/` 放尚未完成的工作项,它们不是决定的记录。
- 移动或改名用 `tools/doc-tools/move_record.py`,它同时改写仓库中对该文件的引用。

共 31 篇记录(其中 0 篇已归档),1 项待办。
共 32 篇记录(其中 0 篇已归档),1 项待办。

## 进行中

Expand All @@ -39,6 +39,10 @@

只列出声明了 subject 的记录。

### ci

- [Windows 原生 MSVC(`msvc@system`)CI 适配记录](2026-12-04-windows-msvc-ci-adaptations-design.md) — landed

### docs

- [设计记录的管理:只增不删、按年归档、生成的索引与 `tools/doc-tools/`](2026-11-08-design-records-management-design.md) — landed
Expand All @@ -64,6 +68,10 @@

## 按日期

### 2026-12

- [Windows 原生 MSVC(`msvc@system`)CI 适配记录](2026-12-04-windows-msvc-ci-adaptations-design.md) — landed

### 2026-11

- [可达导出集合检查与 issue #2 剩余名称的处理](2026-11-29-reachable-exports-design.md) — landed
Expand Down
56 changes: 45 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Boost 1.92.0 as C++23 named modules (mcpplibs.mwrap.boost) — build/test matrix.
#
# Ported from the pre-mwrap wrapper's CI (boost-module b1.92.0wdev tests.yml).
# The five host configurations and their pinned toolchains are the ones that
# wrapper validated; keep the set if a leg is added or dropped:
# The six host configurations and their pinned toolchains are the ones that
# CI validates; keep the set if a leg is added or dropped:
#
# windows-latest x86_64 msvc@system (cl.exe, MSVC 14.52 + SDK 10.0.26100.0)
# windows-latest x86_64 llvm@23.1.3 (clang-cl / clang-msvc)
# ubuntu-24.04 x86_64 gcc@16.1.0
# ubuntu-24.04-arm arm64 gcc@16.1.0
Expand Down Expand Up @@ -31,7 +32,7 @@
#
# The examples, the template smoke test and the release-page check run in the
# `examples` job, which `needs: [test]`: they start only after both groups have
# passed on all five hosts.
# passed on all six hosts.
#
# mcpp comes from the repository's own pin: xlings installs `mcpp 2026.11.27.1`
# (only that entry of `.xlings.json`; its `llvm` pin is the generator's), and
Expand Down Expand Up @@ -61,6 +62,9 @@ env:
XLINGS_NON_INTERACTIVE: '1'
# Must match [workspace].mcpp in .xlings.json — checked on every leg.
MCPP_VERSION: "2026.11.27.1"
# Pinned MSVC toolset and Windows SDK on windows-latest (setup-msvc-dev).
MSVC_TOOLSET: "14.52"
WINDOWS_SDK: "10.0.26100.0"
# Leave the runners room: the vendored tree is large and every leg compiles
# Boost from the same checkout.
MCPP_JOBS: '4'
Expand Down Expand Up @@ -97,6 +101,7 @@ jobs:
fail-fast: false
matrix:
target:
- { name: windows-msvc, os: windows-latest, arch: x86_64, toolchain: "msvc@system", install: "" }
- { name: windows-llvm-msvc, os: windows-latest, arch: x86_64, toolchain: "llvm@23.1.3", install: "llvm 23.1.3" }
- { name: linux-gcc, os: ubuntu-24.04, arch: x86_64, toolchain: "gcc@16.1.0", install: "gcc 16.1.0" }
- { name: linux-gcc, os: ubuntu-24.04-arm, arch: arm64, toolchain: "gcc@16.1.0", install: "gcc 16.1.0" }
Expand All @@ -106,6 +111,14 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Set up MSVC (${{ env.MSVC_TOOLSET }}, SDK ${{ env.WINDOWS_SDK }})
if: runner.os == 'Windows'
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
toolset: ${{ env.MSVC_TOOLSET }}
sdk: ${{ env.WINDOWS_SDK }}

# Warm the mcpp sandbox (engine, registry, toolchain payloads and the
# global BMI cache). Keyed per toolchain so the gcc and llvm legs on one
# OS cannot restore each other's default (config.toml); A and B share the
Expand All @@ -114,9 +127,9 @@ jobs:
uses: actions/cache@v6
with:
path: ~/.mcpp
key: mcpp-${{ matrix.target.os }}-${{ matrix.target.name }}-${{ matrix.target.arch }}-${{ matrix.target.toolchain }}-v${{ env.MCPP_VERSION }}
key: mcpp-${{ matrix.target.os }}-${{ matrix.target.name }}-${{ matrix.target.arch }}-${{ matrix.target.toolchain }}${{ matrix.target.toolchain == 'msvc@system' && format('-{0}-{1}', env.MSVC_TOOLSET, env.WINDOWS_SDK) || '' }}-v${{ env.MCPP_VERSION }}
restore-keys: |
mcpp-${{ matrix.target.os }}-${{ matrix.target.name }}-${{ matrix.target.arch }}-${{ matrix.target.toolchain }}-
mcpp-${{ matrix.target.os }}-${{ matrix.target.name }}-${{ matrix.target.arch }}-${{ matrix.target.toolchain }}${{ matrix.target.toolchain == 'msvc@system' && format('-{0}-{1}', env.MSVC_TOOLSET, env.WINDOWS_SDK) || '' }}-

- name: Install xlings
if: runner.os != 'Windows'
Expand Down Expand Up @@ -154,8 +167,10 @@ jobs:
shell: bash
run: |
set -euo pipefail
mcpp toolchain install ${{ matrix.target.install }}
mcpp toolchain default ${{ matrix.target.toolchain }}
if [ -n "${{ matrix.target.install }}" ]; then
mcpp toolchain install ${{ matrix.target.install }}
fi
mcpp toolchain default "${{ matrix.target.toolchain }}"
mcpp toolchain list

# Guard the grouping invariant: every library feature in mcpp.toml is in
Expand Down Expand Up @@ -278,6 +293,11 @@ jobs:
fail-fast: false
matrix:
include:
- name: windows-msvc
os: windows-latest
arch: x86_64
toolchain: msvc@system
install: ""
- name: windows-llvm-msvc
os: windows-latest
arch: x86_64
Expand Down Expand Up @@ -306,13 +326,21 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Set up MSVC (${{ env.MSVC_TOOLSET }}, SDK ${{ env.WINDOWS_SDK }})
if: runner.os == 'Windows'
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
toolset: ${{ env.MSVC_TOOLSET }}
sdk: ${{ env.WINDOWS_SDK }}

- name: Cache mcpp sandbox
uses: actions/cache@v6
with:
path: ~/.mcpp
key: mcpp-${{ matrix.os }}-${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.toolchain }}-v${{ env.MCPP_VERSION }}
key: mcpp-${{ matrix.os }}-${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.toolchain }}${{ matrix.toolchain == 'msvc@system' && format('-{0}-{1}', env.MSVC_TOOLSET, env.WINDOWS_SDK) || '' }}-v${{ env.MCPP_VERSION }}
restore-keys: |
mcpp-${{ matrix.os }}-${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.toolchain }}-
mcpp-${{ matrix.os }}-${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.toolchain }}${{ matrix.toolchain == 'msvc@system' && format('-{0}-{1}', env.MSVC_TOOLSET, env.WINDOWS_SDK) || '' }}-

- name: Install xlings
if: runner.os != 'Windows'
Expand Down Expand Up @@ -348,8 +376,10 @@ jobs:
shell: bash
run: |
set -euo pipefail
mcpp toolchain install ${{ matrix.install }}
mcpp toolchain default ${{ matrix.toolchain }}
if [ -n "${{ matrix.install }}" ]; then
mcpp toolchain install ${{ matrix.install }}
fi
mcpp toolchain default "${{ matrix.toolchain }}"
mcpp toolchain list

# examples/basic consumes the root package as a path dependency with an
Expand Down Expand Up @@ -378,6 +408,10 @@ jobs:
set -euo pipefail
tag="$(sed -n 's/.*tag = "\([^"]*\)".*/\1/p' git-dep/mcpp.toml | head -n1)"
test -n "$tag"
if [ "${{ matrix.toolchain }}" = "msvc@system" ] && [ "$tag" = "mwrap-1.92.0" ]; then
echo "::notice title=git-dep example skipped::published tag $tag predates native MSVC support"
exit 0
fi
set +e
git ls-remote --exit-code --tags \
https://github.com/mcpplibs/boost-m.git "refs/tags/$tag" >/dev/null 2>&1
Expand Down
28 changes: 20 additions & 8 deletions build.mcpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,25 @@ int main()
body += "export module mcpplibs.mwrap.boost:closure;\n";

// Known toolchain limits of the aggregate closure, reported rather than
// silently worked around. gcc 16.1 ICEs while writing the BMI of any
// aggregate that re-exports boost.sort (direct `import
// mcpplibs.mwrap.boost.sort;` consumers are unaffected), so the root
// closure leaves it out on gcc with an explicit warning. docs/usage.md
// records the limit; llvm and MSVC keep it in the closure.
// silently worked around:
// - gcc 16.1 ICEs while writing the BMI of any aggregate that re-exports
// boost.sort.
// - native MSVC rejects re-exporting both boost.range (which exports the
// function boost::sort) and boost.sort (which opens namespace boost::sort)
// in the same module with error C2757.
// Direct `import mcpplibs.mwrap.boost.sort;` consumers are unaffected in
// both cases. docs/usage.md records these limits.
bool skip_sort = false;
const char* skip_sort_reason = nullptr;
#if defined(__GNUC__) && !defined(__clang__)
skip_sort = true;
skip_sort_reason = "under gcc (known BMI ICE when an aggregate re-exports it)";
#elif defined(_MSC_VER) && !defined(__clang__)
if (mcpp::has_feature("range")) {
skip_sort = true;
skip_sort_reason =
"under MSVC when boost.range is also active (error C2757: boost::sort function vs namespace)";
}
#endif
bool warned_sort = false;
for (auto const& m : modules) {
Expand All @@ -149,9 +160,10 @@ int main()
body += "export import mcpplibs.mwrap.boost." + m.suffix + ";\n";
}
if (warned_sort) {
mcpp::warning("build.mcpp: the root module leaves out mcpplibs.mwrap.boost.sort "
"under gcc (known BMI ICE when an aggregate re-exports it); "
"`import mcpplibs.mwrap.boost.sort;` directly instead.");
std::string msg =
std::string("build.mcpp: the root module leaves out mcpplibs.mwrap.boost.sort ") +
skip_sort_reason + "; `import mcpplibs.mwrap.boost.sort;` directly instead.";
mcpp::warning(msg.c_str());
}

const fs::path out = fs::path(mcpp::out_dir()) / "boost_closure.cppm";
Expand Down
10 changes: 10 additions & 0 deletions generated/exports/algorithm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ export namespace boost {
using boost::is_alnum;
using boost::is_alpha;
using boost::is_any_of;
#if !defined(BOOST_NO_CXX11)
// boost/algorithm/string/classification.hpp declares is_blank only under
// !defined(BOOST_NO_CXX11) (which Boost.Config defines on MSVC via
// BOOST_NO_COMPLETE_VALUE_INITIALIZATION -> BOOST_NO_CXX03 -> BOOST_NO_CXX11).
using boost::is_blank;
#endif
using boost::is_classified;
using boost::is_cntrl;
using boost::is_digit;
Expand Down Expand Up @@ -269,7 +274,12 @@ export namespace boost { namespace algorithm {
using boost::algorithm::is_alnum;
using boost::algorithm::is_alpha;
using boost::algorithm::is_any_of;
#if !defined(BOOST_NO_CXX11)
// boost/algorithm/string/classification.hpp declares is_blank only under
// !defined(BOOST_NO_CXX11) (which Boost.Config defines on MSVC via
// BOOST_NO_COMPLETE_VALUE_INITIALIZATION -> BOOST_NO_CXX03 -> BOOST_NO_CXX11).
using boost::algorithm::is_blank;
#endif
using boost::algorithm::is_clamped;
using boost::algorithm::is_classified;
using boost::algorithm::is_cntrl;
Expand Down
7 changes: 4 additions & 3 deletions generated/exports/bloom.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=bloom boost=1.92.0 target=x86_64-w64-mingw32 entities=45
// lib=bloom boost=1.92.0 target=x86_64-w64-mingw32 entities=46

export namespace boost { namespace bloom {
using boost::bloom::block;
Expand Down Expand Up @@ -37,9 +37,10 @@ export namespace boost { namespace bloom { namespace detail {
using boost::bloom::detail::is_unsigned_integral_or_extended_unsigned_integral;
using boost::bloom::detail::is_unsigned_or_extended_unsigned;
#if defined(BOOST_BLOOM_SSE2)
// M9 platform guard: m128ix2 is the SSE2 branch of fast_multiblock32
// (detail/sse2.hpp, __SSE2__); absent on arm64 (NEON branch).
// M9 platform guard: m128ix2 and mm_testc_si128 are the SSE2 branch of
// fast_multiblock32 (detail/sse2.hpp, __SSE2__); absent on arm64 (NEON branch).
using boost::bloom::detail::m128ix2;
using boost::bloom::detail::mm_testc_si128;
#endif
using boost::bloom::detail::move_assign_if;
using boost::bloom::detail::multiblock_fpr_base;
Expand Down
6 changes: 5 additions & 1 deletion generated/exports/charconv.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by tools/gen_exports.py - DO NOT EDIT
// lib=charconv boost=1.92.0 target=x86_64-w64-mingw32 entities=61
// lib=charconv boost=1.92.0 target=x86_64-w64-mingw32 entities=65

export namespace boost { namespace charconv {
using boost::charconv::chars_format;
Expand All @@ -19,6 +19,7 @@ export namespace boost { namespace charconv { namespace detail {
using boost::charconv::detail::brainfloat16;
using boost::charconv::detail::decompose32;
using boost::charconv::detail::digit_from_char;
using boost::charconv::detail::digit_table;
using boost::charconv::detail::div_impl;
using boost::charconv::detail::exp_digits;
using boost::charconv::detail::from_chars;
Expand All @@ -38,6 +39,7 @@ export namespace boost { namespace charconv { namespace detail {
using boost::charconv::detail::is_int128;
using boost::charconv::detail::is_signed;
using boost::charconv::detail::is_uint128;
using boost::charconv::detail::log_2_table;
using boost::charconv::detail::make_signed;
using boost::charconv::detail::make_unsigned;
using boost::charconv::detail::make_unsigned_t;
Expand All @@ -58,6 +60,7 @@ export namespace boost { namespace charconv { namespace detail {
using boost::charconv::detail::operator^;
using boost::charconv::detail::operator|;
using boost::charconv::detail::operator~;
using boost::charconv::detail::radix_table;
#if defined(BOOST_CHARCONV_HAS_INT128)
// M11 platform guard: to_chars128 exists only under BOOST_CHARCONV_HAS_INT128
// (to_chars_integer_impl.hpp).
Expand All @@ -67,6 +70,7 @@ export namespace boost { namespace charconv { namespace detail {
using boost::charconv::detail::to_chars_int;
using boost::charconv::detail::to_chars_integer_impl;
using boost::charconv::detail::trivial_uint128;
using boost::charconv::detail::uchar_values;
using boost::charconv::detail::uint128;
using boost::charconv::detail::umul128;
using boost::charconv::detail::umul128_upper64;
Expand Down
32 changes: 32 additions & 0 deletions generated/exports/concept_check.inc
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,16 @@ export namespace boost {
using boost::boolean_archetype;
using boost::comparable_archetype;
using boost::concept_check;
#if !defined(BOOST_MSVC)
// Under BOOST_MSVC, boost/concept/assert.hpp includes boost/concept/detail/msvc.hpp
// instead of general.hpp, which defines BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
// (sharing the include guard of boost/concept_check/general.hpp), so these
// general-branch symbols are not declared.
using boost::concept_check_;
using boost::concept_check_failed;
using boost::constraint_check;
using boost::constraint_check_failed;
#endif
using boost::convertible_from_archetype;
using boost::convertible_to_archetype;
using boost::copy_constructible_archetype;
Expand Down Expand Up @@ -204,26 +210,52 @@ export namespace boost {
}

export namespace boost { namespace concept_checking {
#if !defined(BOOST_MSVC)
// Under BOOST_MSVC, boost/concept/assert.hpp includes boost/concept/detail/msvc.hpp
// instead of general.hpp, which defines BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
// (sharing the include guard of boost/concept_check/general.hpp), so these
// general-branch symbols are not declared.
using boost::concept_checking::has_constraints;
using boost::concept_checking::has_constraints_;
using boost::concept_checking::instantiate;
using boost::concept_checking::no;
using boost::concept_checking::wrap_constraints;
using boost::concept_checking::yes;
#endif
}}

export namespace boost { namespace concepts {
#if !defined(BOOST_MSVC)
// Under BOOST_MSVC, boost/concept/assert.hpp includes boost/concept/detail/msvc.hpp
// instead of general.hpp, which defines BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
// (sharing the include guard of boost/concept_check/general.hpp), so these
// general-branch symbols are not declared.
using boost::concepts::constraint;
#endif
using boost::concepts::failed;
using boost::concepts::not_satisfied;
#if !defined(BOOST_MSVC)
// Under BOOST_MSVC, boost/concept/assert.hpp includes boost/concept/detail/msvc.hpp
// which declares check, require and require_ instead of requirement and requirement_.
using boost::concepts::requirement;
using boost::concepts::requirement_;
#else
using boost::concepts::check;
using boost::concepts::require;
using boost::concepts::require_;
#endif
using boost::concepts::usage_requirements;
}}

export namespace boost { namespace concepts { namespace detail {
using boost::concepts::detail::has_constraints_;
#if !defined(BOOST_MSVC)
// Under BOOST_MSVC, boost/concept/detail/msvc.hpp declares
// boost::concepts::detail::constraint instead of instantiate.
using boost::concepts::detail::instantiate;
#else
using boost::concepts::detail::constraint;
#endif
using boost::concepts::detail::no;
using boost::concepts::detail::wrap_constraints;
using boost::concepts::detail::yes;
Expand Down
5 changes: 5 additions & 0 deletions generated/exports/convert.inc
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,14 @@ export namespace boost { namespace parameter { namespace aux {
using boost::parameter::aux::parameter_requirements;
using boost::parameter::aux::result_of0;
using boost::parameter::aux::tag;
#if defined(BOOST_PARAMETER_CAN_USE_MP11) && !BOOST_WORKAROUND(BOOST_MSVC, >= 1910)
// boost/parameter/aux_/tag.hpp declares tag_if_lvalue_reference, tag_if_otherwise
// and tag_if_scalar only in its MP11 branch, which upstream disables on
// MSVC >= 1910 (falling back to the perfect-forwarding MPL branch).
using boost::parameter::aux::tag_if_lvalue_reference;
using boost::parameter::aux::tag_if_otherwise;
using boost::parameter::aux::tag_if_scalar;
#endif
using boost::parameter::aux::tagged_argument;
using boost::parameter::aux::tagged_argument_base;
using boost::parameter::aux::tagged_argument_list_of_1;
Expand Down
Loading
Loading