Skip to content

Switch from exact snapshot to latest nightly#29

Merged
tbidne merged 11 commits intohaskell:masterfrom
tbidne:dev
Mar 31, 2026
Merged

Switch from exact snapshot to latest nightly#29
tbidne merged 11 commits intohaskell:masterfrom
tbidne:dev

Conversation

@tbidne
Copy link
Copy Markdown
Collaborator

@tbidne tbidne commented Mar 26, 2026

There are several updates here. First, there are some minor improvements (e.g. consolidating internal libs) and an update to ghc 9.12.3.

More importantly, this implements the idea mentioned here, intending to resolve this. In more detail, this changes the snapshot from a specific date to just nightly, meaning we always take the latest. The idea is that this should better allow users to run clc-stackage with the latest ghc that corresponds to the current snapshot. There are a few changes that facilitate this:

  • Boot packages added to excluded_pkgs.jsonc (So e.g. we will not write an exact version constraint for text, which could otherwise be a problem since ghc is in the build plan). This is the main part that addresses the linked issue, as those are the most frequent pain points IME. As a proof-of-concept, I successfully built the package set here with 9.12.2 and 9.12.3.

  • Cabal index-states dropped. Moreover, generated/cabal.project includes:

    allow-newer: *:*
    allow-older: *:*
    

    which should mitigate other bounds issues.

  • There is a new CI job that builds everything with --dry-run, using nix to supply the system dependencies.

    It's not perfect, but it is a pretty decent indication of how in-sync the current stackage nightly and package exclusion set here are.

    If the job fails, there is very likely a real problem (nightly pulled in some package that needs to be excluded or has a new system dep). If the job succeeds, there is a good chance things are fine, though it is possible some new package fails to properly declare a new system dep at config time, so we wouldn't see a problem until someone tries to actually build it.

  • There is increased logging e.g. we try to warn the user when their ghc and the snapshot's do not match.

This is an alternative to this, in the sense that the new docs about ghc minor version should hopefully no longer be relevant. But @MangoIV please let me know if you think the docs (or anything else) can be improved.

The functionality was originally split into separate libraries for
organization purposes. However this arguably does not buy us much,
since the modules are already namespaces appropriately. Moreover,
separate libraries were annoying as it slows down compilation/type
checking, and makes HLS less effective.
Do not log terminal size error due to interference with optparse
completions.
This allows us to annotate why a particular package is excluded.
We do this so minor version differences (i.e. different minor ghcs) do not cause
failures, since ghc is in the stackage build plan.
@tbidne
Copy link
Copy Markdown
Collaborator Author

tbidne commented Mar 26, 2026

Tragically, it appears github auto disables workflows if a repo has not had any commits in 60 days, so CI is currently not running. So the job has to be manually enabled. See this.

@tbidne tbidne force-pushed the dev branch 3 times, most recently from 4154165 to fdebe3c Compare March 27, 2026 19:31
Copy link
Copy Markdown
Collaborator

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

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

Very nice! Thank you!

I invited you to Haskell GitHub org with the intention to give you write access for this repo.

@tbidne
Copy link
Copy Markdown
Collaborator Author

tbidne commented Mar 28, 2026

Thanks! I accepted, though I think you'll also need to shuffle some permissions as I don't see an option to re-enable CI on the actions tab.

@Bodigrim
Copy link
Copy Markdown
Collaborator

Check again please.

@tbidne
Copy link
Copy Markdown
Collaborator Author

tbidne commented Mar 29, 2026

It worked, thanks! I'll fix CI once I am back at my laptop (a few hours, most likely).

@tbidne tbidne force-pushed the dev branch 6 times, most recently from baaebeb to e995918 Compare March 30, 2026 07:05
Instead of pinning the snapshot to a specific date, we set it to
'nightly', which should allow more flexibility i.e. users can build
whichever ghc corresponds to the latest snapshot. This should
hopefully decrease the chance of users running into issues with
ghc minor version upgrades e.g. bounds errors.

Snapshot updates that upgrade the ghc major version will almost
certainly require manual intervention here, but failures will likely
be caught by the CI job that builds everything with --dry-run, so
there should be some warning.
@tbidne
Copy link
Copy Markdown
Collaborator Author

tbidne commented Mar 31, 2026

CI is fixed, and I just built it again with the newest snapshot (9.12.4), so I'm going to go ahead and merge this.

@tbidne tbidne merged commit 87e11f7 into haskell:master Mar 31, 2026
4 checks passed
@tbidne tbidne deleted the dev branch March 31, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clarify GHC usage

2 participants