From unknown Sat Aug 16 18:46:51 2025 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) 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 ; 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-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 01 18:47:31 2024 Received: (at control) by debbugs.gnu.org; 1 Dec 2024 23:47:31 +0000 Received: from localhost ([127.0.0.1]:53474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHtf1-0008NV-Ed for submit@debbugs.gnu.org; Sun, 01 Dec 2024 18:47:31 -0500 Received: from mx.boiledscript.com ([88.99.243.112]:35006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHtey-0008NL-7h for control@debbugs.gnu.org; Sun, 01 Dec 2024 18:47:29 -0500 Date: Mon, 02 Dec 2024 07:47:24 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1733096846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=p7iOxYbnPUsxQMq3kP5FPLnk7dDMGTF4JyJ9qg4htUM=; b=dAertMwK+PoZC3YIx0iAGKtoZtdChPp4FzM6HXCCX3gDajfW/yAYoYMY0OkBSwhTE3esvw BbKrtAqlIy9cXX2YJKe3AWPw8CNLu9fLmKwBvVYcK2YfZKrxoDb4AGHhfdDlXkM6/FA7bV isxBCmbJzmKnWrOXfQFB3j3ugSyDZ76Yf11cfDrHeWP+OqkJadWbwjcj1hBt40Jw6LQAcL iFSuyJ1qHBg9q5F17cCUXdzP1bBwfLkS3c/TQgffBY5FWDu+eS6lQWGGppGJfnN0P8WloJ LQHbfCRZEYndRMRGNoNYXngDTun2iylRZ5j+duJDO7hJsoF3HxvPvgGV+06GBQ== Message-ID: <87zflfdkz7.wl-hako@ultrarare.space> From: Hilton Chain To: control@debbugs.gnu.org Subject: Control message for 74370. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 74370 74371 74372 74373 quit From unknown Sat Aug 16 18:46:51 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74370] Module aware go build system (for Guix) References: <20241115211106.2759121-1-j@lambda.is> In-Reply-To: <20241115211106.2759121-1-j@lambda.is> Resent-From: Steve George Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Apr 2025 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74370 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74370-submitter@debbugs.gnu.org Cc: 74370@debbugs.gnu.org, Sharlatan Hellseher Received: via spool by 74370-submit@debbugs.gnu.org id=B74370.174411741920318 (code B ref 74370); Tue, 08 Apr 2025 13:04:02 +0000 Received: (at 74370) by debbugs.gnu.org; 8 Apr 2025 13:03:39 +0000 Received: from localhost ([127.0.0.1]:59877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u28c7-0005HU-0z for submit@debbugs.gnu.org; Tue, 08 Apr 2025 09:03:39 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:38442) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u28c2-0005GK-Qr; Tue, 08 Apr 2025 09:03:36 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u28bt-00EsAN-Hg; Tue, 08 Apr 2025 15:03:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=futurile.net; s=selector1; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=0p4AgVpl4UFyxugp2UurgKqi6HT//WWu/vQ0bMBrbGg=; b=cJj6u65IiRVSbWOax/XCnJKg0D D8CJhs8eLvON7yG3wF0rQre4xJQAxmSklVVaXA/abb4YM7h6H/BIx7IwQl8mPOdEsnfJgcOXCAqwz WWk4B0B56qVLLq9fzUz7yLFEbNcr/oWPU69PR29d8q9GmuPE3ItyvB6TiFNBpH5zIslYYLYxEX77v ppJZ9Yra2mupKF1bme43uAMu5vacjsopRawS2QyJ3agLgfWNK1kbCtSEGb93PyqTrMKzPEDF+Ngtd tP/As/JWIMFPbSQuh3KQqn9tShmvEwezzaqpHLSyaneOSpdYsy2hnzxBmAFe/hmhyGEfIvLY9xhe9 cTsc4Mzw==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u28bs-0001Ez-RR; Tue, 08 Apr 2025 15:03:25 +0200 Received: by submission02.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u28bs-00Dih5-0r; Tue, 08 Apr 2025 15:03:24 +0200 Date: Tue, 8 Apr 2025 14:03:22 +0100 From: Steve George Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Jørgen, You submitted a module aware go build system, there were some queries about it from Sharlatan as there's been a range of attempts at improving this area. Just making you aware so you can reply if you're still interested: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74370 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74374 I don't think you were notified as responses have to go to NNNN-submitter for the original reporter to be send the email. Thanks, Futurile / Steve From unknown Sat Aug 16 18:46:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Subject: bug#74370: closed (Re: bug#74370: Module aware go build system (for Guix)) Message-ID: References: <20241115211106.2759121-1-j@lambda.is> X-Gnu-PR-Message: they-closed 74370 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 74370@debbugs.gnu.org Date: Tue, 08 Apr 2025 13:51:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1744120262-8345-1" This is a multi-part message in MIME format... ------------=_1744120262-8345-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74370: [PATCH 0/4] Module aware go build system, downloader which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74370@debbugs.gnu.org. --=20 74370: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74370 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744120262-8345-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74370-done) by debbugs.gnu.org; 8 Apr 2025 13:50:25 +0000 Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u29LM-00027A-DV for submit@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:24 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:33442) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u29LD-00021d-Nt for 74370-done@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u29L2-00EyF6-Mi; Tue, 08 Apr 2025 15:50:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=futurile.net; s=selector1; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=ulURmkUQmsb4mmRwyXOTrrD/YJd0raqw/jv8zfAds8Y=; b=Y4hGcx2o7I3gynp4rV9lI3xjDg awaF941b2txDc/ZLx0wX8FcZRBg0gIJ4CuLWW81nn5GXu14FZjDA7PjkMTnvp40Z8rVEikRiJbBwk sAl/xSldcaEJqVVc5WFg9xuO9PdjGlmtfj7iPRWtC3qeHvgJYmYqyU6Ub4iwd06kOMXC9BGWYHzez PyqyS7p/SvDlJoZ2Qmo5HtjeDej2x2mfVczfZ/bO3wCW9dGA+JdjCZoY+pahi3evad6WCTcy5J5Dn x9vIya0XD++6tahhZgOaTMoZ0t+GLofYjvI6eyNbR17JvJ99Oeqn3/ONdzw+o/uiezbRBVTQcQc45 Jx018Dxw==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u29L1-0005Li-Bl; Tue, 08 Apr 2025 15:50:04 +0200 Received: by submission01.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u29Kn-00EVZe-UD; Tue, 08 Apr 2025 15:49:50 +0200 Date: Tue, 8 Apr 2025 14:49:48 +0100 From: Steve George To: J??rgen Kvalsvik , sharlatanus@gmail.com Subject: Re: bug#74370: Module aware go build system (for Guix) Message-ID: References: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74370-done Cc: 74370-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I think there's a common misunderstanding that if you comment on a bug it won't actually notify the submitter (you have to email NNNN-submitter). It's because debbugs was modelled on the idea that there's an "end-user" who's only interest is the initial submission and a final nnnn-done@ email to tell them it's all solved now! OK, I'm closing #74370. Then you can create a new one when you submit you're new and improved one. Hopefully you and Sharlatan can collaborate on this! Futurile / Steve On 8 Apr, J??rgen Kvalsvik wrote: > Hi, > > I don't know what happened, but as you point out I never received > Sharlatan's emails. > > Anyways, there is still interest, but the approach I proposed is not great. > I have since (re)written the module aware build system with much better > results. I am currently adding a bunch of packages (for my own needs) in > order to get some experience with it and sand down some rough edges, before > I plan to resubmit the new build system upstream. > > Thanks, > J??rgen > > On 4/8/25 15:03, Steve George wrote: > > Hi J??rgen, > > > > You submitted a module aware go build system, there were some queries about it from Sharlatan as there's been a range of attempts at improving this area. Just making you aware so you can reply if you're still interested: > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74370 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74374 > > > > I don't think you were notified as responses have to go to NNNN-submitter for the original reporter to be send the email. > > > > Thanks, > > > > Futurile / Steve > > > > > ------------=_1744120262-8345-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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) 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 ; 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=20Kvalsvik?= To: guix-patches@gnu.org 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@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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ------------=_1744120262-8345-1-- From unknown Sat Aug 16 18:46:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Subject: bug#74371: closed (Re: bug#74370: Module aware go build system (for Guix)) Message-ID: References: <20241115211106.2759121-4-j@lambda.is> X-Gnu-PR-Message: they-closed 74371 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 74371@debbugs.gnu.org Date: Tue, 08 Apr 2025 13:51:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1744120262-8345-3" This is a multi-part message in MIME format... ------------=_1744120262-8345-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74370: [PATCH 3/4] guix: Add module aware 'guix import go' which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74371@debbugs.gnu.org. --=20 74370: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74370 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744120262-8345-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74370-done) by debbugs.gnu.org; 8 Apr 2025 13:50:25 +0000 Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u29LM-00027A-DV for submit@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:24 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:33442) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u29LD-00021d-Nt for 74370-done@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u29L2-00EyF6-Mi; Tue, 08 Apr 2025 15:50:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=futurile.net; s=selector1; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=ulURmkUQmsb4mmRwyXOTrrD/YJd0raqw/jv8zfAds8Y=; b=Y4hGcx2o7I3gynp4rV9lI3xjDg awaF941b2txDc/ZLx0wX8FcZRBg0gIJ4CuLWW81nn5GXu14FZjDA7PjkMTnvp40Z8rVEikRiJbBwk sAl/xSldcaEJqVVc5WFg9xuO9PdjGlmtfj7iPRWtC3qeHvgJYmYqyU6Ub4iwd06kOMXC9BGWYHzez PyqyS7p/SvDlJoZ2Qmo5HtjeDej2x2mfVczfZ/bO3wCW9dGA+JdjCZoY+pahi3evad6WCTcy5J5Dn x9vIya0XD++6tahhZgOaTMoZ0t+GLofYjvI6eyNbR17JvJ99Oeqn3/ONdzw+o/uiezbRBVTQcQc45 Jx018Dxw==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u29L1-0005Li-Bl; Tue, 08 Apr 2025 15:50:04 +0200 Received: by submission01.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u29Kn-00EVZe-UD; Tue, 08 Apr 2025 15:49:50 +0200 Date: Tue, 8 Apr 2025 14:49:48 +0100 From: Steve George To: J??rgen Kvalsvik , sharlatanus@gmail.com Subject: Re: bug#74370: Module aware go build system (for Guix) Message-ID: References: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74370-done Cc: 74370-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I think there's a common misunderstanding that if you comment on a bug it won't actually notify the submitter (you have to email NNNN-submitter). It's because debbugs was modelled on the idea that there's an "end-user" who's only interest is the initial submission and a final nnnn-done@ email to tell them it's all solved now! OK, I'm closing #74370. Then you can create a new one when you submit you're new and improved one. Hopefully you and Sharlatan can collaborate on this! Futurile / Steve On 8 Apr, J??rgen Kvalsvik wrote: > Hi, > > I don't know what happened, but as you point out I never received > Sharlatan's emails. > > Anyways, there is still interest, but the approach I proposed is not great. > I have since (re)written the module aware build system with much better > results. I am currently adding a bunch of packages (for my own needs) in > order to get some experience with it and sand down some rough edges, before > I plan to resubmit the new build system upstream. > > Thanks, > J??rgen > > On 4/8/25 15:03, Steve George wrote: > > Hi J??rgen, > > > > You submitted a module aware go build system, there were some queries about it from Sharlatan as there's been a range of attempts at improving this area. Just making you aware so you can reply if you're still interested: > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74370 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74374 > > > > I don't think you were notified as responses have to go to NNNN-submitter for the original reporter to be send the email. > > > > Thanks, > > > > Futurile / Steve > > > > > ------------=_1744120262-8345-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 21:11:44 +0000 Received: from localhost ([127.0.0.1]:51074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bS-0000EP-O3 for submit@debbugs.gnu.org; Fri, 15 Nov 2024 16:11:43 -0500 Received: from lists.gnu.org ([209.51.188.17]:48698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bQ-0000Du-7I 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-0002Bq-Sr 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 1tC3bD-00066X-V5 for guix-patches@gnu.org; Fri, 15 Nov 2024 16:11:32 -0500 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 4F5653069A98 for ; Fri, 15 Nov 2024 22:11:19 +0100 (CET) Authentication-Results: ext-mx-out013.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:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1731705075; x=1733519476; bh=YaH4k+uq5KG+RAgyIBwT+Nc4HUwgRX/GbVCcqH+6cO4=; b=nwUM5Gb+Q3O2 OFgQNulbdmbi5Kt7KXG3Tftna1cLWmx7AN0+AujHRKl+qmMH9wZG3Lv3rK2JPqAy jn2FMLYK1EdZUEDlDQve2rDGD4Y9co4lgRlu+T/61oCnoIZeob7mPG45yFLiE/8g Y1tWiJPJ2AQwHKUjZ6LMAozTwy2cOA12OSj1bPvlFfh2yla4DvZQLPk8/WkdRgMt MD4aAKe2bgsr7QV+yHiVvh85Z5YNSoAHp2z+A84T54rYGVAbpJOEqEjKgGxKFSxE EVrHv7BWTM8DhbK5/V57hz1jMNB7LWp4V9ZALpIiZ1tPK3VgBVV4BYeVPsSfJvvf 0GNnZbxIHA== X-Virus-Scanned: amavis at mykolab.com X-Spam-Flag: NO X-Spam-Score: -0.99 X-Spam-Level: X-Spam-Status: No, score=-0.99 tagged_above=-10 required=5 tests=[ALL_TRUSTED=-1, T_FILL_THIS_FORM_SHORT=0.01] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out013.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id MNYmo643scnZ for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id BD0103069A9C for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id 762582097185 for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= To: guix-patches@gnu.org Subject: [PATCH 3/4] guix: Add module aware 'guix import go' Date: Fri, 15 Nov 2024 22:11:05 +0100 Message-Id: <20241115211106.2759121-4-j@lambda.is> In-Reply-To: <20241115211106.2759121-1-j@lambda.is> References: <20241115211106.2759121-1-j@lambda.is> MIME-Version: 1.0 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, T_FILL_THIS_FORM_SHORT=0.01 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?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Emit module aware package go packages. It does not compute the hash of the full module yet, and only supports git, but goes a long way towards making it easy to package new go programs using the module-aware build system. * guix/import/go.scm (go-module->guix-package): Add go.mod awareness * guix/scripts/import/go.scm (show-help): Document -m, --mod (%options): Accept them. Change-Id: I4efd7260d69276279940e21698ecc7eb57232a67 --- guix/import/go.scm | 88 ++++++++++++++++++++++++-------------- guix/scripts/import/go.scm | 6 +++ 2 files changed, 61 insertions(+), 33 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index dd9298808d..967aa54d58 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -615,6 +615,7 @@ (define (validate-version version available-versions module-path) (define* (go-module->guix-package module-path #:key (goproxy "https://proxy.golang.org") version + go-mod? pin-versions? #:allow-other-keys) "Return the package S-expression corresponding to MODULE-PATH at VERSION, a Go package. @@ -641,43 +642,62 @@ (define* (go-module->guix-package module-path #:key (meta-data (fetch-module-meta-data root-module-path)) (vcs-type (module-meta-vcs meta-data)) (vcs-repo-url (module-meta-data-repo-url meta-data goproxy)) + (home-page (format #f "https://~a" root-module-path)) (synopsis (go-package-synopsis module-path)) - (description (go-package-description module-path)) - (licenses (go-package-licenses module-path))) - (values - `(package - (name ,guix-name) - (version ,(strip-v-prefix version*)) - (source - ,(vcs->origin vcs-type vcs-repo-url version*)) - (build-system go-build-system) - (arguments - (list ,@(if (version>? min-go-version (package-version (go-package))) - `(#:go ,(string->number min-go-version)) - '()) - #:import-path ,module-path - ,@(if (string=? module-path-sans-suffix root-module-path) - '() - `(#:unpack-path ,root-module-path)))) - ,@(maybe-propagated-inputs - (map (match-lambda - ((name version) - (go-module->guix-package-name name (strip-v-prefix version))) - (name - (go-module->guix-package-name name))) - dependencies)) - (home-page ,(format #f "https://~a" root-module-path)) - (synopsis ,synopsis) - (description ,(and=> description beautify-description)) - (license ,(match (list->licenses licenses) + (description (and=> (go-package-description module-path) beautify-description)) + (licenses (go-package-licenses module-path)) + (license (match (list->licenses licenses) (() #f) ;unknown license - ((license) ;a single license - license) + ((license) license) ;a single license ((license ...) ;a list of licenses `(list ,@license))))) - (if pin-versions? - dependencies+versions - dependencies)))) + (if go-mod? + (values + `(package + (name ,guix-name) + (version ,(strip-v-prefix version*)) + (source + (origin + (method go-mod-fetch) + (uri (go-mod-reference + (source ,(vcs->origin vcs-type vcs-repo-url version*)))) + (sha256 + (base32 + ;; FIXME: fetch & compute checksum + "0000000000000000000000000000000000000000000000000000")))) + (build-system go-mod-build-system) + (home-page ,home-page) + (synopsis ,synopsis) + (description ,description) + (license ,license))) + (values + `(package + (name ,guix-name) + (version ,(strip-v-prefix version*)) + (source ,(vcs->origin vcs-type vcs-repo-url version*)) + (build-system go-build-system) + (arguments + (list ,@(if (version>? min-go-version (package-version (go-package))) + `(#:go ,(string->number min-go-version)) + '()) + #:import-path ,module-path + ,@(if (string=? module-path-sans-suffix root-module-path) + '() + `(#:unpack-path ,root-module-path)))) + ,@(maybe-propagated-inputs + (map (match-lambda + ((name version) + (go-module->guix-package-name name (strip-v-prefix version))) + (name + (go-module->guix-package-name name))) + dependencies)) + (home-page ,home-page) + (synopsis ,synopsis) + (description ,description) + (license ,license) + (if pin-versions? + dependencies+versions + dependencies)))))) (define go-module->guix-package* (lambda args @@ -699,6 +719,7 @@ (define go-module->guix-package* (define* (go-module-recursive-import package-name #:key (goproxy "https://proxy.golang.org") version + go-mod? pin-versions?) (recursive-import @@ -709,6 +730,7 @@ (define* (go-module-recursive-import package-name (receive (package-sexp dependencies) (go-module->guix-package* name #:goproxy goproxy #:version version + #:go-mod? go-mod? #:pin-versions? pin-versions?) (values package-sexp dependencies)))) #:guix-name go-module->guix-package-name diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm index b90c6ac72f..a12c3a9b2f 100644 --- a/guix/scripts/import/go.scm +++ b/guix/scripts/import/go.scm @@ -50,6 +50,8 @@ (define (show-help) (display (G_ " -h, --help display this help and exit")) (display (G_ " + -m, --mod generate go-module based packages")) + (display (G_ " -r, --recursive generate package expressions for all Go modules that are not yet in Guix")) (display (G_ " @@ -65,6 +67,9 @@ (define %options (lambda args (show-help) (exit 0))) + (option '(#\m "mod") #f #f + (lambda (opt name arg result) + (alist-cons 'go-mod? #t result))) (option '(#\r "recursive") #f #f (lambda (opt name arg result) (alist-cons 'recursive #t result))) @@ -106,6 +111,7 @@ (define (parse-options) (let ((arguments (list name #:goproxy (assoc-ref opts 'goproxy) #:version version + #:go-mod? (assoc-ref opts 'go-mod?) #:pin-versions? (assoc-ref opts 'pin-versions?)))) (if (assoc-ref opts 'recursive) -- 2.39.5 ------------=_1744120262-8345-3-- From unknown Sat Aug 16 18:46:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Subject: bug#74372: closed (Re: bug#74370: Module aware go build system (for Guix)) Message-ID: References: <20241115211106.2759121-2-j@lambda.is> X-Gnu-PR-Message: they-closed 74372 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 74372@debbugs.gnu.org Date: Tue, 08 Apr 2025 13:51:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1744120263-8345-5" This is a multi-part message in MIME format... ------------=_1744120263-8345-5 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74370: [PATCH 1/4] guix: Add go module fetcher which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74372@debbugs.gnu.org. --=20 74370: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74370 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744120263-8345-5 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74370-done) by debbugs.gnu.org; 8 Apr 2025 13:50:25 +0000 Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u29LM-00027A-DV for submit@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:24 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:33442) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u29LD-00021d-Nt for 74370-done@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u29L2-00EyF6-Mi; Tue, 08 Apr 2025 15:50:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=futurile.net; s=selector1; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=ulURmkUQmsb4mmRwyXOTrrD/YJd0raqw/jv8zfAds8Y=; b=Y4hGcx2o7I3gynp4rV9lI3xjDg awaF941b2txDc/ZLx0wX8FcZRBg0gIJ4CuLWW81nn5GXu14FZjDA7PjkMTnvp40Z8rVEikRiJbBwk sAl/xSldcaEJqVVc5WFg9xuO9PdjGlmtfj7iPRWtC3qeHvgJYmYqyU6Ub4iwd06kOMXC9BGWYHzez PyqyS7p/SvDlJoZ2Qmo5HtjeDej2x2mfVczfZ/bO3wCW9dGA+JdjCZoY+pahi3evad6WCTcy5J5Dn x9vIya0XD++6tahhZgOaTMoZ0t+GLofYjvI6eyNbR17JvJ99Oeqn3/ONdzw+o/uiezbRBVTQcQc45 Jx018Dxw==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u29L1-0005Li-Bl; Tue, 08 Apr 2025 15:50:04 +0200 Received: by submission01.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u29Kn-00EVZe-UD; Tue, 08 Apr 2025 15:49:50 +0200 Date: Tue, 8 Apr 2025 14:49:48 +0100 From: Steve George To: J??rgen Kvalsvik , sharlatanus@gmail.com Subject: Re: bug#74370: Module aware go build system (for Guix) Message-ID: References: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74370-done Cc: 74370-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I think there's a common misunderstanding that if you comment on a bug it won't actually notify the submitter (you have to email NNNN-submitter). It's because debbugs was modelled on the idea that there's an "end-user" who's only interest is the initial submission and a final nnnn-done@ email to tell them it's all solved now! OK, I'm closing #74370. Then you can create a new one when you submit you're new and improved one. Hopefully you and Sharlatan can collaborate on this! Futurile / Steve On 8 Apr, J??rgen Kvalsvik wrote: > Hi, > > I don't know what happened, but as you point out I never received > Sharlatan's emails. > > Anyways, there is still interest, but the approach I proposed is not great. > I have since (re)written the module aware build system with much better > results. I am currently adding a bunch of packages (for my own needs) in > order to get some experience with it and sand down some rough edges, before > I plan to resubmit the new build system upstream. > > Thanks, > J??rgen > > On 4/8/25 15:03, Steve George wrote: > > Hi J??rgen, > > > > You submitted a module aware go build system, there were some queries about it from Sharlatan as there's been a range of attempts at improving this area. Just making you aware so you can reply if you're still interested: > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74370 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74374 > > > > I don't think you were notified as responses have to go to NNNN-submitter for the original reporter to be send the email. > > > > Thanks, > > > > Futurile / Steve > > > > > ------------=_1744120263-8345-5 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 21:11:45 +0000 Received: from localhost ([127.0.0.1]:51077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bT-0000Eb-OG for submit@debbugs.gnu.org; Fri, 15 Nov 2024 16:11:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:48708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bQ-0000Dz-6V for submit@debbugs.gnu.org; Fri, 15 Nov 2024 16:11:41 -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-0002Bt-Ui 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-00066P-1c for guix-patches@gnu.org; Fri, 15 Nov 2024 16:11:32 -0500 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id E0B863069A9E for ; Fri, 15 Nov 2024 22:11:18 +0100 (CET) Authentication-Results: ext-mx-out013.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:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1731705075; x=1733519476; bh=yPzaXCYSdaziVreq7nuo+jL0yuX+QD9obeGjigv5Dl8=; b=qu3YTNjntF4G 6zNBfOomZ50I2sPOO87FGl6ELIQCWzksH1Ed3GElueeX8/1/PtBiNicqyrQt1U0o 3jPsSse2n5j6Hf6AKiKWkTwG1kuNHfjtxXYj6BTaTM0o5tffzSb/PDS308UAXJKA XZtrzQBj/fn3M+3dQeOSKgYkOgQkYI9G41MpRTsbgAlbFUbKTp/1dPikN6L3ilZz U90nz4A8kfELN6nrIrY98DywtrBkx6ZNwn8PnrkjGehZrDreXrfc7x/CYxL3qAEB 9fwvL3MIr5RTKa5+1JATlpm/Z+V1WN7sI055GQ7PVHQ7CJdQN7F5W0vAl2XxQM6v aVEyLkYE6Q== 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-out013.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id ZWUaZ5VU-YZZ for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 20A6B3069A98 for ; Fri, 15 Nov 2024 22:11:14 +0100 (CET) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id E5A1D30EDB4A for ; Fri, 15 Nov 2024 22:11:14 +0100 (CET) From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= To: guix-patches@gnu.org Subject: [PATCH 1/4] guix: Add go module fetcher Date: Fri, 15 Nov 2024 22:11:03 +0100 Message-Id: <20241115211106.2759121-2-j@lambda.is> In-Reply-To: <20241115211106.2759121-1-j@lambda.is> References: <20241115211106.2759121-1-j@lambda.is> MIME-Version: 1.0 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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Add a new fetcher for go programs, based on go mod download. This is largely how go programs *want* to be fetched, and some pseudo-private dependencies [1] are difficult to wrangle without letting go do the work. This patch only adds support for git as the root module fetch. The approach is conceptually simple: 1. Fetch the root package to build (usually a git repo) 2. Find all the go.mod files in this tree and run go mod download 3. Store the sources of the package, its direct- and transitive dependencies as the source. The source is in source/, the dependencies in go/pkg as encouraged by the toolchain. Go tooling is generally very opinionated on how things are supposed to be done, and fighting it usually brings pain. This approach is not without drawbacks. Go programs tend to be very liberal with dependencies and specific with versions, which will in practice leads to a **large** set of sources. At a system level there will be a lot of duplicated sources, and a lot of slightly different versions which could be compatible. This is not guix specific but rather how go programs design their environments. Another is libraries. Go wants to statically link everything, and generally likes to work with source, and every program pins dependencies to different revisions. The go-mod-fetch getting the source of all libraries the libraries breaks the general packaing approach of packaging libraries separately, but this was never really leveraged by go anyway. This switches the focus to packaging applications rather than libraries. Finally, the package.source needs two hashes - one for the direct origin (e.g. git), and one for the sum of libraries fetched by go.mod. [1] github.com/bufbuild/buf 1.46 requires buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 which is only available as a .zip and has a layout that go mod understands, but is alien to the go-build-system. * guix/go-mod-download.scm: New file. * gnu/local.mk: Register it. Change-Id: I84c00df07393a9978124667e3e2497aec7009252 --- Makefile.am | 1 + guix/go-mod-download.scm | 146 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 guix/go-mod-download.scm diff --git a/Makefile.am b/Makefile.am index 3a35b7becd..fc00947f4f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,6 +102,7 @@ MODULES = \ guix/android-repo-download.scm \ guix/bzr-download.scm \ guix/git-download.scm \ + guix/go-mod-download.scm \ guix/hg-download.scm \ guix/hash.scm \ guix/swh.scm \ diff --git a/guix/go-mod-download.scm b/guix/go-mod-download.scm new file mode 100644 index 0000000000..1a7ffbb6ac --- /dev/null +++ b/guix/go-mod-download.scm @@ -0,0 +1,146 @@ +;;; GNU Guix --- Functional package management for GNU +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; TODOs: +;;; 1. Support non-git root repositories +;;; 2. Store/cache individual module downloads + +(define-module (guix go-mod-download) + #:use-module (guix build utils) + #:use-module (guix derivations) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix monads) + #:use-module (guix records) + #:use-module (guix store) + #:use-module (guix git-download) + + #:export (go-mod-reference + go-mod-reference? + go-mod-source + go-mod-go + + go-mod-fetch)) + +(define (go-package) + "Return the default Go package." + (let ((distro (resolve-interface '(gnu packages golang)))) + (module-ref distro 'go))) + +(define (nss-certs-package) + "Return the default nss-certs package." + (let ((distro (resolve-interface '(gnu packages certs)))) + (module-ref distro 'nss-certs))) + +;; The source key accepts the same kinds as the package record, but mostly go +;; use git. The go key specifies which go version to use, which might be +;; necessary if any module sets a newer toolchain in go.mod +(define-record-type* + go-mod-reference make-go-mod-reference + go-mod-reference? + (source go-mod-source) + (go go-mod-go (default (go-package)) (thunked))) + +;; Fetch all direct and indirect dependencies of the go modules in the source +;; tree (usually a git repo) using go mod download. +(define* (go-mod-fetch source hash-algo hash + #:optional name + #:key (system (%current-system)) + (guile (default-guile)) + (go (go-package)) + (nss-certs (nss-certs-package))) + (define guile-json + (module-ref (resolve-interface '(gnu packages guile)) 'guile-json-4)) + + (define* (build source go) + (with-imported-modules (source-module-closure + '((guix build utils) + (guix build download) + (srfi srfi-34))) + (with-extensions (list guile-json) + #~(begin + (use-modules + (guix build download) + (guix build utils) + (srfi srfi-34)) + (let* ((cert-dir (string-append #$nss-certs "/etc/ssl/certs")) + (src-dir (string-append #$output "/source")) + (mod-cache (string-append #$output "/go/pkg")) + (xgo (string-append #$go "/bin/go"))) + ;; go.mod files can specify a minimum required toolchain which could + ;; cause go mod download to fetch and install a newer compiler + ;; if invoked with an older one. + (setenv "GOTOOLCHAIN" (string-append "go" (getenv "go toolchain"))) + (setenv "SSL_CERT_DIR" cert-dir) + (setenv "GOCACHE" "/homeless-shelter") + (setenv "GOPATH" "/homeless-shelter") + (setenv "GOMODCACHE" mod-cache) + + (mkdir-p src-dir) + (mkdir-p mod-cache) + (copy-recursively #$source src-dir) + (let* ((go-mods (find-files src-dir "go.mod"))) + ;; go mod will update the go.mod with transitive dependencies if + ;; they are not set, and fail with an error if the file is not + ;; writable. + (for-each make-file-writable go-mods) + (with-throw-handler + #t + (lambda _ + (for-each + (lambda (go-mod) + (with-directory-excursion (dirname go-mod) + ;; go mod download must be run twice - the first + ;; fetches direct dependencies and *records* + ;; transitive dependencies, the second run fetches + ;; the transitive dependencies. + (and + (invoke xgo "mod" "download") + (invoke xgo "mod" "download")))) + go-mods) + #t) + (lambda (key . args) + (display (string-append "Fetching modules failed.\n" + "Here are the results of `go env`:\n")) + (invoke xgo "env"))))))))) + + (let* ((mod-source (go-mod-source source)) + (mod-ref (origin-uri mod-source)) + (mod-go (go-mod-go source)) + (mod-hash (origin-hash mod-source)) + (mod-hash-value (content-hash-value mod-hash)) + (mod-hash-algo (content-hash-algorithm mod-hash))) + + (mlet* %store-monad ((guile-for-build (package->derivation guile system)) + (git-source (git-fetch mod-ref mod-hash-algo + mod-hash-value + #:system system + #:guile guile-for-build))) + (gexp->derivation (or name "go-mod-fetch") (build git-source mod-go) + #:script-name "go-mod-fetch" + #:env-vars + `(("go toolchain" . ,(package-version mod-go))) + #:leaked-env-vars '("http_proxy" "https_proxy" + "LC_ALL" "LC_MESSAGES" "LANG" + "COLUMNS") + #:system system + #:local-build? #t ;don't offload repo cloning + #:recursive? #t + #:hash-algo hash-algo + #:hash hash + #:guile-for-build guile-for-build)))) -- 2.39.5 ------------=_1744120263-8345-5-- From unknown Sat Aug 16 18:46:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Subject: bug#74373: closed (Re: bug#74370: Module aware go build system (for Guix)) Message-ID: References: <20241115211106.2759121-5-j@lambda.is> X-Gnu-PR-Message: they-closed 74373 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 74373@debbugs.gnu.org Date: Tue, 08 Apr 2025 13:51:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1744120263-8345-7" This is a multi-part message in MIME format... ------------=_1744120263-8345-7 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74370: [PATCH 4/4] gnu: Add go-buf. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74373@debbugs.gnu.org. --=20 74370: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74370 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744120263-8345-7 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74370-done) by debbugs.gnu.org; 8 Apr 2025 13:50:25 +0000 Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u29LM-00027A-DV for submit@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:24 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:33442) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u29LD-00021d-Nt for 74370-done@debbugs.gnu.org; Tue, 08 Apr 2025 09:50:19 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1u29L2-00EyF6-Mi; Tue, 08 Apr 2025 15:50:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=futurile.net; s=selector1; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=ulURmkUQmsb4mmRwyXOTrrD/YJd0raqw/jv8zfAds8Y=; b=Y4hGcx2o7I3gynp4rV9lI3xjDg awaF941b2txDc/ZLx0wX8FcZRBg0gIJ4CuLWW81nn5GXu14FZjDA7PjkMTnvp40Z8rVEikRiJbBwk sAl/xSldcaEJqVVc5WFg9xuO9PdjGlmtfj7iPRWtC3qeHvgJYmYqyU6Ub4iwd06kOMXC9BGWYHzez PyqyS7p/SvDlJoZ2Qmo5HtjeDej2x2mfVczfZ/bO3wCW9dGA+JdjCZoY+pahi3evad6WCTcy5J5Dn x9vIya0XD++6tahhZgOaTMoZ0t+GLofYjvI6eyNbR17JvJ99Oeqn3/ONdzw+o/uiezbRBVTQcQc45 Jx018Dxw==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1u29L1-0005Li-Bl; Tue, 08 Apr 2025 15:50:04 +0200 Received: by submission01.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1u29Kn-00EVZe-UD; Tue, 08 Apr 2025 15:49:50 +0200 Date: Tue, 8 Apr 2025 14:49:48 +0100 From: Steve George To: J??rgen Kvalsvik , sharlatanus@gmail.com Subject: Re: bug#74370: Module aware go build system (for Guix) Message-ID: References: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6d15fd3c-a50f-4cf1-9921-8fc644ab86a1@lambda.is> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74370-done Cc: 74370-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I think there's a common misunderstanding that if you comment on a bug it won't actually notify the submitter (you have to email NNNN-submitter). It's because debbugs was modelled on the idea that there's an "end-user" who's only interest is the initial submission and a final nnnn-done@ email to tell them it's all solved now! OK, I'm closing #74370. Then you can create a new one when you submit you're new and improved one. Hopefully you and Sharlatan can collaborate on this! Futurile / Steve On 8 Apr, J??rgen Kvalsvik wrote: > Hi, > > I don't know what happened, but as you point out I never received > Sharlatan's emails. > > Anyways, there is still interest, but the approach I proposed is not great. > I have since (re)written the module aware build system with much better > results. I am currently adding a bunch of packages (for my own needs) in > order to get some experience with it and sand down some rough edges, before > I plan to resubmit the new build system upstream. > > Thanks, > J??rgen > > On 4/8/25 15:03, Steve George wrote: > > Hi J??rgen, > > > > You submitted a module aware go build system, there were some queries about it from Sharlatan as there's been a range of attempts at improving this area. Just making you aware so you can reply if you're still interested: > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74370 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74374 > > > > I don't think you were notified as responses have to go to NNNN-submitter for the original reporter to be send the email. > > > > Thanks, > > > > Futurile / Steve > > > > > ------------=_1744120263-8345-7 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 21:11:50 +0000 Received: from localhost ([127.0.0.1]:51079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3ba-0000F7-2I for submit@debbugs.gnu.org; Fri, 15 Nov 2024 16:11:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:48712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tC3bR-0000EH-SQ for submit@debbugs.gnu.org; Fri, 15 Nov 2024 16:11:44 -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-0002Bp-St 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 1tC3bD-00066A-V6 for guix-patches@gnu.org; Fri, 15 Nov 2024 16:11:30 -0500 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 5219B20B365A for ; 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:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1731705076; x=1733519477; bh=sOLzUXbmn++WwRYEDzd7Oaokx8dkLM6oP0xdf0EMoaQ=; b=I6oYhkSqUfz4 yOCH6Iw//zQZdxY7JDLNv6hXLJxP+pqSaYhpI9Qk8lIvMipNnOXB6gQeqr0HlWiD Vbw0NDNXlENy1BYe5e17+97vF9ierLwqMOT6PCURI2UadI4faNEc37Q+XLP0EDee KlYj1HlxP0OpkQQV4+2aL03jzod4t5cWQ2q/kYXMPOLnrR6maj59B8zhRDl8iUv3 lZPNmWv6h3HxHCEeIb0WtIO/lUh5xiDcnKnF3IbedYtMxpu2fNEUNcJ7HOM35orl 2wHPJhjps5WhOjOA28Sb+L69y9VmpBvA4dGYLErV8TXdVB3bCTW8a/dNsrSi/oSS SAEnXvORZw== 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 PuqmV_SQ8Pxs for ; Fri, 15 Nov 2024 22:11:16 +0100 (CET) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 0A3CE20B3659 for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id BB74E2097187 for ; Fri, 15 Nov 2024 22:11:15 +0100 (CET) From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= To: guix-patches@gnu.org Subject: [PATCH 4/4] gnu: Add go-buf. Date: Fri, 15 Nov 2024 22:11:06 +0100 Message-Id: <20241115211106.2759121-5-j@lambda.is> In-Reply-To: <20241115211106.2759121-1-j@lambda.is> References: <20241115211106.2759121-1-j@lambda.is> MIME-Version: 1.0 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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * gnu/packages/golang-xyz.scm (go-buf): New variable. Change-Id: I2ff7ee23bcf5413ad3b4b4b9cbfc8a007b0b9b80 --- gnu/packages/golang-xyz.scm | 63 ++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 0d6debcac4..0d8147e484 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -68,6 +68,7 @@ (define-module (gnu packages golang-xyz) #:use-module (guix build-system copy) #:use-module (guix gexp) #:use-module (guix git-download) + #:use-module (guix go-mod-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) @@ -7591,31 +7592,65 @@ (define-public glua #:import-path "github.com/yuin/gopher-lua/cmd/glua" #:unpack-path "github.com/yuin/gopher-lua")))) +(define-public go-buf + (package + (name "go-buf") + (version "1.46.0") + (source + (origin + (method go-mod-fetch) + (uri (go-mod-reference + (go go-1.23) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bufbuild/buf") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "049rp4f2i759xmws6pqrw3208x1v0zdcmi3ymjbxmaq4hijl9daw")))))) + (sha256 + (base32 "1sk2jhazaa1y2y5m1nmd753s0gr52c8967xr6j9pf2d675fzi7q0")))) + (arguments + (list + #:go go-1.23 + #:import-path "cmd/buf")) + (build-system go-mod-build-system) + (home-page "https://github.com/bufbuild/buf") + (synopsis "Buf") + (description + "The @@url{https://buf.build,(code buf)} CLI is the best tool for working with +@@url{https://protobuf.dev,Protocol Buffers}. It provides:.") + (license license:asl2.0))) + (define-public go-chroma (package (name "go-chroma") (version "2.14.0") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/alecthomas/chroma") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) + (method go-mod-fetch) + (uri (go-mod-reference + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alecthomas/chroma") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qgr4gywjks869sc85wb8nby612b8wvsa1dwpsbanjsljq7wq7mp")))))) (sha256 (base32 - "1qgr4gywjks869sc85wb8nby612b8wvsa1dwpsbanjsljq7wq7mp")))) - (build-system go-build-system) + "1xq2v3qr71mbjm328a6snqvba83nq70z6qqjfgh5mp25bwkwy6bl")))) + (build-system go-mod-build-system) (arguments (list #:install-source? #f - #:import-path "github.com/alecthomas/chroma/cmd/chroma")) - (native-inputs - (list go-github-com-alecthomas-assert-v2 - go-github-com-alecthomas-chroma-v2 - go-github-com-alecthomas-kong - go-github-com-mattn-go-colorable - go-github-com-mattn-go-isatty)) + #:import-path "cmd/chroma")) (home-page "https://github.com/alecthomas/chroma") (synopsis "General purpose syntax highlighter in pure Golang") (description -- 2.39.5 ------------=_1744120263-8345-7--