Subject: Remove haskell compiler (ghc) from alpine

From: Natanael Copa <[email-masked]>
Date: Thu, 21 Oct 2021 13:36:15 +0200

## TL;DR

ghc is blocking the 3.15 release, so I wonder if we can remove
the following packages:

- community/gch
- community/cabal
- community/shellcheck
- testing/pandoc
- testing/apostrophe

## longer explanation

Maintaining ghc and cabal packages requries significant amount
of time and skills. To my understanding, upstream recommends use ghcup
to install haskell, not the distro package.

We use shellcheck in our CI but shellcheck is available from upstream
as a statically precompiled binary[1] which we can use for our infra.

pandoc is also available as precompiled binary[2].

But those cannot be used as dependencies for other packages which means
that we cannot provide a package for testing/apostrophe or
testing/py3-pypandoc.

Would it be ok to remove those packages to save ourselves from
significant amount of maintenance work?

Alternatively, are there anyone who have time and skills to take
maintenance for those? What needs to be done:

- complete the update of ghc to 9.0.2 [3]:
  - either revert back to system libffi (and add comment in libffi
    package that special care is needed when upgrading libffi due to
    ghc needing ghc to update) or solve how the bundled libffi is handled.
  - find out how to update cabal. one of the following alternatives
    needs to be done:
    a) copy the way boostrap.sh from cabal 3.2.0.0 works (fetch and
       build all the needed deps together with cabal-install itself).
    b) figure out if/how we can use cabal's bootstrap.py[4]
    c) find out how to use previous cabal to update cabal (another
       circular dep) and investigate what the consequences of that is.
       (any external dependencies will need special care when the are
       upgraded).
    d) create apk packages for the dependencies, similar to what arch
       linux does[5]. eg package for uusi[6], haskell-hashable[7] etc.
  - split out ghc-libs runtime libraries

- rebuild everything using the ghc (shellcheck, pandoc, py3-pypandoc
  etc)

- figure out and document how to do the haskell-* packages in case
  option d) was chosen above. Maybe also add support for haskell
  packages in newapkbuild.

- figure out how to bootstrap ghc and cabal for the remaining
  architectures. At least aarch64.

I have already spent way too many days on ghc and would prefer that
someone else takes over or that we remove it.

[1]: https://github.com/koalaman/shellcheck/releases/tag/v0.7.2
[2]: https://github.com/jgm/pandoc/releases/tag/2.14.2
[3]: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/20134
[4]: https://github.com/haskell/cabal/tree/master/bootstrap
[5]: https://github.com/archlinux/svntogit-community/blob/packages/cabal-install/trunk/PKGBUILD
[6]: https://github.com/archlinux/svntogit-community/blob/packages/uusi/trunk/PKGBUILD
[7]: https://github.com/archlinux/svntogit-community/blob/packages/haskell-hashable/trunk/PKGBUILD

---

From: Rasmus Thomsen <[email-masked]>
Date: Thu, 21 Oct 2021 15:27:13 +0200

Hi,

IMHO we can just drop those packages. Our ghc has been stale for some time now and we don’t really have any core developers which care about it (I think). Additionally only a few packages need it so I don’t really think it’s worth keeping it especially now that it blocks the release.

Regards,

Rasmus

> On Thursday, Oct 21, 2021 at 1:36 PM, Natanael Copa <[email-masked] (mailto:[email-masked])> wrote:
> ## TL;DR
>

---

From: "Francesco Colista" <[email-masked]>
Date: Thu, 21 Oct 2021 18:20:53 +0000

> someone else takes over or that we remove it.

Thanks Natanael for having took the time for the long explanation.
Looking at the git log, does not seems that the maintainer has done any contribution since 2017.
The package has 9 patches to make it work, so if nobody is willing to take care the burden of maintaining it, I would vote +1 to move it to unmaintained.

.: Francesco Colista

---

From: Kevin Daudt <[email-masked]>
Date: Tue, 9 Nov 2021 10:09:06 +0100

> ghc is blocking the 3.15 release, so I wonder if we can remove

The latest situation:

Because bootstrapping ghc again after it's gone is tricky, ncopa made
some extra effort in getting ghc9 to work, first built with the built-in
ffi, and now built against system libffi, otherwise all dependencies
would pull in ghc. The libffi3.3-compat package that was used in the
interrim has been removed again>

Cabal seems to be not ready yet[0] for ghc9, so it's still missing,
along with the packages that require cabal:

- community/shellcheck
- testing/idris
- testing/kflc
- testing/pandoc

I've created an [issue][1] to follow up on enabling cabal again

Kevin

[0]:https://github.com/haskell/cabal/issues/7747
[1]:https://gitlab.alpinelinux.org/alpine/aports/-/issues/13171

---

From: Sören Tempel <[email-masked]>
Date: Thu, 18 Nov 2021 13:51:10 +0100

Hello,

Just a quick follow: Both GHC and Cabal have been upgraded and fixed. As
such, I am very happy to report that we will ship 3.15 with Haskell
support. 3.15_rc4 is the first release candidate to include both Cabal
and GHC again.

GHC has been upgraded to 9.0.1 [1], Cabal has been bootstrapped from
source using the Python script provided by upstream [2] and upgraded to
3.6.2.0 [3] all packages listed in the original mail have been rebuild
and enabled again.

If you encounter any issues with these packages, please let us know.

Thanks a lot to Lukas Epple from NixOS for helping out with Cabal.

Greetings,
Sören

[1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/1020873d7db7cec6a6a406d46588e62c958dcf48
[2]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/ddc474c6a4c3b2b63c84d120f9df10d46c3367d2
[3]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/123bb7c27923b5afab53ff7f6fbf2e81b3d88e77

---

From: Kevin Daudt <[email-masked]>
Date: Thu, 18 Nov 2021 15:54:29 +0100

On Thu, Nov 18, 2021 at 01:51:10PM +0100, Sï¿½ren Tempel wrote:
> Sï¿½ren

Thank you as well Sï¿½ren for working on this!