haskell / haskell/cabal

Please document how conflicting configuration options resolve in cabal.project

Open
#9,091 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

In [the docs](https://cabal.readthedocs.io/en/stable/cabal-project.html#package-configuration-options) we have:

> - They can be specified at the top-level, in which case they apply only to local package, or
> - They can be specified inside a package stanza, in which case they apply to the build of the package, whether or not it is local or external.
> - They can be specified inside an package * stanza, in which case they apply to all packages, local ones from the project and also external dependencies.

but I don't see mention of how conflicts are resolved, e.g.

```
package foo
coverage: true

coverage: false
```

or...

```
coverage: false

package foo
coverage: true
```

...as well as how `import` comes into play (presumably treated like the files are concatenated). With the introduction of `import` knowing how to override particular earlier options becomes important and an obvious use-case.

Documentation will help users as well as help avoid what would be a disaster if cabal changed behavior.

Contributor guide

Open the contributing guide

Research direction

Start with the cabal.project documentation section on package configuration options and compare its stated scopes with the conflicting `coverage` examples in the issue. Check the documented behavior of `import` and determine how later or more specific settings resolve conflicts. Done means the documentation clearly explains precedence, ordering, and import interactions.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.