Skip to content

add paragraph mentioning stackage #11018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions doc/cabal-project-description-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ architecture and version information from, which will force some
commands (update, sdist) to require ghc present where otherwise it
would not be necessitated.

One use case for imports is to specify a `Stackage <https://www.stackage.org/>`
snapshot, so that your cabal project can use the same set of packages as
that snapshot. To use the ``lts-21.25`` resolver, you can write
``import: https://www.stackage.org/lts-21.25/cabal.config`` in your
``cabal.project``.

There are a number of limitations that come with this approach however; please
see :ref:`How can I have a reproducible set of versions for my dependencies?<how reproducible>` for
more information.

Specifying the local packages
-----------------------------

Expand Down
12 changes: 12 additions & 0 deletions doc/nix-local-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ for each package using :cfg-field:`profiling-detail`::
Alternately, you can call ``cabal build --enable-profiling`` to
temporarily build with profiling.

.. _how reproducible:

How can I have a reproducible set of versions for my dependencies?
------------------------------------------------------------------

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

Limitations
^^^^^^^^^^^

Stackage does not guarantee that the config files will work with revisions, and
it's not currently possible to `override used versions of packages <https://github.com/haskell/cabal/issues/9511>`
or to `specify revisions <https://github.com/haskell/cabal/issues/7833>` using
cabal.

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.

How it works
============

Expand Down
Loading