From 81c0fb5d6329c24a8ce97e6cbd943ca40335e898 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Thu, 12 Jan 2023 07:50:01 +0100 Subject: [PATCH] Re #6125: document that glob-dirs are buggy in Cabal 2.4 `cabal-version: 2.4` allows e.g. `data-files: foo/**/*.txt` but `**` directories are only handled correctly since Cabal 3.0 (issue #6125). This information should be part of the cabal file format history documentation. --- doc/cabal-package.rst | 3 ++- doc/file-format-changelog.rst | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/cabal-package.rst b/doc/cabal-package.rst index a5af5ad3416..c25290419bc 100644 --- a/doc/cabal-package.rst +++ b/doc/cabal-package.rst @@ -763,7 +763,8 @@ describe the package as a whole: behaviour, put the files that wildcards will match against in their own folder. - ``**`` wildcards are available starting in Cabal 2.4. + ``**`` wildcards are available starting in Cabal 2.4 + and `bug-free since Cabal 3.0 `_. .. pkg-field:: data-dir: directory diff --git a/doc/file-format-changelog.rst b/doc/file-format-changelog.rst index 300bdb21d3c..4aba3ce6dcd 100644 --- a/doc/file-format-changelog.rst +++ b/doc/file-format-changelog.rst @@ -161,6 +161,10 @@ relative to the respective preceding *published* version. ``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