commercialhaskell / commercialhaskell/stack

Stack fails with `Cabal-3.11.0.0` (GHC >= 9.10)

Open
#6,540 6 comments 1 reaction 1 assignee Claimed by @mpilgrem View on GitHub
component: setup type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

GHC 9.10.0.20240328 is available (Alpha 2, first alpha for Windows). However `stack build` with:
~~~yaml
snapshot: nightly-2024-03-30
compiler: ghc-9.10.0.20240328 # Override the compiler version in the snapshot

# Not needed once Stack has setup GHC 9.10.0.20240328:
setup-info:
ghc:
windows64:
9.10.0.20240328:
url: https://downloads.haskell.org/ghc/9.10.1-alpha2/ghc-9.10.0.20240328-x86_64-unknown-mingw32.tar.xz
# Can be extended with SHA protections etc: see https://docs.haskellstack.org/en/stable/yaml_configuration/#setup-info
~~~

fails with (extract, reformatted for clarity):
~~~text
Warning: Stack has not been tested with GHC versions 9.10 and above, and using 9.10.0.20240328,
this may fail.
Warning: Stack has not been tested with Cabal versions 3.12 and above, but version 3.11.0.0 was
found, this may fail.
...
[2 of 3] Compiling StackSetupShim ( C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs, C:\sr\setup-exe-src\setup-shim-9p6GVs8J.o )

C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs:38:28: error: [GHC-88464]
Variable not in scope:
initialBuildSteps
:: FilePath
-> PackageDescription
-> LocalBuildInfo
-> Distribution.Verbosity.Verbosity
-> IO ()
|
38 | | null rest -> initialBuildSteps distPref pkg_descr lbi verbosity
| ^^^^^^^^^^^^^^^^^

Error: [S-6374]
While building simple Setup.hs (scroll up to its section to see the error) using:
...\x86_64-windows\ghc-9.10.0.20240328\bin\ghc-9.10.0.20240328.exe
-rtsopts
-threaded
-clear-package-db
-global-package-db
-hide-all-packages
-package base
-main-is StackSetupShim.mainOverride
-package Cabal-3.11.0.0
C:\sr\setup-exe-src\setup-9p6GVs8J.hs
C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs
-o C:\sr\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_9p6GVs8J_3.11.0.0_ghc-9.10.0.20240328.exe
Process exited with code: ExitFailure 1
~~~

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.