Skip to content

Commit

Permalink
Add other ways to control versions
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed May 11, 2024
1 parent 66f0d7e commit b2a4504
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions doc/how-to-freeze-versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,32 @@
How to control versions
=======================

There are various ways and places to limit what versions the solver can pick for
dependencies.

Version ranges
Within a package description, version ranges for dependencies can be; tight
or loose or missing altogether.

Version constraints
Within a project, version constraints for dependencies limit the versions
that the solver can pick.

Curated sets
A project can import curated sets of packages and versions that are known to
work together, such as those Stackage provides for Cabal's use.

Pinning Hackage versions
Adding ``index-state`` to a project limits versions coming from Hackage to
include only those that were available at the time.

Freezing
Pins the versions picked by the solver for all dependencies.
Pins the versions picked by the solver for all dependencies. This is a way
to preserve a set of versions found by the solver, a solver-curated set, if
you will.

Freezing versions
-----------------

Pinning adds a version equality constraint for each package in the set of
project dependencies, explicit and transitive. The ``cabal freeze`` command
Expand Down Expand Up @@ -53,8 +77,8 @@ different architecture or a different compiler version and boot libraries.
that relates to the project environment, like ``cabal.project`` or
``cabal.project.local``.

Common workflows
^^^^^^^^^^^^^^^^
Freezing workflows
^^^^^^^^^^^^^^^^^^

.. Warning::
For each of these workflows, you may have to first delete the
Expand Down

0 comments on commit b2a4504

Please sign in to comment.