You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autogenerated module PackageInfo_* requires cabal version 3.12 #618
Error: [S-242]
Unable to parse Cabal file from package /home/karamellpelle/Source/hsam/hsam.cabal:
* 0:0: Unsupported cabal-version 3.12. See https://github.com/haskell/cabal/issues/4899.
The Cabal file uses the Cabal specification version 3.12, but we only support up to version 3.8. Recommended action: upgrade your build tool (e.g. stack upgrade)
With newly upgraded stack gives stack --version:
Version 3.3.1, Git revision 62d1bdf099c8c30634208f76cb4444f9896e4336 x86_64 hpack-0.37.0`
I guess this should be an issue for commercialhaskell/stack now?
@karamellpelle, Stack 3.3.1 was built against Cabal-3.10.3.0, which ships with GHC 9.8.4. That library can't parse versions of the Cabal file specification after 3.8.
Stack 3.7.1 was built against Cabal-3.12.1.0, which ships with GHC 9.10.2. That library can't parse versions of the Cabal file specification after 3.12.
Upgrading Stack to Stack 3.7.1 should solve your problem.
Thanks for your responses! Here's my current 1 stack version: Version 3.7.1, Git revision cfae313a06ea9f7278e0ac55a58341fa0440f1aa x86_64 hpack-0.38.1
I may have done something wrong, but I'm pretty sure my stack template worked without errors before:
stack new myproj karamellpelle/relude-app
Now the stack build says To use the autogenerated module PackageInfo_* you need to specify cabal-version: 3.12 or higher. . And when I manually add verbatim: cabal-version: 3.12 to package.yaml, it says
Error: [S-242]
Unable to parse Cabal file from package /home/karamellpelle/Tmp/myproj/myproj.cabal:
* 0:0: Unsupported cabal-version 3.12. See https://github.com/haskell/cabal/issues/4899.
The Cabal file uses the Cabal specification version 3.12, but we only support up to version 3.8. Recommended action: upgrade your build tool (e.g. stack upgrade).
Footnotes
Not sure why it says version 3.3.1 above, maybe I pasted wrong, I did a stack upgrade. ↩
@karamellpelle, sorry - my mistake! Stack 3.7.1 is built against Cabal-3.10.3.0. It is the master branch version of Stack that is built against GHC 9.10.2.
If you can't wait until September 2025, and you are not using GHCup to manage versions of Stack, then command stack upgrade --git to get the master branch version. Stack will build it from source, but that only takes a few minutes.
@karamellpelle, sorry - my mistake! Stack 3.7.1 is built against Cabal-3.10.3.0. It is the master branch version of Stack that is built against GHC 9.10.2.
If you can't wait until September 2025, and you are not using GHCup to manage versions of Stack, then command stack upgrade --git to get the master branch version. Stack will build it from source, but that only takes a few minutes.
Hi, so there is still no new stack release, so I am just asking, where you got the date "September 2025" from? 😄
@Totto16, September 2025 was, originally, the planned date for the release of GHC 9.14.1. It has not yet been released, but the last release candidate has been made available:
Activity
sol commentedon Aug 19, 2025
As a workaround add
to your package description.
karamellpelle commentedon Aug 19, 2025
This gives me
With newly upgraded stack gives
stack --version:I guess this should be an issue for commercialhaskell/stack now?
mpilgrem commentedon Aug 19, 2025
@karamellpelle, I've noted the S-242 error. Let me look into it.
mpilgrem commentedon Aug 19, 2025
@karamellpelle, Stack 3.3.1 was built against
Cabal-3.10.3.0, which ships with GHC 9.8.4. That library can't parse versions of the Cabal file specification after 3.8.Stack 3.7.1 was built against
Cabal-3.12.1.0, which ships with GHC 9.10.2. That library can't parse versions of the Cabal file specification after 3.12.Upgrading Stack to Stack 3.7.1 should solve your problem.
mpilgrem commentedon Aug 19, 2025
As an aside,
autogen-moduleswas introduced in Cabal file specification 2.0:Consequently, I do not immediately follow that Cabal error Cabal-5559. I wonder if it is a Cabal bug.
EDIT: After some help in Cabal's Matrix room:
PackageInfo_*modules andcabal-version: 3.12haskell/cabal#11171karamellpelle commentedon Aug 19, 2025
Thanks for your responses! Here's my current 1 stack version:
Version 3.7.1, Git revision cfae313a06ea9f7278e0ac55a58341fa0440f1aa x86_64 hpack-0.38.1I may have done something wrong, but I'm pretty sure my stack template worked without errors before:
Now the stack build says To use the autogenerated module PackageInfo_* you need to specify
cabal-version: 3.12or higher. . And when I manually addverbatim: cabal-version: 3.12to package.yaml, it saysFootnotes
Not sure why it says version 3.3.1 above, maybe I pasted wrong, I did a stack upgrade. ↩
mpilgrem commentedon Aug 19, 2025
@karamellpelle, sorry - my mistake! Stack 3.7.1 is built against
Cabal-3.10.3.0. It is themasterbranch version of Stack that is built against GHC 9.10.2.If you can't wait until September 2025, and you are not using GHCup to manage versions of Stack, then command
stack upgrade --gitto get themasterbranch version. Stack will build it from source, but that only takes a few minutes.Fix #618 Infer cabal-version: 3.12 needed from PackageInfo_* modules
Fix #618 Infer cabal-version: 3.12 needed from PackageInfo_* modules
Fix #618 Infer cabal-version: 3.12 when PackageInfo_* is used
Fix #618 Infer cabal-version: 3.12 when PackageInfo_* is used
Totto16 commentedon Nov 5, 2025
Hi, so there is still no new stack release, so I am just asking, where you got the date "September 2025" from? 😄
mpilgrem commentedon Nov 5, 2025
@Totto16, September 2025 was, originally, the planned date for the release of GHC 9.14.1. It has not yet been released, but the last release candidate has been made available:
I'm planning to release the next version of Stack soon after GHC 9.14.1 is available.
Fix sol#618 Infer cabal-version: 3.12 when PackageInfo_* is used