Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
2e8d7286
Commit
2e8d7286
authored
11 months ago
by
Mike Pilgrem
Browse files
Options
Downloads
Patches
Plain Diff
Fix #8141 Don't refer to 'custom-setup' as 'optional'
Also uses 'stanza' consistently in that context.
parent
282ba97d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/cabal-package-description-file.rst
+8
-5
8 additions, 5 deletions
doc/cabal-package-description-file.rst
with
8 additions
and
5 deletions
doc/cabal-package-description-file.rst
+
8
−
5
View file @
2e8d7286
...
...
@@ -2804,8 +2804,10 @@ Declaring a ``custom-setup`` stanza also enables the generation of
:synopsis: Custom Setup.hs build information.
:since: 1.24
The optional :pkg-section:`custom-setup` stanza contains information needed
for the compilation of custom ``Setup.hs`` scripts,
A :pkg-section:`custom-setup` stanza is required for
:pkg-field:`build-type` ``Custom`` and will be ignored (with a warning) for
other build types. The stanza contains information needed for the compilation
of custom ``Setup.hs`` scripts. For example:
::
...
...
@@ -2838,7 +2840,7 @@ Backward compatibility and ``custom-setup``
Versions prior to Cabal 1.24 don't recognise ``custom-setup`` stanzas,
and will behave agnostic to them (except for warning about an unknown
section). Consequently, versions prior to Cabal 1.24 can't ensure the
'
section
'
). Consequently, versions prior to Cabal 1.24 can't ensure the
declared dependencies ``setup-depends`` are in scope, and instead
whatever is registered in the current package database environment
will become eligible (and resolved by the compiler) for the
...
...
@@ -2848,8 +2850,9 @@ The availability of the
``MIN_VERSION_package_(A,B,C)`` CPP macros
inside ``Setup.hs`` scripts depends on the condition that either
- a ``custom-setup`` section has been declared (or ``cabal build`` is being
used which injects an implicit hard-coded ``custom-setup`` stanza if it's missing), or
- a ``custom-setup`` stanza has been declared (or ``cabal build`` is being used
which injects an implicit hard-coded ``custom-setup`` stanza if it's missing),
or
- GHC 8.0 or later is used (which natively injects package version CPP macros)
Consequently, if you need to write backward compatible ``Setup.hs``
...
...
This diff is collapsed.
Click to expand it.
Ben Gamari
@bgamari
mentioned in commit
fc9de616
·
9 months ago
mentioned in commit
fc9de616
mentioned in commit fc9de616d5eef39521cb789f1d9f54aa08ed7b33
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment