Subsections in custom-setup
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
By reading http://cabal.readthedocs.io/en/latest/developing-packages.html#custom-setup-scripts it's not clear whether subsections e.g. `if os(windows)` are supported. IIRC they aren't, but IMHO it's good idea to explicitly mention this (and the reasoning behind).
Also: if such section is added, cabal crashes:
```hs
'parseField' called on a non-field. This is possibly a bug in Cabal.
Please report it to the developers:
https://github.com/haskell/cabal/issues/new
CallStack (from HasCallStack):
error, called at ./Distribution/PackageDescription/Utils.hs:21:16 in
```
(I'm not sure what parsec variant does).
Contributor guide
Research direction
Start with the custom-setup section in developing-packages.html and reproduce the shown if os(windows) example. Read Distribution/PackageDescription/Utils.hs around line 21 to understand the parseField failure; done means the supported subsection behavior and its reasoning are explicit and the reported input no longer causes the Cabal crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100