Fix a Sphinx warning. [ci skip]
[cabal.git] / Cabal / doc / file-format-changelog.rst
blobe53b2be492351ab8dce8c988ea4b1e2ff32a3693
1 Cabal file format changelog
2 ===========================
4 Changes in 2.4
5 --------------
7 * Wildcard matching has been expanded. All previous wildcard
8   expressions are still valid; some will match strictly more files
9   than before. Specifically:
11   * Double-star (``**``) wildcards are now accepted for recursive
12     matching immediately before the final slash; they must be followed
13     by a filename wildcard (e.g., ``foo/**/*.html`` is valid;
14     ``foo/**/bar/*.html`` and ``foo/**/**/*.html``,
15     ``foo/**/bar.html`` are all invalid). As ``**`` was an error in
16     globs before, this does not affect any existing ``.cabal`` files
17     that previously worked.
19   * Wildcards now match when the pattern's extensions form a suffix of
20     the candidate file's extension, rather than requiring strict
21     equality (e.g., previously ``*.html`` did not match
22     ``foo.en.html``, but now it does).
24 * License fields use identifiers from SPDX License List version
25   ``3.2 2018-07-10``
28 ``cabal-version: 2.2``
29 ----------------------
31 * New :pkg-section:`common` stanzas and :pkg-field:`import`
32   pseudo-field added.
34 * New :pkg-field:`library:virtual-modules` field added.
36 * New :pkg-field:`cxx-sources` and :pkg-field:`cxx-options` fields
37   added for suppporting bundled foreign routines implemented in C++.
39 * New :pkg-field:`asm-sources` and :pkg-field:`asm-options` fields
40   added for suppporting bundled foreign routines implemented in
41   assembler.
43 * New :pkg-field:`extra-bundled-libraries` field for specifying
44   additional custom library objects to be installed.
46 * Extended ``if`` control structure with support for ``elif`` keyword.
48 * Changed default rules of :pkg-field:`build-type` field to infer
49   "build-type:" for "Simple"/"Custom" automatically.
51 * :pkg-field:`license` field syntax changed to require SPDX
52   expression syntax (using SPDX license list version ``3.0 2017-12-28``).
54 * Allow redundant leading or trailing commas in package fields (which
55   require commas) such as :pkg-field:`build-depends`.
58 ``cabal-version: 2.0``
59 ----------------------
61 * New :pkg-field:`library:signatures` and :pkg-field:`mixins` fields
62   added for supporting Backpack_.
64 * New :pkg-field:`build-tool-depends` field added for adding
65   build-time dependencies of executable components.
67 * New :pkg-field:`custom-setup:autogen-modules` field added for declaring modules
68   which are generated at build time.
70 * Support for new PVP_ caret-style version operator (``^>=``) added to
71   :pkg-field:`build-depends`.
73 * Add support for new :pkg-section:`foreign-library` stanza.
75 * Add support for :ref:`internal library stanzas <sublibs>`.
77 * New CPP Macro ``CURRENT_PACKAGE_VERSION``.
79 ``cabal-version: 1.24``
80 ----------------------
82 * New :pkg-section:`custom-setup` stanza and
83   :pkg-field:`custom-setup:setup-depends` field added for specifying dependencies
84   of custom ``Setup.hs`` scripts.
86 * CPP Macros ``VERSION_$pkgname`` and ``MIN_VERSION_$pkgname`` are now
87   also generated for the current package.
89 * New CPP Macros ``CURRENT_COMPONENT_ID`` and ``CURRENT_PACKAGE_KEY``.
91 * New :pkg-field:`extra-framework-dirs` field added for specifying
92   extra locations to find OS X frameworks.
94 ``cabal-version: 1.22``
95 ----------------------
97 * New :pkg-field:`library:reexported-modules` field.
99 * Support for ``-none`` version constraint added to
100   :pkg-field:`build-depends`.
102 * New :pkg-field:`license` type ``ISC`` added.
104 ``cabal-version: 1.20``
105 ----------------------
107 * Add support for new :pkg-field:`license-files` field for declaring
108   multiple license documents.
110 * New CPP Macro ``MIN_TOOL_VERSION_$buildtool``.
112 * New :pkg-field:`license` types ``BSD2`` and ``MPL-2.0`` added.
114 ``cabal-version: 1.18``
115 ----------------------
117 * Add support for new :pkg-field:`extra-doc-files` field for
118   specifying extra file assets referenced by the Haddock
119   documentation.
121 * New :pkg-field:`license` type ``AGPL`` and ``AGPL-3`` added.
123 * Add support for specifying a C/C++/obj-C source file in
124   :pkg-field:`executable:main-is` field.
126 * Add ``getSysconfDir`` operation to ``Paths_`` API.
128 ``cabal-version: 1.16``
129 ----------------------
131 .. todo::
133    this needs to be researched; there were only few changes between
134    1.12 and 1.18;
136 ``cabal-version: 1.12``
137 ----------------------
139 * Change syntax of :pkg-field:`cabal-version` to support the new recommended
140   ``cabal-version: x.y`` style
144 .. include:: references.inc