`cabal build --enable-build-info` doesn't contain options specified via `cabal.project` files
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
The `build-info.json` file generated by `cabal build --enable-build-info` does not include ghc-options specified via `cabal.project`
**To Reproduce**
Steps to reproduce the behavior:
```
$ mkdir cabal-bi-bug && cd cabal-bi-bug
$ cabal init -n --lib
$ echo -e "packages: ./\npackage cabal-bi-bug\n ghc-options: -haddock\n" > cabal.project
$ cabal build --enable-build-info
$ cat dist-newstyle/build/**/build-info.json | jq | grep haddock
```
**Expected behavior**
`compiler-args` field should contain `-haddock`
**System information**
- Operating system
- `cabal 3.10.3.0`
Contributor guide
Research direction
Reproduce the issue with the provided cabal init, cabal.project, and cabal build --enable-build-info commands, then inspect the generated dist-newstyle/build/**/build-info.json. Trace how the cabal.project ghc-options value should reach the compiler-args field. Done means the generated JSON includes -haddock when that option is specified in cabal.project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100