Skip to content

Include cabal-version field into cabal files generated with hpack #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

zhenyavinogradov
Copy link
Contributor

When you run hpack from the command line, it puts cabal-version into generated cabal file, in addition to the result of renderPackage function. This field defines which features the cabal file may use, and may also affect parsing. For example, parsing of the license field depends on cabal-version: haskell/cabal#5050, so without it cabal will fail to parse generated file for a package.yaml like this:

name: example
version: 1
license: LicenseRef-Custom
library:
  dependencies:
    - base

This PR makes sure this field is included when hpack is used

hpack includes this field itself when it's called from the command line.
Without this field cabal may fail to parse generated cabal files
@angerman angerman merged commit b1286d6 into input-output-hk:master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants