Skip to content

Commit 81200ad

Browse files
authored
Merge pull request #11018 from L0neGamer/import-stackage-doc
add paragraph mentioning stackage
2 parents 50b287b + 0436a81 commit 81200ad

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

doc/cabal-project-description-file.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ architecture and version information from, which will force some
8585
commands (update, sdist) to require ghc present where otherwise it
8686
would not be necessitated.
8787

88+
One use case for imports is to specify a `Stackage <https://www.stackage.org/>`
89+
snapshot, so that your cabal project can use the same set of packages as
90+
that snapshot. To use the ``lts-21.25`` resolver, you can write
91+
``import: https://www.stackage.org/lts-21.25/cabal.config`` in your
92+
``cabal.project``.
93+
94+
There are a number of limitations that come with this approach however; please
95+
see :ref:`How can I have a reproducible set of versions for my dependencies?<how reproducible>` for
96+
more information.
97+
8898
Specifying the local packages
8999
-----------------------------
90100

doc/nix-local-build.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ for each package using :cfg-field:`profiling-detail`::
104104
Alternately, you can call ``cabal build --enable-profiling`` to
105105
temporarily build with profiling.
106106

107+
.. _how reproducible:
108+
107109
How can I have a reproducible set of versions for my dependencies?
108110
------------------------------------------------------------------
109111

@@ -134,6 +136,16 @@ development environments.
134136
.. _Stackage: https://stackage.org/
135137
.. _versions of packages in lts-19.2: https://www.stackage.org/lts-19.2
136138

139+
Limitations
140+
^^^^^^^^^^^
141+
142+
Stackage does not guarantee that the config files will work with revisions, and
143+
it's not currently possible to `override used versions of packages <https://github.com/haskell/cabal/issues/9511>`
144+
or to `specify revisions <https://github.com/haskell/cabal/issues/7833>` using
145+
cabal.
146+
147+
To mitigate these shortcomings, download the linked ``cabal.config`` file, import this locally with a relative path and repeatedly ``cabal build all --dry-run`` to identify and then comment out version constraint conflicts until the cabal solver is happy.
148+
137149
How it works
138150
============
139151

0 commit comments

Comments
 (0)