Skip to content

CI RFC: remove dependency on cabal-plan #8891

Closed
@ulysses4ever

Description

@ulysses4ever

Currently, our CI cabal installs cabal-plan on every validate job. Here're timings of every step in a Validate ubuntu-20.04 ghc-9.4.2 run (only longer-than-minute steps are shown):

Step Time
Run haskell/actions/setup@v2 2m 19s
Install cabal-plan 5m 42s
Validate build 15m 5s
Validate lib-test 1m 9s
Validate lib-suite 4m 33s
Validate cli-test 4m 31s
Validate cli-suite 11m 29s

My rough calculation is that the cabal-plan step takes more than 10% of time (~13% perhaps). I think it's a non-negligable price. Why do we pay it?

If you look into validate.sh -- the actual validation script, it uses cabal-plan for two use cases:

  1. cabal-plan list-bin to find executables built by cabal
  2. cabal-plan top to list all packages planned for the build topologically sorted.

The first use case is obsolete since we have cabal list-bin. It should be easy to swap one for another.

The second use case doesn't feel useful to me. Does anyone have a different feeling? Does it make sense to pay 13% of time for it?

If the answer for the latter question is No, I think we should consider removing dependency on cabal-plan.


There's one more reason I'd like to remove this dependency: cabal-plan does not update for newer GHCs particularly fast. E.g. GHC 9.6.1 has been released more than one month ago, and cabal-plan still does not build without allow-newer.


If people think that we should have cabal-plan in CI, I think we could do it and solve the two problems I mention here via prebuilt binaries: downloading those will both save most of the time and relieve us of compatibility considerations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions