From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SISBJfRwu2P4cwAAbAwnHQ (envelope-from ) for ; Mon, 09 Jan 2023 02:42:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CECiJPRwu2OrPwAAG6o9tA (envelope-from ) for ; Mon, 09 Jan 2023 02:42:12 +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 54124AEE0 for ; Mon, 9 Jan 2023 02:42:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEhAL-0000Tb-TD; Sun, 08 Jan 2023 20:41:34 -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 1pEhAJ-0000T5-OZ for guix-devel@gnu.org; Sun, 08 Jan 2023 20:41:31 -0500 Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEhAH-00019d-Jj for guix-devel@gnu.org; Sun, 08 Jan 2023 20:41:31 -0500 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4NqxVv6NjSzDqgl; Mon, 9 Jan 2023 01:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1673228487; bh=c22x45eap3n3USzaeT1hI9qWbQWt7Wdj5WyrChxUxsU=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=NE41/z2+XyHJCNzmjGtaz5wqcDGTnHJSk3tH2zLzo7bMqE2EBhRNVR4nwP9i4h4LZ QmpcHnqMXBAyeDrlnM09dtxuAVThYDKKYHa1eS/7RK2RlD7Ykqj9UQNBS5NU8f/hX1 wRO5DbQhJGqdf2tbETF0F9DrjRqHV1kCqoxlOSZ4= X-Riseup-User-ID: B78880C0941E21D8F190CC5EC1671FAC6CB9E2E456D15BDED946F84F3905F5DE Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4NqxVv0rbfz5vRl; Mon, 9 Jan 2023 01:41:26 +0000 (UTC) References: <867cxxxgfv.fsf@riseup.net> <663DEABC-D27B-4E6F-B0E8-4B2ADF609F4A@lepiller.eu> <86fsck6bw4.fsf@riseup.net> From: Csepp To: Julien Lepiller Cc: Csepp , Guix Devel , pukkamustard Subject: Re: Packaging OCaml repositories that define multiple packages? Date: Mon, 09 Jan 2023 02:37:55 +0100 In-reply-to: <86fsck6bw4.fsf@riseup.net> Message-ID: <86tu10iiws.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673228532; 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=1hu0pLfRdZ1jmqMx9aBseSujnb5lPhOV5DgVzCyt1WY=; b=NjYtXyTRE0pgnCjsRoM2UNqyhQeh3iPWoHxkXvEknTzVkwQLH8OklgBgNVS5AOqyLTv4eM m/0Hc61BhmO8lH/Jj/TqYYxTwKWhbw5Jq+qZcmMz58vE8vL8+f8ccnM/VwbPPzseNk6/+S KqFM5AY2L5KFZS6B+pxP2zQLN3ep0zdRlbiFPB5q2KHD9M0sgNb14ePkwrRnmqI95r2guU LKaobwwVu+GDStnVxYeBn/GwmoM9TvMRob5NaWYE2iiTGyT0J/pWYyRXPt0lEKc6qODRh3 LAT7xIhfDoYoLvK2APGOxZZTy6vbocxEjtpAcXygrQjsI8yeta78WEv+JiB0NA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b="NE41/z2+"; 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=riseup.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673228532; a=rsa-sha256; cv=none; b=FHZvk3NMfYv45UsA08+jYidcTKj0WnZguXZhM78oin2doahCDqa7Yqvir3hXobJwPlUfCa HbnaJsfHDubh7jfcQNIuBM77ect9XzTfkkdwEXd5UsuSTGqlEKoXl3diwQ/7S8g0l0Sy6f C3sWRpE/2C2j6Nw3sYtt//R7GF43Z29QJn/r8DSumKfuEjbAJdE7PgcsJnkQuElhW0/Nae 62+H5A956GwZoGhv/tWdwysqjAGmqfmm4YaxSiQoJ6No1BTMqyhUZOVlBQzqYfCaB9I3Zk uIK+hV1v8Ntc7+ieJTApYVBzZLdkSalqaaMFFTw6OEuuDWVmiu46hC7h/jyo/w== X-Spam-Score: -5.37 X-Migadu-Queue-Id: 54124AEE0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b="NE41/z2+"; 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=riseup.net X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.37 X-TUID: mV9m7Mc8hAnH Csepp writes: > Thanks! Yeah, the alias solution was not pretty. Guess I'll use > inherits and set the package argument. > > Julien Lepiller writes: > >> The importer will not support such a package. As you say, it wants to >> build them separately because they are separate opam packages. So, >> either we build them separately too, or we build all at once. >> >> If we build all at once, that's fine. You could name the package >> ocaml-mirage and not use any #:package argument. Dune will then build >> all packages from the repository. >> >> One issue with that is that the importer will not know about it and will= try >> to import subpackages again whenever a packages depends on it, instead >> of using ocaml-mirage. >> >> I don't like the alias solution, though it should work, since the import= er >> would see them. >> >> Le 8 janvier 2023 15:04:35 GMT+01:00, Csepp >> a =C3=A9crit : >> >> 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. >> >> As an example look at https://github.com/mirage/mirage/ >> >> It defines functoria, functoria-runtime, mirage, and mirage-runtime. >> >> It is possible to build all 4 as one package. >> >> The opam importer seems to not be able to handle situations like this, >> since it defines a new package for each sub-package. >> >> 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. They look like this (made up but possible example): >> (define ocaml-mirage ocaml-mirage-runtime) Switching to bottom replying, I hope you don't mind. So, I converted most definitions to variants, as discussed. That covered all the packages that I introduced that had subpackages, like the {mirage,functoria}[-runtime] foursome. But there are packages that were added by others that already specify which subpackage they build, and yet seem to be accepted as subpackages. I worked around these using the somewhat aesthetically unpleasant aliasing solution.