Build failure (hackage-cli) with weird linker error (due to builder using v1-install)
See https://hackage.haskell.org/package/hackage-cli-0.1.0.0/reports/1
dieVerbatim: user error (Error: cabal: '/home/builder/.ghcup/ghc/9.2.4/bin/ghc-pkg-9.2.4' exited with an error: z-hackage-cli-z-cabal-revisions-0.1.0.0: Warning: .:25:1: Unknown field: "library-dirs-static" z-hackage-cli-z-cabal-revisions-0.1.0.0: installed package info from too old version of Cabal (key field does not match id field) )
Interesting. I wonder if the hackage builder just has trouble in general with packages with internal libraries.
Note that builder still uses (for irritating reasons we should try to fix) v1-install. So it could be cabal v1-install itself chokes on such things.
@gbaz: Your gut feeling was exactly right. I tried cabal v1-install locally and got the same error.
Is there a thread about upgrading Hackage builder from cabal v1-install to cabal v2-install?
From what i've gathered these seem to be the remaining blocking issues: https://github.com/haskell/hackage-server/issues/821#issuecomment-855509024
(The reason why we need cabal v2-build to work on Hackage is that, v2-build allows us to reference git commits withsource-repository-package)
That ticket sounds right. Many of those issues are resolved, so it might be worth having another go at things...
That said, using v2-build won't help with your situation. The source-repository-package stanza is part of the cabal.project file, and that does not affect builds from tarballs (including those uploaded to hackage). Hackage packages are expected to be buildable with regards to other hackage packages, by use of their cabal file alone.
Getting the same error for a new package of mine, again providing an executable and internal library.
Moreover, like in the case of hackage-cli, the package home page does not include a "Modules" sections linking to the exposed modules (of the library) although the documentation has been "uploaded by the user" and can be accessed under .../agda2train/docs/.
EDIT: Looking through the server code, the empty module list in the home page is explained by a null ModIndex and can be traced down to the mdocIndex variable originating from a query to the tarIndexCache, which might suggest an issue with the index of tarballs?
The issue is the library is not agda2train but agda2train-lib. Hackage has an open ticket that's being worked on for display of multiple public libraries, which also applies when there's a single public library, but it isn't the default exposed one.
This is the same issue as reported above -- we can fix the display with the ticket being worked on, and to fix the building we need to move the builder to v2 install.