From 7b535ca2ac43cac9551b0ec4f09a7d061f04bac9 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 30 Sep 2026 09:51:27 +0200 Subject: [PATCH] Remove the no-op AppVeyor with_win_header job The with_win_header matrix entry patched Windows.h into single_include/nlohmann/json.hpp before building, but JSON_MultipleHeaders has defaulted to ON since #3532 (2022-06), so CMakeLists.txt points the tests at include/ and the patched single header is never compiled. The job has been a no-op VS2015 build since then. Windows.h coverage already exists through tests/src/unit-windows_h.cpp (#3631), which runs in every MSVC job. Delete the dead matrix entry and its before_build steps, and cite unit-windows_h.cpp from the QA page. Part of #5715 Signed-off-by: Niels Lohmann --- .github/external_ci/appveyor.yml | 11 ----------- docs/mkdocs/docs/community/quality_assurance.md | 3 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/external_ci/appveyor.yml b/.github/external_ci/appveyor.yml index 5c6b47a34..805195742 100644 --- a/.github/external_ci/appveyor.yml +++ b/.github/external_ci/appveyor.yml @@ -30,14 +30,6 @@ environment: CMAKE_OPTIONS: "" GENERATOR: Visual Studio 14 2015 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - configuration: Release - platform: x86 - name: with_win_header - CXX_FLAGS: "/W4 /WX" - CMAKE_OPTIONS: "" - GENERATOR: Visual Studio 14 2015 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 configuration: Release platform: x86 @@ -74,9 +66,6 @@ install: - if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32 before_build: - # for with_win_header build, inject the inclusion of Windows.h to the single-header library - - ps: if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" } - - ps: if ($env:name -Eq "with_win_header") { "#include `n" + (Get-Content $header_path | Out-String) | Set-Content $header_path } - cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%" build_script: diff --git a/docs/mkdocs/docs/community/quality_assurance.md b/docs/mkdocs/docs/community/quality_assurance.md index f2404c77b..794021979 100644 --- a/docs/mkdocs/docs/community/quality_assurance.md +++ b/docs/mkdocs/docs/community/quality_assurance.md @@ -132,7 +132,8 @@ Note: Some modern features (like C++20 ranges or filesystem support) may be disa [libstdc++](https://gcc.gnu.org/onlinedocs/libstdc++/) to detect subtle differences or incompatibilities. - [x] The code checked with [Include What You Use (IWYU)](https://include-what-you-use.org) that all required standard headers are included. -- [x] On Windows, the library is compiled with `` being included to detect and avoid common bugs. +- [x] On Windows, the library is compiled with `` being included to detect and avoid common bugs (see + [`unit-windows_h.cpp`](https://github.com/nlohmann/json/blob/develop/tests/src/unit-windows_h.cpp)). - [x] The library is compiled with exceptions disabled to support alternative means of error handling. ## Stable public API