Skip to content

Latest commit

 

History

History
306 lines (210 loc) · 10.6 KB

file-format-changelog.rst

File metadata and controls

306 lines (210 loc) · 10.6 KB

Package Description Format Specification History

:ref:`pkg-desc` need to specify the version of the specification they need to be interpreted in via the :pkg-field:`cabal-version` declaration. The following list describes changes that occurred in each version of the cabal specification relative to the respective preceding published version.

Note

The sequence of specification version numbers is not contiguous because it's synchronised with the version of the Cabal library. As a consequence, only even versions are considered proper published versions of the specification as odd versions of the Cabal library denote unreleased development branches which have no stability guarantee.

cabal-version: 3.14

  • Added field extra-files for specifying extra files to be included in sdist without adding any other semantics (cf. extra-source-files is tracked by cabal build).
  • License fields use identifiers from SPDX License List version 3.25 2024-08-19.

cabal-version: 3.12

  • License fields use identifiers from SPDX License List version 3.23 2024-02-08.

cabal-version: 3.8

  • Added field code-generators to :pkg-section:`test-suite` stanzas. This enumerates executabes (possibly brought into scope by :pkg-field:`build-tool-depends`) that are run after all other preprocessors. These executables are invoked with a target dir for output, a sequence of all source directories with source files of local lib components that the given test stanza depends on, and following a double dash, all options cabal would pass to ghc for a build. They are expected to output a newline-separated list of generated modules which have been written to the targetdir. This can be used for driving doctests and other discover-style tests generated from source code.
  • Added fields :pkg-field:`extra-libraries-static` and :pkg-field:`extra-lib-dirs-static` to allow Haskell libraries to remember linker flags needed for fully static linking of system libraries into executables. The existing field :pkg-field:`pkgconfig-depends` can used to append the relevant output of pkg-config --libs --static to these new fields automatically. When :pkg-field:`extra-libraries-static` is not given, it defaults to :pkg-field:`extra-libraries`. When :pkg-field:`extra-lib-dirs-static` is not given, it defaults to :pkg-field:`extra-lib-dirs`.
  • Wildcard matching has been slightly expanded. Matches are now allowed of the form foo/**/literalFile. Prior, double-star wildcards required the trailing filename itself be a wildcard.
  • Allow the omission of the type field in test-suite and benchmark stanzas when the type can be inferred by the presence of main-is or test-module.
  • License fields use identifiers from SPDX License List version 3.16 2022-02-06

cabal-version: 3.6

cabal-version: 3.4

  • License fields use identifiers from SPDX License List version 3.9 2020-05-15
  • Dependencies to sublibraries must be specified explicitly, even for current package. For example: build-depends: mypackage:my-sublib This way you can have a sublibrary with the same name as some external dependency.
  • Remove -any and -none syntax for version ranges Use >=0 and <0 respectively.
  • :pkg-field:`default-language` is optional. The Default value is to use the compiler's default language.
  • :pkg-field:`mixins` field allow specifying a sublibrary.

cabal-version: 3.0

cabal-version: 2.4

  • Wildcard matching has been expanded. All previous wildcard expressions are still valid; some will match strictly more files than before. Specifically:
    • Double-star (**) wildcards are now accepted for recursive matching immediately before the final slash; they must be followed by a filename wildcard (e.g., foo/**/*.html is valid; foo/**/bar/*.html and foo/**/**/*.html, foo/**/bar.html are all invalid). As ** was an error in globs before, this does not affect any existing .cabal files that previously worked. (Caveat: Double-star wildcards in :pkg-field:`data-files` directories, e.g. data-files: data/**/*.csv, are only supported correctly from Cabal 3.0.)
    • Wildcards now match when the pattern's extensions form a suffix of the candidate file's extension, rather than requiring strict equality (e.g., previously *.html did not match foo.en.html, but now it does).
  • License fields use identifiers from SPDX License List version 3.2 2018-07-10

cabal-version: 2.2

cabal-version: 2.0

cabal-version: 1.24

cabal-version: 1.22

cabal-version: 1.20

cabal-version: 1.18

cabal-version: 1.16

.. todo::

   this needs to be researched; there were only few changes between
   1.12 and 1.18;

cabal-version: 1.12