Skip to content

cabal version from cabal --version not accepted in field cabal-version #7154

Closed

Description

@typetetris

I expected to be able to put the version number from cabal --version cropped accordingly into the field cabal-version.

$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library

and

cabal-version: 3.2

lead to

Errors encountered when parsing cabal file backend/backend.cabal:

backend/backend.cabal:0:0: error:
Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.

It seems like only the version numbers in Package Description Format Specification History can be used in field cabal-version.

I would suggest to either note that in the documentation of cabal-version or accept any cabal version number and make cabal know, which version number lower or equal had the last format
change (or whatever else there is to know).

Activity

  1. phadej commented on Nov 7, 2020

    @phadej
    Collaborator

    The is no cabal-version: 3.2, see available versions: https://cabal.readthedocs.io/en/3.4/file-format-changelog.html

    The confusion steps from cabal having at least three-four meanings https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07

    • Cabal the library
    • cabal the executable (cabal-install)
    • CABAL the spec
    • .cabal the package description file

    The cabal-version in .cabal files indicates the version of the format of the file, which is CABAL the spec version, though latter haven't been update as a standalone document for ages.

  2. typetetris commented on Nov 7, 2020

    @typetetris
    Author

    Yes it is really confusing that the term cabal is overloaded with four meanings.

    I read

    https://cabal.readthedocs.io/en/3.4/cabal-package.html?highlight=cabal-version#pkg-field-cabal-version
    

    and

    https://cabal.readthedocs.io/en/3.4/file-format-changelog.html
    

    and didn't got that.

    I guess I am not unique in that.

    So maybe add a sentence to the first paragraph in https://cabal.readthedocs.io/en/3.4/cabal-package.html?highlight=cabal-version#pkg-field-cabal-version like

    That means you can only choose on of the version listed in [Package Description Format Specification History](https://cabal.readthedocs.io/en/3.4/file-format-changelog.html#package-description-format-specification-history) for this field.
    

    would probably a good idea to help reduce the confusion.

    Sorry to bother you, just trying to help.

  3. typetetris commented on Nov 7, 2020

    @typetetris
    Author

    Also a link to this CABAL the spec would help. The overloaded meaning of the term cabal makes it really hard to google for that stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions