From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2ARvHcoQDmG+NQAAgWs5BA (envelope-from ) for ; Sat, 07 Aug 2021 06:49:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CCjuGMoQDmFpFwAAbx9fmQ (envelope-from ) for ; Sat, 07 Aug 2021 04:49:14 +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 C71B710CB3 for ; Sat, 7 Aug 2021 06:49:13 +0200 (CEST) Received: from localhost ([::1]:60532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCEGm-0003E4-SC for larch@yhetil.org; Sat, 07 Aug 2021 00:49:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCEGc-0003Dl-0i for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCEGb-0005B9-Pe for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCEGb-0003pB-Lw for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49919] [PATCH core-updates 1/2] build-system/go: Honor #:parallel-build?. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Aug 2021 04:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49919 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49919@debbugs.gnu.org Received: via spool by 49919-submit@debbugs.gnu.org id=B49919.162831172514669 (code B ref 49919); Sat, 07 Aug 2021 04:49:01 +0000 Received: (at 49919) by debbugs.gnu.org; 7 Aug 2021 04:48:45 +0000 Received: from localhost ([127.0.0.1]:51726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCEGG-0003oQ-UO for submit@debbugs.gnu.org; Sat, 07 Aug 2021 00:48:45 -0400 Received: from out1.migadu.com ([91.121.223.63]:22470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCEGE-0003oB-Jv for 49919@debbugs.gnu.org; Sat, 07 Aug 2021 00:48:39 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628311716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZFXTMOVwI9WfCW8BL/IfOOcxRplp/nyZwLe1WUkVOWc=; b=Cgd1aWZ1vvBD/RoL/JzMB1hUd4HSYwZfX3EyZtXOPW/QTslsL1Kpy+OUH95OW1r9oQ7MDc zsyk4TrNt1wU6RGoydGZMrgO2NI7Zsk5fIGRNWkKu0QsbhUPZgSf3nM0Ej+JxyEnRSYK+8 WGydeaZ8JJtZew2PM0CUjce4s1Ym1wQ= From: Sarah Morgensen Date: Fri, 6 Aug 2021 21:48:33 -0700 Message-Id: <1ea32faddea717239b3d56cfa7e647fc1d48faa7.1628309588.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: iskarian@mgsn.dev 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628311754; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZFXTMOVwI9WfCW8BL/IfOOcxRplp/nyZwLe1WUkVOWc=; b=GDh1Cm4ehzZ8nq4ioE3LLRISMDmxHv4NEFBp6y+WEM8mfTltYVn2RheMgZfFhGvaxZWop9 z6S6de7dIZ2Fd9zDP/6TP9iIW73Yq8FJHthqdEqC85njNkWc91RMzzlHv54WvJNrb8IzEG QWA8gkhXoJR1/+GJCF5cLIaMhC9yaaTc+BGpfJGGcOy3Ov9kIJ5feSYjsVBAxM3RfalL4C AkjiNEXHj768UoRLu4A1SQFGw1IulECxgmXyvLOf+g/cIeg40cU/Kzl2ywx4txpjqNRCeX gJUnJQPlsHnwHoBpYmnIQiOVyh+X6C6Yc6PRjHXc+TFzpiJa9ov1C81c4G21Xw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628311754; a=rsa-sha256; cv=none; b=RipHrsETeUwnZLsjT4FHShzHXFWAYfUzg5iq66n4unrAmV8bxGCZBr7En9WiWpkUL3aJA+ mD7lD1ow9ooRUljqS/CdArMFmseJlpPbFBKiDqbB3o8LEWjtsDB93A+kAznmgWE7wx0Pi8 CsN0ZYRb6qV8SaBR2vKanRSgYIxm9rw0EW3C7AjY31nsYYL2fmci720G9WnJKnNGwVjRvr yeXElvRV+ZKc3xwYOyH89DUGfrvX8YAp2LQ2QtLZ1mSyXIVh6a2TEklyEmBb2Y2JXSUZBk UZinFW62T4FSpAxSMgWSIEvShtxJlXlMiqpr99fDBRpVrCdNRR/ZnLTBVljrFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Cgd1aWZ1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Cgd1aWZ1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C71B710CB3 X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: GdWDF/0h1n5O guix/build/go-build-system.scm (build): Honor #:parallel-build?. guix/build-system/go.scm (go-build): Add PARALLEL-BUILD? parameter. [builder]: Use it. --- guix/build-system/go.scm | 3 +++ guix/build/go-build-system.scm | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 100d1db4b6..a5aa21b99e 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -129,6 +130,7 @@ commit hash and its date rather than a proper release tag." (unpack-path "") (build-flags ''()) (tests? #t) + (parallel-build? #t) (allow-go-reference? #f) (system (%current-system)) (guile #f) @@ -153,6 +155,7 @@ commit hash and its date rather than a proper release tag." #:unpack-path #$unpack-path #:build-flags #$build-flags #:tests? #$tests? + #:parallel-build? #$parallel-build? #:allow-go-reference? #$allow-go-reference? #:inputs #$(input-tuples->gexp inputs))))) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 227df820db..521bad9667 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020 Jack Hill ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -216,8 +217,12 @@ unpacking." (_ #f)) inputs)))) -(define* (build #:key import-path build-flags #:allow-other-keys) +(define* (build #:key import-path build-flags (parallel-build? #t) + #:allow-other-keys) "Build the package named by IMPORT-PATH." + (let* ((njobs (if parallel-build? (parallel-job-count) 1))) + (setenv "GOMAXPROCS" (number->string njobs))) + (with-throw-handler #t (lambda _ -- 2.31.1