From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KML4MNDeumNSAwAAbAwnHQ (envelope-from ) for ; Sun, 08 Jan 2023 16:18:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iIEVMdDeumOxtgAA9RJhRA (envelope-from ) for ; Sun, 08 Jan 2023 16:18:40 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 92D4085C4 for ; Sun, 8 Jan 2023 16:18:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEXQu-000765-97; Sun, 08 Jan 2023 10:18:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEXQY-00073Y-8i for guix-devel@gnu.org; Sun, 08 Jan 2023 10:17:48 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEXQV-00072C-Sw for guix-devel@gnu.org; Sun, 08 Jan 2023 10:17:38 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id db57bd75; Sun, 8 Jan 2023 15:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=IME1STOuu2PY BPfivg297keybix83xgTJYFWvAVNmyM=; b=hl+jHzsCIkzSfjEZmJLNv6kMaPrD EOmIX+yJmZixM+JI8oV99JYIO1UmEDrMB+mdYZze4/NjCCSsLsdt/HdcplBJo0EW ro5AdnStljFJsA1pZC1Cx/kWdQfT9yZjCpKAAMHR3Ay6pa9dY+Ld0IeOZOZ4+FH7 pn0i591YcrZNxJ5oBmFd3NVYQkcjrNrsHKb2K0jDowV35deBIPQCfkwIw3BKxsoc xYSJlZnXBhSnx6dqMZEIEW/JIZ0oJRkzMYyJqog32rW06Zi9iIqWeVWWrIfltNLF rKCYgAbdbsCnAYPUE6ATrJELUOCFhwh8dP/tDbocXUznmJLnp/wSOastbQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 288b3ce5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 8 Jan 2023 15:17:21 +0000 (UTC) Date: Sun, 08 Jan 2023 16:17:20 +0100 From: Julien Lepiller To: Csepp , Guix Devel CC: pukkamustard Subject: Re: Packaging OCaml repositories that define multiple packages? User-Agent: K-9 Mail for Android In-Reply-To: <867cxxxgfv.fsf@riseup.net> References: <867cxxxgfv.fsf@riseup.net> Message-ID: <663DEABC-D27B-4E6F-B0E8-4B2ADF609F4A@lepiller.eu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----XRXHMPCXBWLZ7L4E4120PPVT4UJODO Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673191120; a=rsa-sha256; cv=none; b=PcPKE889+35fWTUkEvcs9sQrO7hsYLQykZ2q1zDXtNLq2/if8W/LiU46rdLKF3uqn8VZAB NbsUCr1NLyr5kxRXjRee2gAz9vYQXGXZmSZLqPu0WsTiP3EtSBw4wxdYlOylCeXA8Sncqn gp6PWQ88BulnK4na7M95mng76KCE5OirysMq+oCrnYZ+/6kHoh8LcgSPWXGhaQDYT0dB+f gDdsWHPIclYrwzQTf/Yw2/CTrxiE/r1ljH13LuzWDCagTK5eIvFxzjbHGX3sLqO/h7GmZy YhwmO2luRUU6Bxw89XkVZQQLrEaKwO9lHLGyef1x6yRcMapG4EJ4o2z4Qa6B4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=hl+jHzsC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673191120; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XofPUSqE4HbSHOcPJzI8ccO2hkhYmn22dQs9Wp9JMoI=; b=D2SGBInBI82/rFLXyw7Xeoe5HmR6leReh6B8nI1FXAcdUhldfaRSbv77o25gWDt3QIt+sk Ve/o0t2kzRtrSgK5p41jnbiA0xzw/5pK8ihALId4iCUkEnn2p0SFv38AQ6+dOyXGaNzjWI fUkIJIj6SvXhiP9qOeXHnzDfgp6F7+jDsAqJaEgy0d73oReuIKlEAAztuaQArUjGkUqeEF 8zh6/tn9J+ZGkl2iRFQLdmaOooBArM8tYpRfb49qQDFwhG2afxcw3jkfeXRpy2+CpntKcs zsMCn3pPQjEzPuq4PL3LsW+nr7z7qkWbHykXlY6EoxSuR48Ca0EQnA0DJOHPZg== X-Spam-Score: -4.87 X-Migadu-Queue-Id: 92D4085C4 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=hl+jHzsC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.87 X-TUID: xzur2iH+7/BJ ------XRXHMPCXBWLZ7L4E4120PPVT4UJODO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The importer will not support such a package=2E As you say, it wants to bui= ld them separately because they are separate opam packages=2E So, either we= build them separately too, or we build all at once=2E If we build all at once, that's fine=2E You could name the package ocaml-m= irage and not use any #:package argument=2E Dune will then build all packag= es from the repository=2E One issue with that is that the importer will not know about it and will t= ry to import subpackages again whenever a packages depends on it, instead o= f using ocaml-mirage=2E I don't like the alias solution, though it should work, since the importer= would see them=2E Le 8 janvier 2023 15:04:35 GMT+01:00, Csepp a =C3= =A9crit=C2=A0: >I'm going through my MirageOS commits for what is hopefully the last >time before I send the patches and I realized that a problem that I >thought was isolated is a lot more widespread than I thought=2E > >As an example look at https://github=2Ecom/mirage/mirage/ > >It defines functoria, functoria-runtime, mirage, and mirage-runtime=2E > >It is possible to build all 4 as one package=2E > >The opam importer seems to not be able to handle situations like this, >since it defines a new package for each sub-package=2E > >How should I proceed? I definitely want to merge all redundant packages >into one, but then what? How should the package description reflect >this? What should the package be named when it corresponds to 4 OPAM >packages at once? > >For now I defined a few aliases for cases like this, but I'm not sure if >this is ideal=2E They look like this (made up but possible example): >(define ocaml-mirage ocaml-mirage-runtime) ------XRXHMPCXBWLZ7L4E4120PPVT4UJODO Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable The importer will not support such a package=2E As= you say, it wants to build them separately because they are separate opam = packages=2E So, either we build them separately too, or we build all at onc= e=2E

If we build all at once, that's fine=2E You could name the pack= age ocaml-mirage and not use any #:package argument=2E Dune will then build= all packages from the repository=2E

One issue with that is that the= importer will not know about it and will try to import subpackages again w= henever a packages depends on it, instead of using ocaml-mirage=2E

I= don't like the alias solution, though it should work, since the importer w= ould see them=2E

Le 8 janvier 2023 15:04:= 35 GMT+01:00, Csepp <raingloom@riseup=2Enet> a =C3=A9crit=C2=A0:
I'm going through my MirageOS commits f=
or what is hopefully the last
time before I send the patches and I reali= zed that a problem that I
thought was isolated is a lot more widespread = than I thought=2E

As an example look at https://github=2Ecom/mirage/mirage/

It defin= es functoria, functoria-runtime, mirage, and mirage-runtime=2E

It is= possible to build all 4 as one package=2E

The opam importer seems t= o not be able to handle situations like this,
since it defines a new pac= kage for each sub-package=2E

How should I proceed? I definitely wan= t to merge all redundant packages
into one, but then what? How should t= he package description reflect
this? What should the package be named w= hen it corresponds to 4 OPAM
packages at once?

For now I defined = a few aliases for cases like this, but I'm not sure if
this is ideal=2E = They look like this (made up but possible example):
(define ocaml-mirag= e ocaml-mirage-runtime)
------XRXHMPCXBWLZ7L4E4120PPVT4UJODO--