Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1bdb1de
Improved docs on cabal freeze.
Martinsos Mar 18, 2022
856d661
Move freeze discussion to guide
philderbeast Apr 26, 2024
ea6f205
Typo continuos
philderbeast May 7, 2024
890f608
Use description list for common workflows
philderbeast May 8, 2024
999c4dc
Define what freezing is
philderbeast May 8, 2024
242ca19
Move freezing downwards in the guide
philderbeast May 11, 2024
9984787
Extra .freeze extension
philderbeast May 11, 2024
1dc90f2
Add a dependency then freeze harder
philderbeast May 11, 2024
314e5e2
Do you need to freeze as new section title
philderbeast May 11, 2024
7f2ddae
How to control versions
philderbeast May 11, 2024
4143758
Add other ways to control versions
philderbeast May 11, 2024
e3c934f
Add section titles
philderbeast May 11, 2024
dafc08c
Stackage as a curated package set
philderbeast May 11, 2024
7d1ea84
Constraints are additive
philderbeast Feb 9, 2025
c72bf11
Add version ranges
philderbeast Feb 9, 2025
f64ec0b
Add content to the version ranges section
philderbeast Feb 9, 2025
7d0d682
Add version constraints and exceptions
philderbeast Feb 9, 2025
c1e5eb5
Demo of --with-compiler effect
philderbeast Feb 9, 2025
8303f8a
Typo, not matter
philderbeast Apr 27, 2025
acbe85c
Redo the freezing workflows
philderbeast Apr 27, 2025
d88f6e4
Satisfy whitespace
philderbeast Jul 7, 2025
e3c41db
Typo s/chose its/choose a/
philderbeast Jan 27, 2026
d29055e
Typo s/This is/This/
philderbeast Jan 27, 2026
eb6fb6f
Add mandatory version constraints
philderbeast Jan 27, 2026
49608dc
Warn about reject-unconstrained
philderbeast Jan 27, 2026
1f80dcc
Versions and flags
philderbeast Mar 26, 2026
0bfa00d
Add LTS and nightly package set examples
philderbeast Mar 26, 2026
e3d46e7
Add a ref to curated version sets
philderbeast Mar 26, 2026
6eda244
Add ref links from definition list to sections
philderbeast Mar 26, 2026
c16cf9a
Use directory as example of flags changing deps
philderbeast Mar 26, 2026
a752554
Add example of missing upper bound on base
philderbeast Mar 26, 2026
a2ddf0b
Say the order is worse to better
philderbeast Mar 26, 2026
b8d842d
Move mandated versions to its own section
philderbeast Mar 26, 2026
6ce66fc
Add a section, places for versioning
philderbeast Mar 27, 2026
1503608
Demote to note, order of .freeze and .local
philderbeast Mar 27, 2026
d4448f1
Use .project and .config extensions in general
philderbeast Mar 27, 2026
c7cf83f
Move lib versus exe .freeze distribution
philderbeast Mar 27, 2026
f9bea1c
Revert cabal freeze command
philderbeast Mar 27, 2026
d2fdde3
Add an example of hackage dependencies
philderbeast Mar 27, 2026
285ffe9
Typo, commit to *the* version control
philderbeast Mar 27, 2026
2bee3b2
Typo the solver is *let* free
philderbeast Mar 27, 2026
28bac5d
Bold short descriptions and ref to freeze-harder
philderbeast Jun 3, 2026
752a8b0
New introductory sentence for adding a dep
philderbeast Jun 3, 2026
e39fcc2
Add a tip for different compiler versions
philderbeast Jun 3, 2026
0f0694a
Link to "with-compiler" and "project-file"
philderbeast Jun 3, 2026
6bc64af
Satisfy fix-whitespace
philderbeast Jun 3, 2026
9454310
Misplaced semicolon
philderbeast Jun 6, 2026
1533833
Remove unneeded semicolon
philderbeast Jun 6, 2026
00882dc
Say a lot more about accumulating constraints
philderbeast Jun 6, 2026
1e02e97
Limitations of cabal freeze
philderbeast Jun 20, 2026
0e67fd7
Not a true lock file
philderbeast Jun 20, 2026
3389359
When to commit a freeze file to source control
philderbeast Jun 20, 2026
efdd965
Add a "Freezing limitations" section
philderbeast Jun 20, 2026
c626072
Add a limitations section
philderbeast Jun 20, 2026
fd26380
Split into avoiding and setting lists
philderbeast Jun 22, 2026
e97feeb
Variation on avoiding and setting
philderbeast Jun 22, 2026
0b949d7
Satisfy whitespace
philderbeast Jul 1, 2026
0e496e9
Change warning to tip for reject-unconstrained-*
philderbeast Jul 5, 2026
19b5bef
A freeze file does not block adding new deps
philderbeast Jul 5, 2026
f991d83
Add TODOs for .local and .freeze loading
philderbeast Jul 5, 2026
79ce54b
Don't describe .local and .freeze as quirky
philderbeast Jul 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -508,14 +508,14 @@ is in place, which moves the old configuration to a ``cabal.project.local~``
file, this feature can also be disabled by using the ``--disable-backup``
flag.

.. _cabal-freeze:

cabal freeze
^^^^^^^^^^^^

If a package is built in several different environments, such as a
development environment, a staging environment and a production
environment, it may be necessary or desirable to ensure that the same
dependency versions are selected in each environment. This can be done
with the ``freeze`` command:
.. code-block:: console

$ cabal freeze

``cabal freeze`` writes out a **freeze file** which records all of
Comment thread
philderbeast marked this conversation as resolved.
the versions and flags that are picked by the solver under the
Expand All @@ -537,12 +537,9 @@ something like this:
QuickCheck +templatehaskell,
-- etc...


For end-user executables, it is recommended that you distribute the
``cabal.project.freeze`` file in your source repository so that all
users see a consistent set of dependencies. For libraries, this is not
recommended: users often need to build against different versions of
libraries than what you developed against.
For more detail, please see the guide on how to :ref:`control versions
<how-to-control-versions>` with its section on :ref:`freezing
<frozen-versions>`.

.. _cabal-gen-bounds:

Expand Down
2 changes: 1 addition & 1 deletion doc/cabal-project-description-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ file with ``profiling: True``.

The full configuration of a project is determined by combining the
following sources (later entries override earlier ones, except for appendable
options):
options, like dependency version constraints):

1. :ref:`The user-wide global configuration <config-file-discovery>` (default: ``~/.config/cabal/config``)

Expand Down
Loading
Loading