Pick the WinIO test option in the cabal file, not in configure - #628
Open
kazu-yamamoto wants to merge 1 commit into
Open
kazu-yamamoto wants to merge 1 commit into
kazu-yamamoto wants to merge 1 commit into
Conversation
configure.ac probed for __IO_MANAGER_WINIO__ >= 2 and, when it found it,
appended a test-suite stanza to network.buildinfo. Neither half worked.
The probe sat behind `case "$host_os" in mingw*)`, but cabal runs
configure under an MSYS shell on Windows, where config.guess resolves the
host to *-pc-msys. The case never matched, so even on Windows config.log
said
checking whether to use native Windows I/O manager RTS option... no, not Windows
and the option was never added. The test suite has therefore always run
under MIO, in CI as much as locally.
Fixing the host test only exposed the second half. A .buildinfo carries
a HookedBuildInfo, which Cabal accepts for the library and for named
executables but not for a test-suite, so once the probe started
succeeding every Windows build failed with
network.buildinfo:3:1: invalid subsection "test-suite"
Drop the machinery and say it in the cabal file, where the test-suite can
be addressed directly. The compiler versions are spelled out rather than
probed: the overlapped I/O exception fix landed on the 9.12 and 9.14
branches in April 2026, after 9.12.4 and 9.14.1 had been released. The
lower bounds are exclusive so that release candidates and snapshots of
those branches are covered as well.
--with-compiler is still accepted, unused, so that cabal passing it does
not draw an unrecognized-option warning.
Verified on Windows 11 with 9.12.4.20260713: the option now reaches the
link line, is embedded in the test binary, and the suite passes five runs
out of five with WinIO as the default.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
-with-rtsopts=--io-manager=nativethat #613 added for the test suite hasnever been applied, on any platform. There are two separate bugs, one behind the
other.
1. The probe never ran
configure.acguards it with:but cabal runs
configureunder an MSYS shell on Windows, whereuname -sreports
MSYS_NT-10.0-26200andconfig.guessresolves the host tox86_64-pc-msys. From aconfig.logof a Windows build on master:So the option was never added, and the test suite has always run under MIO,
in CI as much as locally.
2. The mechanism cannot work either
Widening the host test just exposes the next problem.
configureappendsto
network.buildinfo, but a.buildinfocarries aHookedBuildInfo, whichCabal accepts for the library and for named executables — not for a test-suite.
With the probe succeeding, every Windows build fails:
The fix
Drop the machinery and say it in the cabal file, where the test-suite can be
addressed directly:
The compiler versions are spelled out rather than probed. The overlapped I/O
exception fix — the one that bumps
__IO_MANAGER_WINIO__to 2 — landed on theghc-9.12andghc-9.14branches in April 2026, after 9.12.4 and 9.14.1 hadbeen released. The lower bounds are exclusive so that release candidates and
snapshots of those branches, such as
9.12.4.20260713, are covered as well.--with-compileris still accepted, now unused, so that cabal passing it doesnot draw an unrecognized-option warning.
Testing
-with-rtsopts=--io-manager=nativenow reaches the link line (cabal -v2)and the string is embedded in the built
spec.exe;network.buildinfois back to its single valid line;Trade-off
Spelled-out version bounds need maintaining: a later backport, to 9.10 say,
would have to be added by hand. The probe would have tracked that automatically,
but it had no way to deliver its answer to the test-suite, which is what broke.
Refs #602, #613.
🤖 Generated with Claude Code