Skip to content

Commit 58c9e48

Browse files
committed
Add example of missing upper bound on base
1 parent 0e6ea0e commit 58c9e48

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

doc/how-to-freeze-versions.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ on:
4848
- that upper bounds are not missing
4949
- that upper bounds are not missing for ``base``
5050

51+
.. Note::
52+
53+
Missing an upper bound on ``base`` is more serious than it is for other
54+
packages:
55+
56+
- when upper bounds are missing for ``base``:
57+
58+
.. code-block:: text
59+
60+
$ cabal check
61+
The following errors will cause portability problems on other environments:
62+
Error: [missing-bounds-important] The dependency 'build-depends: base' does
63+
not specify an upper bound on the version number. Each major release of the
64+
'base' package changes the API in various ways and most packages will need
65+
some changes to compile with it. The recommended practice is to specify an
66+
upper bound on the version of the 'base' package. This ensures your package
67+
will continue to build when a new major version of the 'base' package is
68+
released. If you are not sure what upper bound to use then use the next major
69+
version. For example if you have tested your package with 'base' version 4.5
70+
and 4.6 then use 'build-depends: base >= 4.5 && < 4.7'.
71+
Error: Hackage would reject this package.
72+
73+
- when upper bounds are missing on ``array``:
74+
75+
.. code-block:: text
76+
77+
$ cabal check
78+
These warnings may cause trouble when distributing the package:
79+
Warning: [missing-upper-bounds] On library, these packages miss upper bounds:
80+
- array
81+
Please add them. There is more information at https://pvp.haskell.org/
82+
5183
For large projects with many packages, it would be a lot of work to keep all
5284
package dependency version ranges up to date. Ways of overcoming this are:
5385

0 commit comments

Comments
 (0)