Skip to content

Prepare Cabal for new Windows I/O manager in GHC 8.12 #6847

Closed
@Mistuke

Description

@Mistuke

Describe the bug

GHC 8.12 will have a new asynchronous I/O manager for Windows. This new I/O manager will require changes to any library that uses GHC internal I/O modules such as GHC.IO.FD.

When the new I/O manager is enabled any use of FD will lead to an error. So there are two options, avoid the use of GHC internals and stick to end user interfaces (i.e. only use Handle).

Or detect the new I/O manager support with the macro __IO_MANAGER_WINIO__ and provide a codepath for versions of functions that use HANDLE instead of FD.

GHC provides some helper utilities to switch between the two. Namely the helper operator <!>.

Cabal seems to only use FD in Cabal/Distribution/Compat/CreatePipe.hs, so is this module still needed?

If it is, anonymous pipes can't be used and instead named pipes opened with OVERLAPPED support with proper security descriptors should be used.

System information

  • Windows
  • GHC 8.12

Additional context

Also the minimum supported versions of binaries compiled with GHC 8.12 will be moved up to Vista SP1. For while the user will be able to switch between the two managers at startup.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions