From owner-freebsd-ports@freebsd.org Tue Jun 5 09:51:03 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35EDBFDCECC for ; Tue, 5 Jun 2018 09:51:03 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-pl0-f48.google.com (mail-pl0-f48.google.com [209.85.160.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B73056CC73 for ; Tue, 5 Jun 2018 09:51:02 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-pl0-f48.google.com with SMTP id n10-v6so1238804plp.0 for ; Tue, 05 Jun 2018 02:51:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZWhPvPyd39Y3aKj+L61tFp0udDT1u4ikqfCFy7LtsCk=; b=MdJUTJYDgs6mejrOE1N3XDvRIVBEcnzPlwc9dr9ibEMJRCAcoDCiZPlqy2eqNsKWid RwlQ+eDjrsbi0OXYhc5zk6cs+N9uhwEj4Mn0p7GtiTMS59WsGtbknnv24ulWKb6GIdCc cc2CZvfp6lr1G9Sc5i0CDJ5C78EkXptonSAXYgs9b0V/6ZWwlNiCPAfDMwLPQ1OgCe2N s0bXzMkKhK9fDPdYzcEFlSKSK1Lbr/oSxBfKQAwknk8bo6Z9zQFkljdyu4NzDl5oy1uw n2e5SBISSVi6+jHoK8hRIrfX5xxJkoLHMg3c7nsE5DlaS10Gu88VYcOirYr1QSGUVDkC 6YIQ== X-Gm-Message-State: ALKqPwcHzrQHmQWkixt0uKTfIkw0E9xj+Vs+a+oAEqRn6TOtzzgks9B9 2f/7j8IpnW9bBISJqRm6+KgOzW/K X-Google-Smtp-Source: ADUXVKIw4S3hw/7MU2JJbRajShcVb40V8kB0L41u4hmBiHPKPUEHPaQsVREeM7tSONs9Iri3A04Dyw== X-Received: by 2002:a17:902:9b83:: with SMTP id y3-v6mr25120468plp.358.1528192255760; Tue, 05 Jun 2018 02:50:55 -0700 (PDT) Received: from mail-pl0-f46.google.com (mail-pl0-f46.google.com. [209.85.160.46]) by smtp.gmail.com with ESMTPSA id b83-v6sm13302070pfe.159.2018.06.05.02.50.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 02:50:55 -0700 (PDT) Received: by mail-pl0-f46.google.com with SMTP id n10-v6so1238781plp.0 for ; Tue, 05 Jun 2018 02:50:55 -0700 (PDT) X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr25624516pls.117.1528192255519; Tue, 05 Jun 2018 02:50:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:556:0:0:0:0 with HTTP; Tue, 5 Jun 2018 02:50:24 -0700 (PDT) From: Gleb Popov Date: Tue, 5 Jun 2018 12:50:24 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Offload maintaining burden of Haskell packages to the Haskell community To: FreeBSD ports list Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 09:51:03 -0000 [Resending to ports@ to gain wider audience] Our ports tree contains 565 Haskell ports at the moment. Only 51 of them are executables (like pandoc or cgrep), while other 500 are just LIB_DEPENDS of those 51. Haskell packages are obtained from Hackage [1], a package database much like Python's PyPI or Perl's CPAN. There was a reason to have all these Haskell library ports in tree - Hackage provide no guarantee that packages it holds can work together. It was easy to get into "dependency hell" situation, for instance. Due to this, our ports tree was playing a role of a "known-to-be-working subset of Hackage". Thanks to poudriere and our package builders we were sure that all hs-* ports do work together and there are no dependency issues. Then, the Stackage [2] appeared. Stackage provides lists of Haskell package sets known to be working together for a given compiler version. It is solving the same problem we are solving in ports. The last lang/ghc upgrade took about a month for me, as I was fighting through */hs-* ports failures. The maintaining burden is too high and has no sense, because we are duplicating the work that Stackage does. So, my idea is simple: 1. Remove all */hs-* ports that are just library dependencies to other */hs-* . 2. Except, probably, ones that need patching. 3. Convert remaining (executable) */hs-* ports to use Stackage as dependency source. There is a problem, though. Unlike Python or Perl, Haskell is a compiled language. This means that if we compile 2 apps that has, say, 100 Haskell library dependencies, we would have to compile these 100 packages twice. These deps would be statically linked into 2 both apps. There would be no build-time sharing now. I think, when building straight from ports some caching could be arranged, but I doubt it will work out for poudriere. What do you all think of this? What cource of action should we take? [1]: http://hackage.haskell.org/ [2]: http://stackage.org/