From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sAeeIjy5N2doHwEA62LTzQ:P1 (envelope-from ) for ; Fri, 15 Nov 2024 21:12:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sAeeIjy5N2doHwEA62LTzQ (envelope-from ) for ; Fri, 15 Nov 2024 22:12:28 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DxFpcm79; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20240523 header.b=dc5k+fTj; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731705148; 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:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=rVFtKXXdhSpqxJhEqDbaGWWcdpUrR3QtFWgh1hz7dnY=; b=WSkCJxstpumn196WyN7DAVp5+L24lWtoTLlA9AWSnMj5VO+mpXl/S0NhySN2ig5H4xTfsx yk7wgzZZCmHprdPy8rtxGO1bLG1H5wT3cYQWmVTeKnYjFmmKSuYqo1smt4pTiXStpKK+la KcXs1mE3okoPI3rj+4V5Fhmf+maiiN4ejrsB9wGDAORGQNkK9fVTXjvtKBqN+ylfLcO1U3 p2N9IPY5/XD9uVD0g5/2PTeOugKudjOfov3KjKoRA/jHu4KbQcd5LI1nvkaBJJq1e8qY9j e14lT4dMmz44PmAOlxdqCWixS9nLJSjYFzM3B70rxjnT/zTnwCwFzvCPx/958g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731705148; a=rsa-sha256; cv=none; b=FWO96cStNlk0kQm1n+M3yzHL1M4UhTPXJpDJfDPms0D775XYGrKyRsJ+AzSREXKeQA8Cc1 2gSrhugEGE9tjx54bTpSqyi+hr5JXkyn++DyYPNGNJIeH9D0X/W2sR1ZeCiL/sP8o4z/Iz tJvun7/oa2lLphcM9DC5URRaAb8ZFAb/6MDv8me3hD/uOSPbP1IWvQIJ+nwW+d3FVYgmCi J7m//SA4/WxeiFPGQOdqGUklS3GI3eyNkkD6MelQHrIEqA107u7S8273Rzxu70QJtV0er+ e+RUVP14xjvHs3yEBTKaBHVjZjczOrj1fcON2Pe7Z1VPwcywhoRkdYTyFjpSpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DxFpcm79; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20240523 header.b=dc5k+fTj; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none 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 07F2A78C5C for ; Fri, 15 Nov 2024 22:12:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tC3bo-0002Dv-L7; Fri, 15 Nov 2024 16:12:04 -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 1tC3bm-0002DS-Jb for guix-patches@gnu.org; Fri, 15 Nov 2024 16:12:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tC3bm-00069F-Ak for guix-patches@gnu.org; Fri, 15 Nov 2024 16:12:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=rVFtKXXdhSpqxJhEqDbaGWWcdpUrR3QtFWgh1hz7dnY=; b=DxFpcm79eHKgtkW3NrpVAwyBsYt1Kd6vQ+9+j6TUFXCtZxjsnTiwOcHNGfSKrKJw68HN7LbGrZuKeJ0K7E8nT6dO1hIfH/9Z/LMdgcyR2eaj/dG6d873tbDT+1CIQaJiZePgxB9Vgfgb1Zu3SL5vDAzgeut9xgRMeZfOtT6faEasxhyoHBF/EhQ4Jhr0mCg8B+6uOsr7+kUjqgg/u1AlgMzqu7J45uGZ0vwyhshqCd5Ee8tyo2yuqPqYcskUG8anDq8DiBHcWfVufVWZKTg72LjA5ADMfs+rP8tcQkX6zpORGOxB9A6XPEruLSjZJ5ys7YYzMXQFQl2Z5fA6TwiZJg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tC3bm-0000Fo-5L for guix-patches@gnu.org; Fri, 15 Nov 2024 16:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74370] [PATCH 0/4] Module aware go build system, downloader Resent-From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Nov 2024 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74370 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74370@debbugs.gnu.org Cc: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1731705102897 (code B ref -1); Fri, 15 Nov 2024 21:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 21:11:42 +0000 Received: from localhost ([127.0.0.1]:51072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bS-0000EN-9P for submit@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 ) id 1tC3bP-0000Dx-UG for submit@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 ) id 1tC3bN-0002Bs-UW for guix-patches@gnu.org; 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 ) id 1tC3bE-00066B-0v for guix-patches@gnu.org; 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 ; Fri, 15 Nov 2024 22:11:17 +0100 (CET) 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 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 ; 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 ; 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 ; Fri, 15 Nov 2024 22:11:12 +0100 (CET) From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Date: Fri, 15 Nov 2024 22:11:02 +0100 Message-Id: <20241115211106.2759121-1-j@lambda.is> 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@lambda.is; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.29 X-Spam-Score: -4.29 X-Migadu-Queue-Id: 07F2A78C5C X-Migadu-Scanner: mx13.migadu.com X-TUID: XoqHWkQte/Y8 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