You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2026/09/20 09:55:00 UTC

[jira] [Created] (THRIFT-6310) Build the Thrift compiler on Windows in CI

Jens Geyer created THRIFT-6310:
----------------------------------

             Summary: Build the Thrift compiler on Windows in CI
                 Key: THRIFT-6310
                 URL: https://issues.apache.org/jira/browse/THRIFT-6310
             Project: Thrift
          Issue Type: Improvement
          Components: Build Process
            Reporter: Jens Geyer
             Fix For: 0.26.0


h2. Situation

The compiler is built in CI on Linux ({{.github/workflows/build.yml}} via autotools, {{.github/workflows/cmake.yml}} via CMake) and on macOS ({{build.yml}}). There is no Windows compiler build: the {{compiler}} job in {{build.yml}} still carries a {{# TODO windows and macos}} marker, and only the macOS half of it was ever done.

The one Windows job that exists, {{.github/workflows/msvc.yml}}, builds the full library stack inside a large Windows container. It is slow, it is not a compiler-focused build, and it does not use the flags a release build uses.

That leaves the *portable* Windows compiler - the {{thrift.exe}} shipped with every release - without any CI coverage at all. {{doc/ReleaseManagement.md}} asks the release manager to build it by hand and then verify by hand, with Dependency Walker, that it imports nothing but {{KERNEL32.dll}}. A regression in that property is currently only discoverable during a release.

h2. Proposal

Add a {{compiler-windows}} job to {{cmake.yml}}, next to the existing Linux {{compiler}} job:

* runs natively on a GitHub-hosted Windows runner, no container;
* installs {{winflexbison3}} through the preinstalled Chocolatey, since flex and bison are not on the image;
* configures with {{-DBUILD_LIBRARIES=OFF -DWITH_MT=ON}} and builds the Release configuration, which is exactly how the released compiler is built;
* runs {{ctest}}, so the compiler unit tests run on Windows too;
* asserts that the produced {{thrift.exe}} imports nothing but {{KERNEL32.dll}};
* uploads {{thrift.exe}} as a build artifact.

The import-table assertion is moved into a small script under {{build/windows/}} so that a release manager can run the same check locally instead of reaching for Dependency Walker.

h2. Why not build.yml

{{build.yml}} is the autotools path ({{bootstrap.sh}}, {{configure}}, {{make}}). That toolchain is not available natively on Windows, so the Windows compiler build belongs in the CMake workflow. The {{# TODO windows}} marker in {{build.yml}} is updated to say so.

_Drafted with AI assistance (Claude Opus 5); reviewed and posted by Jens Geyer._




--
This message was sent by Atlassian Jira
(v8.20.10#820010)