Skip to content

Commit

Permalink
Added link between freeze --lock and `--reject-unconstrained-depend…
Browse files Browse the repository at this point in the history
…encies`
  • Loading branch information
LaurentRDC committed Feb 9, 2025
1 parent e6ac5aa commit 5f10ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelog.d/pr-10785.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ issues: 10784
---

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.

This new `--lock` flag reuses the mechanism behind `--reject-unconstrained-dependencies`, by writing the equivalent of `--reject-unconstrained-dependencies=all` to the freeze file.
3 changes: 3 additions & 0 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ a freeze file is not, by default, a **lockfile**. To turn a freeze file into a l
use the ``--lock`` flag when invocating ``cabal freeze``. This will prevent future
builds from including new dependencies. This can be helpful in situations where
every dependency must be explicitly audited and approved, for example.
Under the hood, the ``--lock`` flag reuses the mechanism behind
``--reject-unconstrained-dependencies``, by writing the equivalent of
``--reject-unconstrained-dependencies=all`` to the freeze file.

cabal gen-bounds
^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 5f10ce4

Please sign in to comment.