Skip to content

Additional examples in doc of tested-with (fix #4894) #7604

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
merged 3 commits into from
Sep 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 64 additions & 5 deletions doc/cabal-package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -629,19 +629,78 @@ describe the package as a whole:
and is rather intended as extra metadata for use by third party
tooling, such as e.g. CI tooling.

Here's a typical usage example
Here's a typical usage example:

::

tested-with: GHC == 8.6.3, GHC == 8.4.4, GHC == 8.2.2, GHC == 8.0.2,
tested-with: GHC == 9.0.1, GHC == 8.10.4, GHC == 8.8.4,
GHC == 8.6.5, GHC == 8.4.4, GHC == 8.2.2, GHC == 8.0.2,
GHC == 7.10.3, GHC == 7.8.4, GHC == 7.6.3, GHC == 7.4.2

which can (starting with Cabal 3.0) also be written using the more
concise set notation syntax
The same can be spread over several lines, for instance:

::

tested-with: GHC == { 8.6.3, 8.4.4, 8.2.2, 8.0.2, 7.10.3, 7.8.4, 7.6.3, 7.4.2 }
tested-with: GHC == 9.0.1
, GHC == 8.10.4
, GHC == 8.8.4
, GHC == 8.6.5
, GHC == 8.4.4
, GHC == 8.2.2
, GHC == 8.0.2
, GHC == 7.10.3
, GHC == 7.8.4
, GHC == 7.6.3
, GHC == 7.4.2

The separating comma can also be dropped altogether:

::

tested-with:
GHC == 9.0.1
GHC == 8.10.4
GHC == 8.8.4
GHC == 8.6.5
GHC == 8.4.4
GHC == 8.2.2
GHC == 8.0.2
GHC == 7.10.3
GHC == 7.8.4
GHC == 7.6.3
GHC == 7.4.2

However, this alternative might
`disappear <https://github.com/haskell/cabal/issues/4894#issuecomment-909008657>`__
in the future.

Starting with :pkg-field:`cabal-version` 3.0,
there are further conveniences.

1. A preceding ``,`` is allowed, so a bullet-list style
is possible (recommended):

::

tested-with:
, GHC == 9.0.1
, GHC == 8.10.4
, GHC == 8.8.4
, GHC == 8.6.5
, GHC == 8.4.4
, GHC == 8.2.2
, GHC == 8.0.2
, GHC == 7.10.3
, GHC == 7.8.4
, GHC == 7.6.3
, GHC == 7.4.2


2. A concise set notation syntax is available:

::

tested-with: GHC == { 9.0.1, 8.10.4, 8.8.4, 8.6.5, 8.4.4, 8.2.2, 8.0.2, 7.10.3, 7.8.4, 7.6.3, 7.4.2 }

.. pkg-field:: data-files: filename list

Expand Down