hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Cabal 3.12

Open andreasabel opened this issue 1 year ago • 2 comments

This PR does the minimum changes needed for Cabal-3.12 (and some cleanup work).

Commits:

  • Clean cabal.project: remove some cruft
  • Default library (hackage-server) instead of internal library lib-server: the introduction of a internal library 7 years ago never got anywhere, and internal libs still cause problems with some tooling
  • .cabal: remove outdated conditional: remove some cruft
  • Tags feature: replace some clumsy code: a drive-by shooting; couldn't look past this contrived and inefficient piece of code when I ran into it
  • Support Cabal-3.12 and GHC 9.10: main commit, introducing #ifs and the necessary code to work with latest Cabal(-syntax). Passes CI.
  • Commit to Cabal-3.12.1.0: bump the lower bound of Cabal(-syntax) to latest; breaks the nix CI

I had to disable the reverse dependencies benchmark because gauge does not support base-4.20 and there is no maintainer for this package dropped by @vincenth in sight. @ysangkok, consider switiching to criterion or related.

Eventually we can remove all the #if MIN_VERSION_Cabal conditionals, but there is no rush now (they have been CI tested).

andreasabel avatar Jul 02 '24 19:07 andreasabel

Is Cabal-3.12.0.0 sufficient? This is already available in nixpkgs. I am trying to update nixpkgs to 3.12.1.0 here: https://github.com/NixOS/nixpkgs/pull/324424

peterbecich avatar Jul 03 '24 21:07 peterbecich

Once the upgrade to Cabal-3.12 is merged, please merge https://github.com/haskell/hackage-server/pull/1137 as well.

Bodigrim avatar Jul 03 '24 22:07 Bodigrim

@peterbecich wrote:

Is Cabal-3.12.0.0 sufficient? This is already available in nixpkgs. I am trying to update nixpkgs to 3.12.1.0 here: NixOS/nixpkgs#324424

Unfortunately, Cabal(-syntax)-3.12.1.0 adds the MHS constructor (micro Haskell), breaking the PVP:

  • https://github.com/haskell/cabal/issues/10161

So either we commit to Cabal >= 3.12.1.0 or to Cabal == 3.12.0.*. The former is more future compatible so I opted for it.

andreasabel avatar Jul 04 '24 07:07 andreasabel

@Bodigrim wrote:

Once the upgrade to Cabal-3.12 is merged, please merge #1137 as well.

Thanks for the pointer! I should take the missing parts of #1137 and include it into this PR. (This is just the arbitrary implementation for architecture values.)

  • #1137

andreasabel avatar Jul 04 '24 07:07 andreasabel

I should take the missing parts of #1137 and include it into this PR.

Done.

andreasabel avatar Jul 04 '24 12:07 andreasabel

It would be great if upgrade to Cabal 3.12 could be deployed soon. Is there anything blocking it?

Bodigrim avatar Jul 07 '24 19:07 Bodigrim

Cabal 3.12 could be deployed soon. Is there anything blocking it?

We'd have to ask @gbaz , I think.

ysangkok avatar Jul 08 '24 12:07 ysangkok