GNU bug report logs - #74370
[PATCH 0/4] Module aware go build system, downloader

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Jørgen Kvalsvik <j@HIDDEN>; Keywords: patch; merged with #74371, #74372, #74373; dated Fri, 15 Nov 2024 21:12:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Merged 74370 74371 74372 74373. Request was from Hilton Chain <hako@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 21:11:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 16:11:42 2024
Received: from localhost ([127.0.0.1]:51072 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tC3bS-0000EN-9P
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 16:11:42 -0500
Received: from lists.gnu.org ([209.51.188.17]:48700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <j@HIDDEN>) id 1tC3bP-0000Dx-UG
 for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 16:11:40 -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 <j@HIDDEN>) id 1tC3bN-0002Bs-UW
 for guix-patches@HIDDEN; Fri, 15 Nov 2024 16:11:37 -0500
Received: from mx.kolabnow.com ([212.103.80.155])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <j@HIDDEN>) id 1tC3bE-00066B-0v
 for guix-patches@HIDDEN; Fri, 15 Nov 2024 16:11:31 -0500
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 7604C20B3659
 for <guix-patches@HIDDEN>; Fri, 15 Nov 2024 22:11:17 +0100 (CET)
Authentication-Results: ext-mx-out011.mykolab.com (amavis);
 dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:from:from:received
 :received:received; s=dkim20240523; t=1731705074; x=1733519475;
 bh=rVFtKXXdhSpqxJhEqDbaGWWcdpUrR3QtFWgh1hz7dnY=; b=dc5k+fTjFbFO
 oybpKtDUl3tKSG3Tzv6DdjohCdd9l4K6DhV7ApCICSoZ/h/pBTltfrPzZBw+0jrx
 HujleLySa4K4MIbPfYj7cEAJkN+LR/ppIEMw1asQfP+VRn2Y76dc4tTLCzZ01n5L
 CAen+qrAncD0hdcQeelCVKtig2YDYZkskdKfYA7/+B4pWiiz90Sk3yFOIi1mvl35
 c1Wg2ukVCIhrVxAdxciyZyY2kOzhS2Z2MRvrCKPhto/dVTDY3xBb1F3SN3/ENp9Z
 YoEOWZhZT8lSb/1CBI+3JDddnQMyEICeUNnlNGMeWLFBBZvyriqPRjyOFxK947fq
 3Ar8llfS0Q==
X-Virus-Scanned: amavis at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1
X-Spam-Level: 
X-Spam-Status: No, score=-1 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024)
 with ESMTP id Z0E3chYs8Gev for <guix-patches@HIDDEN>;
 Fri, 15 Nov 2024 22:11:14 +0100 (CET)
Received: from int-mx009.mykolab.com (unknown [10.9.13.9])
 by mx.kolabnow.com (Postfix) with ESMTPS id 056B620B3656
 for <guix-patches@HIDDEN>; Fri, 15 Nov 2024 22:11:12 +0100 (CET)
Received: from ext-subm010.mykolab.com (unknown [10.9.6.10])
 by int-mx009.mykolab.com (Postfix) with ESMTPS id AAACA2097183
 for <guix-patches@HIDDEN>; Fri, 15 Nov 2024 22:11:12 +0100 (CET)
From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= <j@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/4] Module aware go build system, downloader
Date: Fri, 15 Nov 2024 22:11:02 +0100
Message-Id: <20241115211106.2759121-1-j@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=212.103.80.155; envelope-from=j@HIDDEN;
 helo=mx.kolabnow.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= <j@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hi all,

I wrote a downloader+build system for go that is module aware.  It
builds on a few slightly different assumptions than the go build system,
but if you have worked on that most should feel familiar. I am posting
these patches to get some feedback and to check with you if this
approach is even viable, or if I should abandon it altogether. My real
goal has been to build hugo, a popular website generator, which has a
large list of dependencies, most of them in go.

Go itself has pretty strong ideas on how to compose systems. In
particular, it wants to statically link everything, pin every dependency
and transitive dependency (combining build system with packaging and
distribution), and strongly prefer full-source builds. This causes some
friction.

These patches chooses to just roll with it, and uses go mod
downloaditself to fetch sources and create a large image of all the
dependencies a project needs to build. This effectively makes it
pointless to package libraries, as the programs using the libraries
would get them from source anyway, but fixing that is future work.

There are a few things I would like to try to do (re-using built
libraries and storing each module in a separate derivation in
particular), but I don't want to tackle that problem unless there is
real interest for this approach.

Thoughts?

Jørgen Kvalsvik (4):
  guix: Add go module fetcher
  guix: add go module aware build system
  guix: Add module aware 'guix import go'
  gnu: Add go-buf.

 Makefile.am                        |   2 +
 gnu/packages/golang-xyz.scm        |  63 +++++++++---
 guix/build-system/go.scm           | 120 ++++++++++++++++++++++
 guix/build/go-mod-build-system.scm | 154 +++++++++++++++++++++++++++++
 guix/go-mod-download.scm           | 146 +++++++++++++++++++++++++++
 guix/import/go.scm                 |  88 ++++++++++-------
 guix/scripts/import/go.scm         |   6 ++
 7 files changed, 532 insertions(+), 47 deletions(-)
 create mode 100644 guix/build/go-mod-build-system.scm
 create mode 100644 guix/go-mod-download.scm


base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
-- 
2.39.5





Acknowledgement sent to Jørgen Kvalsvik <j@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#74370; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.