Provide a way to let `cabal freeze` freeze dependencies, only
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
I'm not sure whether there's a bug, but the behaviour I see is, e.g.:
- create `x.cabal` with a flag definition:
```
flag debug
description: Enable debug support
default: False
```
- run `cabal freeze`; `cabal.project.freeze` now includes `x -debug`
- in `cabal.project.local`, set `flags: +debug`
Now `cabal build` fails:
```
[__1] rejecting: x:-debug (constraint from config file, command line flag, or
user target requires opposite flag selection)
[__1] rejecting: x:+debug (constraint from project config
/private/tmp/x/cabal.project.freeze requires opposite flag selection)
```
I can work around this by following up `cabal freeze` with removing the flag constraint on `x`, but that's painful. Some thoughts:
- should `cabal freeze` constrain local packages at all?
- `cabal freeze` help lists the flag `--dependencies-only`, which doesn't seem to do anything; maybe it could be made to not set local package flags?
Tested with cabal-install 3.6.2.0 on macOS.
Contributor guide
Assessment
This issue has not been assessed yet.