Skip to content

Commit 5f10ce4

Browse files
committed
Added link between freeze --lock and --reject-unconstrained-dependencies
1 parent e6ac5aa commit 5f10ce4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelog.d/pr-10785.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ issues: 10784
66
---
77

88
Added a `--lock` flag to `cabal freeze`, to promote a freeze file to a lock file. By calling `cabal freeze --lock`, the resulting freeze file will ensure that only dependencies whose constraints are specified, will be accepted by future build plans. This flag can be used to ensure that no unaudited packages are added to the build plan.
9+
10+
This new `--lock` flag reuses the mechanism behind `--reject-unconstrained-dependencies`, by writing the equivalent of `--reject-unconstrained-dependencies=all` to the freeze file.

doc/cabal-commands.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ a freeze file is not, by default, a **lockfile**. To turn a freeze file into a l
538538
use the ``--lock`` flag when invocating ``cabal freeze``. This will prevent future
539539
builds from including new dependencies. This can be helpful in situations where
540540
every dependency must be explicitly audited and approved, for example.
541+
Under the hood, the ``--lock`` flag reuses the mechanism behind
542+
``--reject-unconstrained-dependencies``, by writing the equivalent of
543+
``--reject-unconstrained-dependencies=all`` to the freeze file.
541544

542545
cabal gen-bounds
543546
^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)