Skip to content

Commit 9225ddb

Browse files
committed
Explain main-is error for autogenerated file
1 parent a9bad34 commit 9225ddb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

doc/cabal-package-description-file.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3026,14 +3026,17 @@ appear twice for a component: once to flag them as being autogenerated in an
30263026
with a listing in :pkg-field:`other-modules` or
30273027
:pkg-field:`library:exposed-modules`.
30283028

3029-
.. warning::
3029+
.. note::
30303030

3031-
``cabal sdist`` will fail to generate a source distribution reporting that
3032-
module files are not found if autogenerated files are not listed in
3033-
:pkg-field:`autogen-modules` fields.
3031+
Listing modules in :pkg-field:`autogen-modules` exempts ``cabal sdist`` from
3032+
finding their source files. Creating a source distribution with ``cabal
3033+
sdist`` reports any source files not found and fails.
30343034

3035-
:pkg-field:`executable:main-is` modules are not supported on
3036-
:pkg-field:`autogen-modules`.
3035+
.. error::
3036+
3037+
An autogenerated module cannot also be the :pkg-field:`executable:main-is`
3038+
file. The ``cabal sdist`` command expects to find this file in the source
3039+
tree and autogenerated modules are generated outside the source tree.
30373040

30383041
.. pkg-field:: autogen-modules: module list
30393042
:since: 2.0

0 commit comments

Comments
 (0)