My stack project fails to build because it can't find the module PackageInfo_XXX. stack build gives a warning message:
Error: [Cabal-5559]
[autogen-guard] To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher.
Looks like the problem is that hpack sets cabal-version: 2.0 even though the cabal-field autogen-modules is generated. Here's a simple hpack example:
---
spec-version: 0.36.0
name: myproj
version: 0.0
language: GHC2024
dependencies:
- base
- relude
default-extensions:
- NoImplicitPrelude
- OverloadedStrings
executables:
myproj:
main: Main.hs
generated-other-modules:
- Paths_myproj
- PackageInfo_myproj
My stack project fails to build because it can't find the module PackageInfo_XXX.
stack buildgives a warning message:Looks like the problem is that hpack sets
cabal-version: 2.0even though the cabal-fieldautogen-modulesis generated. Here's a simple hpack example: