Skip to content

Commit

Permalink
Add version ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Feb 9, 2025
1 parent e60c5ca commit e9c1e38
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/how-to-freeze-versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ Frozen versions
Version ranges
--------------

A dependency can have a version range specified in the package description.
This is expected for published packages. The `cabal check` command will check
that version ranges conform to a set of rules:

- that lower bounds are inclusive
- that upper bounds are exclusive
- that upper bounds don't have trailing zeros
- that upper bounds are not missing
- that upper bounds are not missing for ``base``

With large projects with many packages, it would be a lot of work to keep all
package dependency version ranges up to date. Ways of overcoming this are:

- use a package generator like ``hpack-dhall-cabal`` to import sets of dependencies with version ranges
- use a ``cabal.project`` file to specify version constraints for all dependencies
- use a curated set of packages and versions and import these into the project

Version constraints
-------------------

Expand Down

0 comments on commit e9c1e38

Please sign in to comment.