srid / srid/haskell-flake

Add `cabal check` to `checks`

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Nix
Stars
240
Forks
27
PR merge metrics
No merged PRs in 30d

Description

In arion I had a separate build with

                  checked = super.haskell.lib.overrideCabal pkg (o: {
                    postConfigure = ''${o.postConfigure or ""}
                      if ! ${hsuper.cabal-install}/bin/cabal check;
                      then
                        echo 1>&2 ERROR: cabal file is invalid. Above warnings were errors.
                        exit 1
                      fi
                    '';
                  });

I think we could touch the outputs and exit 0 to speed this up.
Doing it in runCommand would be fragile.
This should probably call Setup.hs instead of cabal-install.

Running it as part of the main build isn't ideal because the check may be more strict than necessary. I think it should only run in CI.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading how the existing checks output is defined and invoked in CI, then compare the proposed Setup.hs path with the mentioned cabal-install and runCommand approaches. Done means cabal check runs only in CI, reports invalid Cabal files as failures, and does not slow the main build.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.