Skip to content
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

CI RFC: remove dependency on cabal-plan #8891

Closed
ulysses4ever opened this issue Apr 1, 2023 · 5 comments
Closed

CI RFC: remove dependency on cabal-plan #8891

ulysses4ever opened this issue Apr 1, 2023 · 5 comments
Labels

Comments

@ulysses4ever
Copy link
Collaborator

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.

@andreabedini
Copy link
Collaborator

I’m ok with this. I remember that when I tried replacing cabal plan list-bin with cabal list-bin something wasn’t working as expected but perhaps things have changed now.

@andreabedini
Copy link
Collaborator

I have forgotten all the details but in #7952 i have a commit that removes cabal plan 3c8dd20 and another one that puts in back because cabal list-bin didn’t quite work the same 77ae21a

IMHO it’s worth trying again though.

@fgaz
Copy link
Member

fgaz commented Apr 2, 2023

I think it was because of #7679 (and also it started building stuff according to #7648 (comment) ?!?)

If cabal list-bin works now, i agree on removing cabal-plan

@Mikolaj
Copy link
Member

Mikolaj commented Apr 3, 2023

Me too. Mostly for simplicity. One less moving part.

ulysses4ever added a commit that referenced this issue Apr 13, 2023
mergify bot added a commit that referenced this issue Apr 17, 2023
CI: remove dependency on cabal-plan (#8891)
@ulysses4ever
Copy link
Collaborator Author

I just saw that HaskellWeekly uses cabal freeze to get the whole plan. Maybe I should have done it in #8893. But oh well, we have something, and CI doesn't spend time on building cabal-plan anymore (#8893). Closing…

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

No branches or pull requests

4 participants