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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

L0neGamer
Copy link

Minor documentation addition to express a specific usecase for config importing, that of using stackage as your package set.

  • [/] Patches conform to the coding conventions.
  • [/] Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@Kleidukos as requested.

@L0neGamer L0neGamer force-pushed the import-stackage-doc branch from 5a87bc7 to 3466e90 Compare June 25, 2025 09:24
``import: https://www.stackage.org/lts-21.25/cabal.config`` in your
``cabal.project``. Note that Stackage does not guarantee that these will work
with regards to revisions.

Copy link
Collaborator

@philderbeast philderbeast Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work if there are any version constraint conflicts.

Not being able to override versions and not being able to specify revisions are shortcomings of cabal.

If we are going to suggest doing this, can we also say how to mitigate the version constraint conflicts. The simple fix is to download the stackage-hosted cabal.config and remove (comment out) the conflicting contraints. I describe how to do this in the Stackage Resolver and Constraints section of the Updo readme.

On https://github.com/up-do, I've converted projects to use Updo and use a Stackage resolver. Most of these have a ./project-stackage folder (that's where I put the downloaded cabal.config files) and had version constraint conflicts.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding more caveats sounds like a good idea - too.

@@ -85,6 +85,13 @@ 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you link to the cookbook reproducible builds section that already mentions importing from stackage?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, I'll get on that when I can.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kleidukos sorry to ping you about this, do you know of a way to link to a different RST document without making it full link?

Comment on lines +147 to +148
To mitigate these shortcomings, you can download the config file that is linked
to and remove the troublesome constraints.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To mitigate these shortcomings, you can download the config file that is linked
to and remove the troublesome constraints.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants