From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EBBeLFmHf2DvFgEAgWs5BA (envelope-from ) for ; Wed, 21 Apr 2021 04:00:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2GocKFmHf2D/FQAAB5/wlQ (envelope-from ) for ; Wed, 21 Apr 2021 02:00:57 +0000 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 3EC34104DC for ; Wed, 21 Apr 2021 04:00:57 +0200 (CEST) Received: from localhost ([::1]:44548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZ2Ah-0006Nq-UI for larch@yhetil.org; Tue, 20 Apr 2021 22:00:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZ2A9-0006NX-A4 for guix-devel@gnu.org; Tue, 20 Apr 2021 22:00:21 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:37793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZ2A7-0001wX-85 for guix-devel@gnu.org; Tue, 20 Apr 2021 22:00:21 -0400 Received: by mail-qt1-x832.google.com with SMTP id o2so16813764qtr.4 for ; Tue, 20 Apr 2021 19:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=qeWhDdSbnZ+zsZhpk1dfDe7h07EMrcmM40usXyT1kVc=; b=faxA1Zmw5k4t3MnX+lWt62EjLiuWhun+Gc0bLB/tooBXrug8a/85QStxCoqeRIYwJa V82veSyk1NFXRJb6peg5pDf4p7yi0GdEGAtJ4AcmWk/4rSGHdgxZAvECuWdicTHyhhsL 0+DBBeWY7pLZ7A1RjwMHbwogPzhpcI1S82vHijksSSSarvsJruw2SR2U+vuuirJ5xl+P Tml7NykiyTKAZhTgOfR3t7OapWd4qQQo7Uy+E1wXr7gtxLyVULqBYxhEIJhjgyA2QHiS /TreKqKs69Acc5utEjc4tceg4bhDyKT/AYpsS9SEZAPcqUduMVCGobfauKiiIsp/k7fz zzZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=qeWhDdSbnZ+zsZhpk1dfDe7h07EMrcmM40usXyT1kVc=; b=bjocl4g1f+bOWqBS6v1OIXIZZTcImYFPOBz8uSb3kEI4GGZi6RnY6cTqCGDOjcFhKL nSRK0RQqr4XGdsfXRXjHpAcEoBinGzh7BwwEYQ2EfVD1/rzM8CyIALRviGNKDLm0IAmH dRvv9u2ELb0Cn0XwGWMW4nEMd+cLUai3BX2ft4ltHDocOL9atEfjLcsIJabpRHyhcxgr K4YQdR1qicE55pgXLsA8AuvBTWWpR2HQL0TVlH4s2mer/Oe7dD5fWFT2IRWmCJH4ee3k T+O6K6UFWjZAfNTF97yFbr3001qZXwMojJTuxSEhhRuRAk3jIkzOfYmO+1saQg05LL13 ASqw== X-Gm-Message-State: AOAM530/37FACuqhPgXAtBWGUOlNTclgLONp8bWseCMgYnvr2QFSK+K8 aYotKRExJUKJvoUhvPAo7hRBviopSJc/3w== X-Google-Smtp-Source: ABdhPJwim8AcgoYHsMcFj5l3ysAJzOe7MHGvFSBl+dGQ2c4t79sjMCy6yB12rCZmNvKwndBx9Qh3+w== X-Received: by 2002:ac8:71d4:: with SMTP id i20mr20062518qtp.286.1618970416812; Tue, 20 Apr 2021 19:00:16 -0700 (PDT) Received: from hurd (dsl-205-151-56-5.b2b2c.ca. [205.151.56.5]) by smtp.gmail.com with ESMTPSA id g3sm522137qtj.44.2021.04.20.19.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 19:00:16 -0700 (PDT) From: Maxim Cournoyer To: =?utf-8?Q?Fran=C3=A7ois?= Subject: Re: go-build-system possible improvments References: <87eeg7vn3d.fsf@gmail.com> <20210414120939.mmvprjaz6636kz4h@noop.avalenn.eu> <87czusjtpc.fsf@gmail.com> <20210418103153.uvxb5jlnliq3rzua@noop.avalenn.eu> Date: Tue, 20 Apr 2021 22:00:15 -0400 In-Reply-To: <20210418103153.uvxb5jlnliq3rzua@noop.avalenn.eu> (=?utf-8?Q?=22Fran=C3=A7ois=22's?= message of "Sun, 18 Apr 2021 12:31:53 +0200") Message-ID: <87r1j4e6s0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x832.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618970457; 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=qeWhDdSbnZ+zsZhpk1dfDe7h07EMrcmM40usXyT1kVc=; b=sCtrGXZnQqzTmby8u8RYdWRaTLfXZYx0aOAH+0jgGb8bNNtvR1W6rzhvTKoIvWR/AoBxiD xHpC1xqjc3DKWnRuoP3v/FD6vEfRE5qzcPmeORUJcWTJBbeQzQG8dYQ4s0R5EXRCjcRUos PlRdhP5yeJrRh8WqRIn/HYCK0ULm+oP8EFRq1GmQEZKqafrkkS3Hbf810r5FKuXboJ/ue+ RiCAPGg9h0rRoj/N1gPw4CTp6m0+iu53jKqsm29oMppiYIlsFkrwy/oVRaDJEkPm0IfBEk 8w9/nSbObP3wR3lVEKMHyk0XodKAom1CUkoRvasV4LSdH4WV67cocRW/ckkIrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618970457; a=rsa-sha256; cv=none; b=q2WXbGB2k5AFHf3G9T/sZU8vdSbQHO0kqs0pFGdG6ASyZ+gwf/HocBwQrNNrS5OzPEmQBL pEYyUEjogt6+HeDXyGuaSo/8twsiiXxkIywtyyUn4hOPhy5IppYBV5idHS1/8BVk3WDhxN xZtJT36Sm7rls3urwF9RrJOvqoMtVolVMooXJ1pZrPAag4AJzhRVxWlwDczZPLxc6BWyPI GhZiQPQagvd/EjjgWwEckub7HgK1skizE8zxiebyYOEhFBHBfTfKqX0VOb5kKsZVfuFGyf 1Qu9oE+Gi7EBXEQBt4B5FOczFf7xOcFV5WmDggm/NG9hlmlhen2ycO4La9tFSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=faxA1Zmw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=faxA1Zmw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 3EC34104DC X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: NaQ1TjWIsYpf Hi Fran=C3=A7ois, Fran=C3=A7ois writes: > Hello, > > I come back to public guix-devel as I think it can be of interest to > others too. > > On Sat, Apr 17, 2021 at 08:57:03PM -0400, Maxim Cournoyer wrote: >> JOULAUD Fran=C3=A7ois writes: >> >> > I am still unsure of what to do with versions and Go but the ability to >> > pin version will surely be useful in some way. >> >> Yeah, I was expecting it might unlock building the new protobuf package >> especially a couple version backs, it had a really messy dependency >> chain including past versions of itself, but it turns out that for now >> the bigger problem is the lack of support for Go modules. > > Yes. This is the biggest lock. Supporting go modules will really unlock > a lot of things. [...] > I just made a lot of reading this week-end and I was more oriented towards > using GOPROXY=3Doff and populating on-disk [module cache] which have the > exact same organisation as GOPROXY as it is indeed the last layer of > proxying. If it works it will avoid the need for a specific local server. That'd be nice! > Concerning the former dependeency loop with google-protobuf it was > (before 1.26) indeed necessary to have all go.mod files for all versions > referenced recursively. Go downloads (or need to have in cache) only > the go.mod files though because once it have the go.mod the [Minimal > Version Selection] kicks in and keep only the higher version > requested[^1]. > > So we could cheat by putting only go.mod files for older versions in > out local cache without the need for anything else and it should work. > > The same thing applies to conditional compilation. Go needs the go.mod > files but don't need the code itself until it tries to compiles it. > > So we have probably a safe way to import those packages without too > many useless packages in our dependency graph even if it can require a > solution to easily add specific go.mod files in our outputs. Interesting ideas! I didn't know that. My high level idea was to mimic GOPATH but with GOPROXY; instead of source files, we'd have the metadata + zip (sources) populated in a given directory (say, the gocache/ subdirectory) of every Go package in Guix, and then could build a union of these various directories into one (matching the expected GOPROXY file layout) in the Go build system and profile hook. > They, at Go, are nevertheless [working][lazy-loading] to modify this > behaviour in order to avoid useless network calls to GOPROXY but it > could not land in Go 1.15. It should be there in next release. You meant Go 1.16, right? I'm happy if they're working to simplify this. > P.P.S. other solution, perhaps simpler is to not support go.mod at all > (GO11MODULE=3Doff) and to populate the local GOPATH as we see fit. I think > (but I am not sure) that Debian took this route. Not found of this > solution, I think we have the means to do better in Guix and to keep > more in touch with upstream methodologies. That's exactly what we're doing now (disable Go module with GO11MODULE=3Doff and use GOPATH to find the sources). Debian does something lazy like just calling 'go module vendor', which builds a huge directory filled with all the sources needed. So does Nix. Only Gentoo goes to some length, from what I had seen last I check. Thank you, Maxim