haskell / haskell/cabal

Allow running setup hooks with multithreading disabled

Open
#9,563 4 comments 0 reactions 0 assignees View on GitHub
attention: pr-welcome type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

As of Cabal v3.10, when building a package that specifies custom setup hooks, i.e. `Setup.hs`, Cabal will append `-threaded` to the list of extra options, as seen in:

https://github.com/haskell/cabal/blob/d09cd576d7dd6ee947b255b2469eefab40ddb72b/cabal-install/src/Distribution/Client/SetupWrapper.hs#L808-L811

GHCJS is an exception, it opts for `-build-runner` and does not specify `-threaded`. Unfortunately, if the backend is WebAssembly, passing `-threaded` will result in failure due to WebAssembly's lack of support for threading. As of now, [the WebAssembly backend is in tech preview](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/wasm.html), I suggest adding an option to explicitly disable threading, or making it a special case for WASM as in the JS backend.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.