Skip to content

Autogenerated module PackageInfo_* requires cabal version 3.12 #618

@karamellpelle

Description

@karamellpelle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions