Received: (at 74668) by debbugs.gnu.org; 18 Dec 2024 02:23:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 17 21:23:46 2024 Received: from localhost ([127.0.0.1]:60956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tNjiu-0004ET-FY for submit <at> debbugs.gnu.org; Tue, 17 Dec 2024 21:23:45 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:47391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>) id 1tNjip-0004E0-0X for 74668 <at> debbugs.gnu.org; Tue, 17 Dec 2024 21:23:36 -0500 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-38634c35129so4524355f8f.3 for <74668 <at> debbugs.gnu.org>; Tue, 17 Dec 2024 18:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734488552; x=1735093352; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/9Nul0bW1qEqlAniapo2J/Srwq7trQjlQI4WIMBeFjk=; b=FhNf7o6nWrNhh95wPTCN3acTFs8JED3bg8HDiIIwDqWQE15zn5qBNODpJAx9YbGpo7 BndcsZX7lalqX6tlJEUAoIJYmSWmHibeeVEfbto1w4GEC+gID6XvYsjcfQoUn2oNGJ3r pmTa4yzTvbqcvnA1MCQV5ei7vKW3EXJ1KCP9x5eRRdur5oUEo/SQMoF9aiNXCtkJ545C dKKxMy8kOGJhQislud8cF6IqgD0jMLF+mFjGvhO/mSSW2EZJjPOLf4mylcuiREG9VTcw EBwihGl5xxlJHqp9D5fIokXAYekzKFOlPuwR0UzhiRkbJAMkI7BFhT/OjOgxVgnqyMYu nbcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734488552; x=1735093352; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/9Nul0bW1qEqlAniapo2J/Srwq7trQjlQI4WIMBeFjk=; b=onvngfhTRSiyZJYa40BCV53qCi72aYp4yCy87Hru/cH0+4fshgQxTBwMd/IYhm5q3T +xJvqZFUKThVlkgT5qEUfCCDaGJkYin0znQvXa8kb9W+x2LqYNSQgWBrkQntZF3U3XR6 Hw3CSvXMkdjPXMUArK1lCH+FkQmZFnyO5ol4MdcJWSPfwb6c6s8j38+/gSbHPJqH+vBY m21W+JQGSdIjvmJ5cE+T7L0T0LSBYKaR341sezX5o2R5fGJFRPMI+MjmzyPwkHe643qr gZMek3E62qH/exQu2Dm8qXmUYK23FQ1Rpr0PFbdRCr5+SFHRLFQbomeoURxiJiMQH/cK OqfQ== X-Gm-Message-State: AOJu0YyibwDhrmkoeozlM1UMR3keMeWNuHjbetahWVPgaJ6jzG/il0dz OtxuHbEQM5Tlc0CnLW1ik6Ae2TeZoYd51aQV8ARrNymHbmUYPw0JdWqk76O7 X-Gm-Gg: ASbGncsAnR1mvSNwzyioNdqQCP3o8naot2O8Um8pRd8TNveY1+29PSUaPSSDGIH2QWb EZMoKaKRXTK8dhPZpGPBpxCzvT209mUKIMYw9B9prPniUgNx2n3AQdjdW29GQa6/yt3xbE6FART NiQJDfzBMqwuXF5IjRuSGmMBQ91ROzHc+5eJHd5blfzK+BDBAShZyUKpoBPgDCFuD2YUmhd96kd VndM6RXDDpRrLKqr7CbYbiKYep+kMETuBoPO+EnNbFs1R6+hc6rnW4Zo213c5EAto/KfqzD0C0f zEPNd37rrTE3DyrhKhfq34EpohFx3Q8n3YQCzfYm92k1x6ZX X-Google-Smtp-Source: AGHT+IGEZUz4hmi4sL1fm3oLoGevrKvyJV1khuNWCiw3IcessmZE65iJAUb54q5KFChrvl2rf5F+tg== X-Received: by 2002:a05:6000:2a4:b0:385:fb2c:6034 with SMTP id ffacd0b85a97d-388e4d91e80mr713872f8f.47.1734488551970; Tue, 17 Dec 2024 18:22:31 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801ac5asm12477424f8f.55.2024.12.17.18.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 18:22:31 -0800 (PST) From: Sharlatan Hellseher <sharlatanus@HIDDEN> To: 74668 <at> debbugs.gnu.org Subject: [PATCH v2 1/2] build: go-build-system: Relax build verbosity. Date: Wed, 18 Dec 2024 02:22:26 +0000 Message-ID: <f04ffeabffb65d34210b547db9704f39c609e7c5.1734488457.git.sharlatanus@HIDDEN> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>, Sharlatan Hellseher <sharlatanus@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74668 Cc: Sharlatan Hellseher <sharlatanus@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: -1.0 (-) During the build phase "-x" option forces go compiler to generate quite a noisy build log which does not help too much when the build is failed. This change makes it optional and governed by #:verbosity key passed to `build' procedure. * guix/build/go-build-system.scm (build): Provide a link to online example. Consolidate options in GOFLAGS environment variable, make "-x" optional. Add description for "-trimpath" option. Change-Id: Icf1b03eb79db8a6f79f86f3cc212a53de5aa7c1c --- guix/build/go-build-system.scm | 39 ++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index e53d8cb53c..9f9eea3069 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -283,23 +283,44 @@ (define (go-inputs inputs) (_ #f)) inputs)))) -(define* (build #:key import-path build-flags (parallel-build? #t) +(define* (build #:key + build-flags + import-path + (parallel-build? #t) + (verbosity 1) #:allow-other-keys) "Build the package named by IMPORT-PATH." - (let* ((njobs (if parallel-build? (parallel-job-count) 1))) + (let* ((njobs (if parallel-build? (parallel-job-count) 1)) + ;; Utilizing GOFLAGS for flexible build options passthrough, refer + ;; for more examples to online documentation of Golang + ;; <https://go.dev/src/cmd/go/testdata/script/goflags.txt>. + (goflags (string-join + (list + ;; Print the name of packages (pathes) as they are compiled. + "-v" + ;; Print each command as it is invoked. When enabled, it + ;; generates a lot of noisy logs which makes identifying + ;; build failures harder to determine. + (if (> verbosity 1) "-x" "") + ;; Remove all file system paths from the resulting + ;; executable. Instead of absolute file system paths, the + ;; recorded file names will begin either a module + ;; path@version (when using modules), or a plain import + ;; path (when using the standard library, or GOPATH). + "-trimpath") + " "))) + (setenv "GOFLAGS" goflags) (setenv "GOMAXPROCS" (number->string njobs))) (with-throw-handler #t (lambda _ (apply invoke "go" "install" - "-v" ; print the name of packages as they are compiled - "-x" ; print each command as it is invoked - ;; Respectively, strip the symbol table and debug - ;; information, and the DWARF symbol table. - "-ldflags=-s -w" - "-trimpath" - `(,@build-flags ,import-path))) + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + "-ldflags=-s -w" + `(,@build-flags ,import-path))) + (lambda (key . args) (display (string-append "Building '" import-path "' failed.\n" "Here are the results of `go env`:\n")) base-commit: 0a5b060be1e8966abc45e4782df83447510a90b4 prerequisite-patch-id: 7c60aacd825ea1fd299462d1ae31beb34902fbaf prerequisite-patch-id: 5136c6924ea61be099691eb9b0c227936a08954a prerequisite-patch-id: 47fb416de83dc133d647e3e07a5c398391336eb1 prerequisite-patch-id: 760115bac637e5f39738d82ed16232c8792a8f82 prerequisite-patch-id: f8b63ec4ec753bcc2c3a6022abaf47146e454a72 prerequisite-patch-id: 2d5e20587944fe26b277509396dabd362bf8105c prerequisite-patch-id: 5b779f0a2442f2697cd75c089e36d276b9dafbf5 prerequisite-patch-id: e5f81823c9ea1b93abf1f3fec60e695d16909a06 prerequisite-patch-id: 8badae173015a65a237c45b42241e36355e9f2c1 prerequisite-patch-id: af090660b016e08b3612bee7ca2125bb0e1d00b2 prerequisite-patch-id: 294de506884b2b150eba248b4a1731de95d50176 prerequisite-patch-id: 8ed8c96cf2383811b66abe15f6fa9af73689b94c prerequisite-patch-id: 6dd547d424e4eeb99715847136b3fad7f566d9fa prerequisite-patch-id: ff3892aa0acc89208f4eba1f0866f8da01d1cb21 prerequisite-patch-id: 3a9c1b8c45bb320815892e512fdf3271ea9c8f0f prerequisite-patch-id: 526f9ea0e83f7479ac37679b69f9ad18c38e9234 prerequisite-patch-id: ad91b786810c1a4c13d2d39e0eb51d0932f1060c prerequisite-patch-id: e74404537a20ed352985299432056116f2d8881b prerequisite-patch-id: 0aae6b4b352a367bd8770075b16547c060262e34 prerequisite-patch-id: 0b485c3a7c266118cdafc3b30aebd704b1018af7 prerequisite-patch-id: add3eb95e39cd65a47e86d74909f822e4fcbd542 prerequisite-patch-id: 98487d900da05e0a4f39bb28036918afa76e1d9a prerequisite-patch-id: dedc1426c51db76f30ddd92a8ed04e1793f7839c prerequisite-patch-id: e7606e328c545a4db40d37ca3aa5f99c0b4287f8 prerequisite-patch-id: 63fa87ba5ddf33561784e25199d605aa0b18133e prerequisite-patch-id: 04fe1403ea43cfbeeabbd87ee9b6707c64101c07 prerequisite-patch-id: 3f7cf90125fd223507087c94a92aa16dba2662f2 prerequisite-patch-id: e763a43853180ad952fc5eaeb60e4ef2762f6d3f prerequisite-patch-id: 284d08f1257d7e6c69e46b9e7fee165fa1aa5b07 prerequisite-patch-id: 0ebe96fd52cc9140b53b17046b2aa2b6969a6e2c prerequisite-patch-id: 87339b708e38828f9a1769b3f2740f328a9bb59b prerequisite-patch-id: f3698965b06dbb73c6b702c22830a7e400b8b765 prerequisite-patch-id: 6d464271ac1083b7f303d3ac75963a7bf91e8ce0 prerequisite-patch-id: 93d8965a1a7a4110eb7348d43df9fb39899df5cc prerequisite-patch-id: 1bb520f9ad8cc64b07041ccea8ffb6ad51fea4a7 prerequisite-patch-id: d6c45d0b7fd5a8a744f560c1ee24e90e63546196 prerequisite-patch-id: d11dbd6a272b78c06b2373196897bd02da491e66 prerequisite-patch-id: aa2d3d94d3cebd23780c0785098e728080a25063 prerequisite-patch-id: 5e76884b7109e88da98532ec66c469b39335c14d prerequisite-patch-id: dfaa606ac8721e076b9870eca03721b731e3cc65 prerequisite-patch-id: 26a9585f84c5be0cf6ac60eeab3f62e2c1b59a32 prerequisite-patch-id: 790109ae7b8db35051f0532fb9820cc794f6e90e prerequisite-patch-id: cdcb8df8b8060543aeb46727c6097640784c5f77 prerequisite-patch-id: cef60c111cfd4c7c77b8402196710a334ed4244a prerequisite-patch-id: 6801272b174236af0bb5a94be1e105887f525660 prerequisite-patch-id: 3d03b39da9fcc5961b7672ea82784d68512cc9ef prerequisite-patch-id: 56410b64255826975d87f89c6bca96d96b3bddfa prerequisite-patch-id: 455428488cdc812b099c8a0aed3763632dbdc60c prerequisite-patch-id: 66d83739e60670e4a0bd3db34199da0346e84062 prerequisite-patch-id: cb91e8091b251ad54b16ab0c26145ec1e3207cd9 prerequisite-patch-id: 2b1d8e54b873c0c373a5c1fd3117a73c5c9df7a5 prerequisite-patch-id: 4a31a50b43fa9275f7f7801e658d593fe48798a4 prerequisite-patch-id: 43d9065cfb585329af82ff9b7510896ed5be6ea5 prerequisite-patch-id: d094d34d84aa822499a7f6a94b7654816a980537 prerequisite-patch-id: 0620608a1dfe736dc00327ee00b8bc9b24d374ae prerequisite-patch-id: b5c845395592759d2c8746d269c9a1e341d20fdc prerequisite-patch-id: 99a880d7782dbca30fafd6fc3176a2b00cc75224 prerequisite-patch-id: 2f8fc439398bd2b8f1486a7cb17ef8fa27b2263d prerequisite-patch-id: 2ccfa97711a36ab124caf722e0b7a9b10cf14b11 prerequisite-patch-id: 54d6570b4bd09dbfdc4947182adb94286e9b1fad prerequisite-patch-id: 7a93b50157b384d86027b672160a2e4cc742b7d1 prerequisite-patch-id: 5d4ad58a8a082bbbd5a6e3ab3de7acf1614770ec prerequisite-patch-id: 7e75bcddb6ab62b3d60d29c27b2676335c8e6d33 prerequisite-patch-id: 4382f72af6cc258342e2c386a8bfb2e58e199943 prerequisite-patch-id: 4888f198a7315ea67423eb004d819217b1f22f8e prerequisite-patch-id: f01e7af38ad20787d173922e59e6288004d53e33 prerequisite-patch-id: 4250138cba074ef5618a3f16e5cf31471904cb9c prerequisite-patch-id: 3215d56762bb0bc2c94a9ee58cf27c083d1e8947 prerequisite-patch-id: abe0f7fd5838389ef509a3104c3b7929cf3436d3 prerequisite-patch-id: b26eeb93042d8d6774c0dad43468b45c8c8644eb prerequisite-patch-id: d5850f4d806b61cbd7521383a07953f3221dd683 prerequisite-patch-id: 1f641be7411c9d5900e3e5af53d8b39f773196e0 prerequisite-patch-id: a108c9b6889b34f1a2ef3b458656ad94204b6277 prerequisite-patch-id: a3cd37a3e65877ab005f2dab1868bbd5df7e68a1 prerequisite-patch-id: 00319f4ad13f642b4895f652348bb468bf8554eb prerequisite-patch-id: 5b252fc54bdd1736c34408d35805f31b751d7bf4 prerequisite-patch-id: e81cc6ea74f4ab12ffb46b0327c753abf61aa781 prerequisite-patch-id: 1778bccb3f339a5a388ebd30eee5ac9b13e6e8fd prerequisite-patch-id: 53f18ed89cadf5fa2a3fe4d28ae3291d832ab7ff prerequisite-patch-id: 5500e06165d91665b677471936baf5077adc85fa prerequisite-patch-id: 933cb1d5f216d56f1311b2029f2bc2cf164a631e prerequisite-patch-id: 2ddc887e6290b316e39ef74b06ec3e155d47e377 prerequisite-patch-id: 104dc94a30b1433c026c13efe929d7d58ccb7c86 prerequisite-patch-id: 2c8bc99296a99be1dca6116ddc96e4a703845753 prerequisite-patch-id: 7c9b357469813aeb9e09c1ae85bd17dca04fa96c prerequisite-patch-id: d225d098ac87adec37e51ae69f5e476785a2d4ef prerequisite-patch-id: d463ebf70d68d8fa61cc0d67dc1cb5e8d236f039 prerequisite-patch-id: b8dffb6d3a608b6473fbfca9c9ba49e17b29f9a9 prerequisite-patch-id: 875cbfc70f6d0835bfc6deab903494bd0d99e986 prerequisite-patch-id: 96c5c977bbc363fee541eba249ab7b3445c7a399 prerequisite-patch-id: 99e08cbf70a87979b53798d49e0a653e802fc3de prerequisite-patch-id: d2416914b318da015eedcf5e36e8a7831578fca0 prerequisite-patch-id: a4542c7c6ba2d91c23d74680cce11a2acfdd466f prerequisite-patch-id: 785a78d917fbee5e539cb16f4e9b703705737edf prerequisite-patch-id: 564d3101f82df166da833265369835f5da1cfe17 prerequisite-patch-id: 79616ad4f655167be47eb299467db5e8fa220a05 -- 2.46.0
cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
:bug#74668
; Package guix-patches
.
Full text available.Received: (at 74668) by debbugs.gnu.org; 18 Dec 2024 02:23:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 17 21:23:37 2024 Received: from localhost ([127.0.0.1]:60954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tNjir-0004EF-06 for submit <at> debbugs.gnu.org; Tue, 17 Dec 2024 21:23:37 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:45072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>) id 1tNjio-0004Dz-5f for 74668 <at> debbugs.gnu.org; Tue, 17 Dec 2024 21:23:35 -0500 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so3251027f8f.2 for <74668 <at> debbugs.gnu.org>; Tue, 17 Dec 2024 18:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734488553; x=1735093353; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JaAm3+Yvi8vgVHf5Cpjs8yH3dA/f75UaTw9J2GBs+Nk=; b=d/yAuQufs9TEiOYjRfZh+BR/DNaXafhID/PdHQkQeqIJMBtk8UdgRO5aGFVh0XJSjz ckJqtjBAO+oTgInN+RSm0lkM0WT6mxRpvvK0rURY1JM4c3+Y8jC/eIbgFWnXPxtYm5PV V+CuJwz5VILF+YYV+msfDxVwNjYmwATtcJFNv8gEOIK0OgOh9kozDgiCOZiJP71uguWt rLy4cvP17SQ4mUdUq8zmuHy2yK1xKVKdqlT9FndCVC6VW0ixSr9rKu5hyAUyyiVoUL8w Emvr2C/H5+i/mT5dMXukspBIdZE3Adp0EJAmG4Gp37bwKcXnWbKMTHrSX/GVxI7TowdJ 0O+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734488553; x=1735093353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JaAm3+Yvi8vgVHf5Cpjs8yH3dA/f75UaTw9J2GBs+Nk=; b=NWLe0h0shl0acB9qhJNLkJj4Ah+fvUHOh1k6oXJINn/G7Q7wp43OpB6gQrgR4CDSKN 9Hh+tk7krYC4enPDPgCrKkPrppCdoD+4Q31ICyJBfXP3Uv5DAPvLgBA3S8oIxpITySse V4oVLP7StJyQ0twIAkFMmm4P+vnabbl3r9HvAmAphW3ZdJu3lAhMcPkf0cCGrFKDjKxa GJwYg371BdqBR+124p9BAK9bne0SYV2HCMN08qNe1P9QngMMAWuqCvwXh17A0MY5MbJq Yu/gNmC/o8M1dalKxS7qLt3QfRUK83xOScyRtwCjxvVHSlIX51Ao+lHkWrMVUIamNQc9 bdwQ== X-Gm-Message-State: AOJu0Yxx9aaq3Yp3tnhz9eAhK93YT9oCM12+AzqjDA+otXTOs+HuCY8R BmcXNKM2Zmsx4Do6RYfYCrUzTH7BLB/Xi/j7uwrWRWOPFcLFUeMTZN23Z4NQ X-Gm-Gg: ASbGncs9askkA2lEazNrBONDrwo4nKQiJt6qVpTcIc/fvxGh2/d0oG6TfyYaEMwiPc8 5QQ0IyZ7y/eku9IZ0s4V9CEoFpItktXY1CV4Lm8phyOZJN18n4nn5kYAuGKC5LlegkAGQb1Gmg1 kAD8idKZb44/n8K+LxnqcxZG2tntVG3dHhKJdx3Vtd9XzLiRqW9qClzknP0Tj+4TCudQbkBozkf SodaoYKR6aFVA0+Y67iG4KfRmxg3oMwEU1YV3IwZ/HsX5bN6kdtc/DwVeiGHNBPmL8zHUOSEdo7 q4OwsJdfOzszm7KXLiEFe0Tzbb0rB0nDdYHony+EpGLXeJiU X-Google-Smtp-Source: AGHT+IE3GU7EFNiKBV6Pbr92Tx651mDf45w6wCiyTbXsOt3s9RhIDS4lD++L9Zm3D1KY3pi+aKA1gw== X-Received: by 2002:a05:6000:4a03:b0:385:ef39:6cd5 with SMTP id ffacd0b85a97d-388e4d2dd26mr965977f8f.1.1734488552911; Tue, 17 Dec 2024 18:22:32 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801ac5asm12477424f8f.55.2024.12.17.18.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 18:22:32 -0800 (PST) From: Sharlatan Hellseher <sharlatanus@HIDDEN> To: 74668 <at> debbugs.gnu.org Subject: [PATCH v2 2/2] build-system/go: Add test-subdirs option key. Date: Wed, 18 Dec 2024 02:22:27 +0000 Message-ID: <cb3c7b5bb2137493e290e3fffe573589e850fc18.1734488457.git.sharlatanus@HIDDEN> X-Mailer: git-send-email 2.46.0 In-Reply-To: <f04ffeabffb65d34210b547db9704f39c609e7c5.1734488457.git.sharlatanus@HIDDEN> References: <f04ffeabffb65d34210b547db9704f39c609e7c5.1734488457.git.sharlatanus@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>, Sharlatan Hellseher <sharlatanus@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74668 Cc: Sharlatan Hellseher <sharlatanus@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: -1.0 (-) Golang projects may contain subdirectories with test files, which can't be reached by providing just IMPORT-PATH to the test runner. This change implements a TEST-SUBDIRS key parameter which is by default set to "import-path/..." to run all available tests in the project, and may be limited to particular subdirs list. * guix/build-system/go.scm (go-build, go-cross-build): Add "test-subdirs" key parameter. * guix/build/go-build-system.scm (check): Add "test-subdirs" key parameter and adjust test invokation accordingly. Change-Id: Ibc107deea060f0d71e6f4e1e37c81d3b7c9992f5 --- guix/build-system/go.scm | 4 ++++ guix/build/go-build-system.scm | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 97581a14c6..66cb5e8b05 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -205,6 +205,7 @@ (define* (go-build name inputs (build-flags ''()) (tests? #t) (test-flags ''()) + (test-subdirs ''("...")) (parallel-build? #t) (parallel-tests? #t) (allow-go-reference? #f) @@ -239,6 +240,7 @@ (define* (go-build name inputs #:build-flags #$build-flags #:tests? #$tests? #:test-flags #$test-flags + #:test-subdirs #$test-subdirs #:parallel-build? #$parallel-build? #:parallel-tests? #$parallel-tests? #:allow-go-reference? #$allow-go-reference? @@ -264,6 +266,7 @@ (define* (go-cross-build name (build-flags ''()) (tests? #f) ; nothing can be done (test-flags ''()) + (test-subdirs ''("...")) (allow-go-reference? #f) (system (%current-system)) (goarch (first (go-target target))) @@ -316,6 +319,7 @@ (define* (go-cross-build name #:build-flags #$build-flags #:tests? #$tests? #:test-flags #$test-flags + #:test-subdirs #$test-subdirs #:make-dynamic-linker-cache? #f ;cross-compiling #:allow-go-reference? #$allow-go-reference? #:inputs %build-inputs)))) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 9f9eea3069..a785118018 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -98,6 +98,10 @@ (define-module (guix build go-build-system) ;; * Remove module packages, only offering the full Git repos? This is ;; more idiomatic, I think, because Go downloads Git repos, not modules. ;; What are the trade-offs? +;; * Figurie out how to passthrough --verbosity option to "build" and "check" +;; procedures. +;; * Implement test-backend option, which would be similar to pyproject's +;; one, allowing to provide custom test runner. ;; ;; [0] `go build`: ;; https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies @@ -326,13 +330,23 @@ (define* (build #:key "Here are the results of `go env`:\n")) (invoke "go" "env")))) -(define* (check #:key tests? import-path test-flags (parallel-tests? #t) +(define* (check #:key + tests? + import-path + test-flags + test-subdirs + (parallel-tests? #t) #:allow-other-keys) "Run the tests for the package named by IMPORT-PATH." (when tests? (let* ((njobs (if parallel-tests? (parallel-job-count) 1))) (setenv "GOMAXPROCS" (number->string njobs))) - (apply invoke "go" "test" `(,import-path ,@test-flags))) + (apply invoke "go" "test" + `(,@(map (lambda (dir) + (format #f "~a~:[/~;~]~a" + import-path (string-null? dir) dir)) + test-subdirs) + ,@test-flags))) #t) (define* (install #:key install-source? outputs import-path unpack-path #:allow-other-keys) -- 2.46.0
cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
:bug#74668
; Package guix-patches
.
Full text available.Received: (at 74668) by debbugs.gnu.org; 3 Dec 2024 11:46:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 06:46:47 2024 Received: from localhost ([127.0.0.1]:58477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIRMc-0001UT-JQ for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:46:47 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:50598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>) id 1tIRMa-0001Ty-KB for 74668 <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:46:45 -0500 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4349e1467fbso47347135e9.1 for <74668 <at> debbugs.gnu.org>; Tue, 03 Dec 2024 03:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733226339; x=1733831139; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TMeaWdq4JXh2g0HEPjs29PDQ/satiNxdSpqy2Qkm43o=; b=H6qG3mgWQY+kfONDKUE+qP4xFHorTm1BPRCaKnbt1AdIFD3b/c2CDrGmRv4+p137vI so+ZwK/XWRzKR5usAUjrhMv3I69hHZbOvzc27UTUEq+5IfVgK4h7lU1cBMVPkCUn0bwD mYNAyvKFoTh1RfBHr+HOZeZsqjfRw2JPKoNcOawdoCGoAjgdL+4u6qgWRMIF2wJB6ecm ECKly0gETJzxn0q92uHYGPSGLQjeEQgdCKrNVZDwY2GXEp7xfeSJhZPFOP1k06Df7sVt g1YxleLkSeHyKNkJK72YpryceHXkKK9fGbn7lRo+EPQOKbkhhMPJLdM9jRmVWlk+bIx4 0CFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733226339; x=1733831139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TMeaWdq4JXh2g0HEPjs29PDQ/satiNxdSpqy2Qkm43o=; b=S3x57OPubCQYIUpi3+MCVLuhij9dH4O7czeZ7DGz8job8G5c2G8UzavzGqduLuHDLb xl5siXAJdcfr2UEBVrxk27+FRmyUGPksZi5z3oOg3nPaN31AOKeP86QaRyivvTyxg5N0 lkp1VZYMa8jreUuRSDtnz6r6E9MtwU9mAoKrcsLsBNXlQ+Vvz5eZYZyFccpC7geml+0e gV8qZ2s1x0Mo7obOxWOS9WvWSDZ3vxDFj+8CEN0FuHMaBjO6E4Ra91PkRb1Ft7fO+dj7 TXrmTCX1ZY/Hj8zMl65wBoliylviBsDSR4w/vodlZpOOPvbC6Peeo8fipqGkZC2VzljD ZGXA== X-Gm-Message-State: AOJu0YzxKLGcpxJmJB7OvZEpIUeqEeRdlUPyso6ei9p5DkCyKGmFcxat LXHtbKpMMm862y7gm0ZKwEfWucfVNM1datllBM5efqG1/uEPP9Fgqg+vxg9aP2Y= X-Gm-Gg: ASbGnctRyAljrX1C9S+g+QD8wPjfM3Zcio6rf9H9Vrvm8/JBUSLMlSYyGZSGUnbC+f1 wwSR2xWgUl1GFyOy+w7Lebj6lksoshJE5pTobzXd7+Bih2e9yRYYBAxAls8MbGag607BmyPHlGk y7MdaY8onPz8oAIrDWhjLissTXCCYaGGEPNwtgPR5HOpUR4q2wILlaUX45tqukGhYzVgP2ehajY lXnAnvlzxFjA2RM3hNEs7uIZMkUugbbv64xPbnszEOiP4+tsHjR89fOwxgDOw49egAY08BFtxDK LOP04CJ/uEQo2yfr5XjLDdoOsjTApygzaNqbB4NPHw== X-Google-Smtp-Source: AGHT+IEuEzKAVIEkd3mQksDsHdFbma7snhZ7iop/2w4B80GqxkBcA5NA5phB/qcdOIMa/Ph0xl2Whg== X-Received: by 2002:a05:600c:1ca2:b0:434:9cf0:d23d with SMTP id 5b1f17b1804b1-434d0a062a5mr16482565e9.25.1733226338605; Tue, 03 Dec 2024 03:45:38 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b9a9679bsm152903575e9.13.2024.12.03.03.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 03:45:38 -0800 (PST) From: Sharlatan Hellseher <sharlatanus@HIDDEN> To: 74668 <at> debbugs.gnu.org Subject: [PATCH 2/2] build-system/go: Add test-subdirs option key. Date: Tue, 3 Dec 2024 11:45:34 +0000 Message-ID: <3abe629c9ce6355ac9e163bcc9345e856d3f2434.1733224617.git.sharlatanus@HIDDEN> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1733224617.git.sharlatanus@HIDDEN> References: <cover.1733224617.git.sharlatanus@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>, Sharlatan Hellseher <sharlatanus@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74668 Cc: Sharlatan Hellseher <sharlatanus@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: -1.0 (-) Golang projects may contain subdirectories with test files, which can't be reached by providing just IMPORT-PATH to the test runner. This change implements a TEST-SUBDIRS key parameter which is by default set to "import-path/..." to run all available tests in the project, and may be limited to particular subdirs list. * guix/build-system/go.scm (go-build, go-cross-build): Add "test-subdirs" key parameter. * guix/build/go-build-system.scm (check): Add "test-subdirs" key parameter and adjust test invokation accordingly. Change-Id: Ibc107deea060f0d71e6f4e1e37c81d3b7c9992f5 --- guix/build-system/go.scm | 4 ++++ guix/build/go-build-system.scm | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 97581a14c6..66cb5e8b05 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -205,6 +205,7 @@ (define* (go-build name inputs (build-flags ''()) (tests? #t) (test-flags ''()) + (test-subdirs ''("...")) (parallel-build? #t) (parallel-tests? #t) (allow-go-reference? #f) @@ -239,6 +240,7 @@ (define* (go-build name inputs #:build-flags #$build-flags #:tests? #$tests? #:test-flags #$test-flags + #:test-subdirs #$test-subdirs #:parallel-build? #$parallel-build? #:parallel-tests? #$parallel-tests? #:allow-go-reference? #$allow-go-reference? @@ -264,6 +266,7 @@ (define* (go-cross-build name (build-flags ''()) (tests? #f) ; nothing can be done (test-flags ''()) + (test-subdirs ''("...")) (allow-go-reference? #f) (system (%current-system)) (goarch (first (go-target target))) @@ -316,6 +319,7 @@ (define* (go-cross-build name #:build-flags #$build-flags #:tests? #$tests? #:test-flags #$test-flags + #:test-subdirs #$test-subdirs #:make-dynamic-linker-cache? #f ;cross-compiling #:allow-go-reference? #$allow-go-reference? #:inputs %build-inputs)))) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index a463189011..7d702d7f1f 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -98,6 +98,10 @@ (define-module (guix build go-build-system) ;; * Remove module packages, only offering the full Git repos? This is ;; more idiomatic, I think, because Go downloads Git repos, not modules. ;; What are the trade-offs? +;; * Figurie out how to passthrough --verbosity option to "build" and "check" +;; procedures. +;; * Implement test-backend option, which would be similar to pyproject's +;; one, allowing to provide custom test runner. ;; ;; [0] `go build`: ;; https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies @@ -325,13 +329,23 @@ (define* (build #:key "Here are the results of `go env`:\n")) (invoke "go" "env")))) -(define* (check #:key tests? import-path test-flags (parallel-tests? #t) +(define* (check #:key + tests? + import-path + test-flags + test-subdirs + (parallel-tests? #t) #:allow-other-keys) "Run the tests for the package named by IMPORT-PATH." (when tests? (let* ((njobs (if parallel-tests? (parallel-job-count) 1))) (setenv "GOMAXPROCS" (number->string njobs))) - (apply invoke "go" "test" `(,import-path ,@test-flags))) + (apply invoke "go" "test" + `(,@(map (lambda (dir) + (format #f "~a~:[/~;~]~a" + import-path (string-null? dir) dir)) + test-subdirs) + ,@test-flags))) #t) (define* (install #:key install-source? outputs import-path unpack-path #:allow-other-keys) -- 2.46.0
cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
:bug#74668
; Package guix-patches
.
Full text available.Received: (at 74668) by debbugs.gnu.org; 3 Dec 2024 11:46:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 06:46:41 2024 Received: from localhost ([127.0.0.1]:58474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIRMW-0001U6-UU for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:46:41 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:55652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>) id 1tIRMU-0001Tx-UD for 74668 <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:46:39 -0500 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-434a752140eso45394815e9.3 for <74668 <at> debbugs.gnu.org>; Tue, 03 Dec 2024 03:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733226338; x=1733831138; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=riQNr9g+DqbhOPxi9tHYRqYy4JglPhTCjl498FFL7Hk=; b=SB/tBbCTPYeBwm6fYdhsBTE6DNg3A7aNu3DOMCSLguKaAzYyDwjDUqL4NRTn6EqZMC CMinrmzvZb11vmhdOwm72fPGwLRt9gM+ZqIXwcChkXQCEZFgZTAostlwoErkxFJ6oU9p EyfovI1FTCX/4UBirdsP/IZ1e7GBWxHcZt/qfCBQmduCxQu/9fFSId1eWMYNeEhyMW9o cCB99u7RMLPsevAXpj215IN4spsSigckbIk/vC0hXTPPfhp687c3G1zPbphuzs00znqq le2quNCVUI6tR/zr0YbzPishN8Pq2MMNjbkow/EyYVaBVK7vyQGkd+p9sSTT/43US6wX Co8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733226338; x=1733831138; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=riQNr9g+DqbhOPxi9tHYRqYy4JglPhTCjl498FFL7Hk=; b=cGbgIy60c7IcunSQhZBeTe2tBRnGuR/dYCjmbsxBuLkjRD2pZ60XwkGX79XY1aYooo 7kmDc3pITjo0S9Am6+KBHIq8q1+5zID73zv1n1Cbn6fCvNyk4H3mtMaTzIOpgI4kKxlb DJAUGHn13hlE1ct4uru74vulHUB2ZYx/Tfce87U1o94bIy+8qoH0OuK7036lq/gDvE3y PCpTjByFpOOXxqUxJdLNggcXk8PveRMCMxXWtED5MSB61qwmWK2eVpCn1arPhdzbm5S3 hcKV8/MUzjCbmfmMvOZSGJlUoZnVDeWMxBxE/VHSlZ3COCl3aY0Yn2Zi5LhJIJYlF1J1 y6mg== X-Gm-Message-State: AOJu0YwxOeuP5t4N1CCd7qxLQWDSzgAPqr9BtW78liQVmr3+GO2zQv5e u1lNuCnUrZ3AKHmLB6p6WYyQzfYt2BxxUSV9+5ThGLLxiHS5omr24kwjjF/M/sQ= X-Gm-Gg: ASbGncsxxGC3GxqZl9HIhxBg2rO0zv+PjyahiZHFhSfJZlmTjDP2RE1ZXfliDwob5JB PibsnNKa1ubrsf8tF+r23CLFgeIuzq9w4i5N5DGN3wmkTKMRhi9IgkWs5oXqCg0wawSsoXiumxx t53Ba3S0Vfu8/26SxdsWJeEWlWB5u/TSQFug/BCEWKuP0WGOQ0y1SAthjgF8SdxzGl9iQnzpz7j NmSjEjISumyQh5RGERNrFXcikh8Q1KOFnqeIN49ohD8l89CAQeDZCP5f9XGPJeOR8XglPo67fKx tDZXX7bbYbu0e2LRvnAzclDCzVXLQCskq0yZDAYGxA== X-Google-Smtp-Source: AGHT+IEAQQMdG/PeJMC6hqvGJuIBiZ0u6N8r0GOFp6rcEQdIRphnRY/eyZziUhPXy+Qt5iH/5YJU0A== X-Received: by 2002:a05:600c:3b1d:b0:431:44fe:fd9f with SMTP id 5b1f17b1804b1-434d0a0549dmr15520615e9.23.1733226337695; Tue, 03 Dec 2024 03:45:37 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b9a9679bsm152903575e9.13.2024.12.03.03.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 03:45:37 -0800 (PST) From: Sharlatan Hellseher <sharlatanus@HIDDEN> To: 74668 <at> debbugs.gnu.org Subject: [PATCH 1/2] build: go-build-system: Relax build verbosity. Date: Tue, 3 Dec 2024 11:45:33 +0000 Message-ID: <3ea6c0ae31e373d3eac4212dee0bc6b706765ee2.1733224617.git.sharlatanus@HIDDEN> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1733224617.git.sharlatanus@HIDDEN> References: <cover.1733224617.git.sharlatanus@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>, Sharlatan Hellseher <sharlatanus@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74668 Cc: Sharlatan Hellseher <sharlatanus@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: -1.0 (-) During the build phase "-x" option forces go compiler to generate quite a noisy build log which does not help too much when the build is failed. This change makes it optional and governed by #:verbosity key passed to `build' procedure. * guix/build/go-build-system.scm (build): Provide a link to online example. Consolidate options in GOFLAGS environment variable, make "-x" optional. Add description for "-trimpath" option. Change-Id: Icf1b03eb79db8a6f79f86f3cc212a53de5aa7c1c --- guix/build/go-build-system.scm | 40 +++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index e53d8cb53c..a463189011 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -283,23 +283,43 @@ (define (go-inputs inputs) (_ #f)) inputs)))) -(define* (build #:key import-path build-flags (parallel-build? #t) +(define* (build #:key + build-flags + import-path + (parallel-build? #t) + (verbosity 1) #:allow-other-keys) "Build the package named by IMPORT-PATH." - (let* ((njobs (if parallel-build? (parallel-job-count) 1))) + (let* ((njobs (if parallel-build? (parallel-job-count) 1)) + ;; Utilizing GOFLAGS for flexible build options passthrough, refer + ;; for more examples to online documentation of Golang + ;; <https://go.dev/src/cmd/go/testdata/script/goflags.txt>. + (goflags (string-join + (list + ;; Print the name of packages (pathes) as they are compiled. + "-v" + ;; Print each command as it is invoked. When enabled, it + ;; generates a lot of noisy logs which makes identifying + ;; build failures harder to determine. + (if (> verbosity 1) "-x" "") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + "-ldflags=-s -w" + ;; Remove all file system paths from the resulting + ;; executable. Instead of absolute file system paths, the + ;; recorded file names will begin either a module + ;; path@version (when using modules), or a plain import + ;; path (when using the standard library, or GOPATH). + "-trimpath") + " "))) + (setenv "GOFLAGS" goflags) (setenv "GOMAXPROCS" (number->string njobs))) (with-throw-handler #t (lambda _ - (apply invoke "go" "install" - "-v" ; print the name of packages as they are compiled - "-x" ; print each command as it is invoked - ;; Respectively, strip the symbol table and debug - ;; information, and the DWARF symbol table. - "-ldflags=-s -w" - "-trimpath" - `(,@build-flags ,import-path))) + (apply invoke "go" "install" `(,@build-flags ,import-path))) + (lambda (key . args) (display (string-append "Building '" import-path "' failed.\n" "Here are the results of `go env`:\n")) -- 2.46.0
cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
:bug#74668
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 3 Dec 2024 11:45:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 06:45:00 2024 Received: from localhost ([127.0.0.1]:58464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIRKu-0001KO-6c for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:45:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:49632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sharlatanus@HIDDEN>) id 1tIRKp-0001KC-M5 for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 06:44:59 -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 <sharlatanus@HIDDEN>) id 1tIRKo-0001Zg-Dg for guix-patches@HIDDEN; Tue, 03 Dec 2024 06:44:55 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <sharlatanus@HIDDEN>) id 1tIRKl-0001dI-QM for guix-patches@HIDDEN; Tue, 03 Dec 2024 06:44:53 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-434a0fd9778so49977205e9.0 for <guix-patches@HIDDEN>; Tue, 03 Dec 2024 03:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733226290; x=1733831090; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lkpXsAcho3ONphu67OM4bk0pUSAZGqHYtTgDoGToMuU=; b=bz3yZOkRBrXoxtW6E+tP6t3yu3f/tfvKm61vGi7tbtIPV89jrciHuLg/c0S5CwuDlM mdhdAHC/YHjDgcECBz0enxfv7rBCOsZaRWuhGD+1G4QezFuPu8QGRT5iPdcs7sjBERCs m0f9x4HfE2nG8C7aqU2NcsvGLfjKywhRbEuhxAXCe1oOv64Ze0x552ileCj80Eq3o8kb A7Xvv4voh5HubYFnaDkkDSfb8PjmbS1CkCT0p0kSAMOPj41m4z66jaKMnhreto9gdFsI IRcxJygYTKeKoNaoNwQCxlxRqCe/bX6lRwaIBnCSjJ+9qZDJlJzxcBQY2R4jrlAyCLDq FirA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733226290; x=1733831090; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lkpXsAcho3ONphu67OM4bk0pUSAZGqHYtTgDoGToMuU=; b=RMrpscNtXRo4FKXjQUF+PceMICbeVpQM03ayE04QljRjE1q2n9NIGEq9B23g/57Ssh XuY7RvCbdtlfOgTOym6etOYpGnqm7ugQGdPM4fpUt+f/k0kzzmDRSqbHCRkYv4IGDxDT rx1z60sfJeKQV6vYHRCCQj3klWv0rNfCG0hqJ3jSdnaOInUqtdDY3a3CK9U2MyIUqPEV UIbboh0MEcCBzw2c6+P40xLXA8rBW6nf02ilzRbJsF93euCDpxfyL48BtViVCenII3qj R0ha/abzsbGB4GHYRcb1HbrQJOS95yUdggPN7oBsz+2/VnwRXsIpN3LVGSPYWRudxEPG Pn8A== X-Gm-Message-State: AOJu0Yxze6rx0vlSvFX0qr0CnnETMBnN057JfyhkFGe9BKKSgXHgxPx1 aVphKkEasooqs8zxzI0RE2LCpuwwGkQ3LX2H7kJ6uKooz54kGzVr+I3/8AlROhY= X-Gm-Gg: ASbGncsQAP6GJSiDce80/jfd2Cyt73HJogaWQBTgaMn9G+vbwlitHRYCyTm6BeKYTzW aUXN5nrao6TUtdpc30az8Y260XUKlyZ+EOzJTWw29fKakz6SSrQEus59/qjtZpNaPP+SmeK4UvU nWvk/0Gg3dCOJUBOj/vqJKvTZIQddMJwHjf1zJq53uwklDuQymTkivFKI2AS1SdQt0busOW9oAl DHjONJUbWhikyzVYkIq9uEHS5mO2wwh9HzZFxmw0kS5emV6ZpfJNwmJ9xtrAi0p7L1OvTTK0btw reEAHgh9d9xlRgRngtQnVQirsimedNY9y2cGLSAcUw== X-Google-Smtp-Source: AGHT+IHEmZX9BFpMW6Qqa8Ci/Ua9OwVHDBrYB9zo+mgNhSoN+zrBwtiXPzGVtWdRI4gsTKgtviuO3A== X-Received: by 2002:a05:600c:4fc9:b0:434:a0bf:98ea with SMTP id 5b1f17b1804b1-434d09c0b88mr19320355e9.9.1733226289627; Tue, 03 Dec 2024 03:44:49 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0dc6352sm186479695e9.21.2024.12.03.03.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 03:44:49 -0800 (PST) From: Sharlatan Hellseher <sharlatanus@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 0/2] Golang build-system adjustments. Date: Tue, 3 Dec 2024 11:44:45 +0000 Message-ID: <cover.1733224617.git.sharlatanus@HIDDEN> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>, Sharlatan Hellseher <sharlatanus@HIDDEN> Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=sharlatanus@HIDDEN; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@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.3 (--) Hi Guixers! While working on golang refresh and shift tasks I've faced with cases when all tests files are located in subdirs and can't be run with current implementation - #:test-subdirs provides missing option to bypass that limitation, it set to "..." by default allowing to run all available tests, and accepts a list of directories to resolve cicles or failinng tests in sbubdirs. It simplifies pacakges by removing customr check phases this:o --8<---------------cut here---------------start------------->8--- ... (replace 'check (lambda* (#:key tests? import-path #:allow-other-keys) (when tests? (with-directory-excursion (string-append "src/" import-path) (invoke "go" "test" "-v" "./...")))))))) ... --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (replace 'check (lambda* (#:key tests? import-path #:allow-other-keys) (when tests? (with-directory-excursion (string-append "src/" import-path) (invoke "go" "test" "-v" ;; acme - cycle with go-golang-org-x-net "./argon2/..." "./bcrypt/..." "./blake2b/..." "./blake2s/..." "./blowfish/..." "./bn256/..." "./cast5/..." "./chacha20/..." "./chacha20poly1305/..." "./cryptobyte/..." "./curve25519/..." "./ed25519/..." "./hkdf/..." "./internal/..." "./md4/..." "./nacl/..." "./ocsp/..." "./openpgp/..." "./otr/..." "./pbkdf2/..." "./pkcs12/..." "./poly1305/..." "./ripemd160/..." "./salsa20/..." "./scrypt/..." "./sha3/..." "./ssh/..." "./tea/..." "./twofish/..." "./x509roots/..." "./xtea/..." "./xts/...")))))))) --8<---------------cut here---------------end--------------->8--- I've applied it on go-team branch locally and started resolving missing inputs where required. The second adjustments is to make "-x" build flag optional which does not help to resolve build fails and produces a massive log output in most of my cases not helping at all. Unfortunatly, go-team contains not too many active members. CC: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Efraim Flashner <efraim@HIDDEN> Sharlatan Hellseher (2): build: go-build-system: Relax build verbosity. build-system/go: Add test-subdirs option key. guix/build-system/go.scm | 4 +++ guix/build/go-build-system.scm | 58 +++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 12 deletions(-) base-commit: d97a67d41de142c0fbdba55e96bfc147482bfae2 prerequisite-patch-id: 7c60aacd825ea1fd299462d1ae31beb34902fbaf prerequisite-patch-id: 5136c6924ea61be099691eb9b0c227936a08954a prerequisite-patch-id: 47fb416de83dc133d647e3e07a5c398391336eb1 prerequisite-patch-id: 760115bac637e5f39738d82ed16232c8792a8f82 prerequisite-patch-id: f8b63ec4ec753bcc2c3a6022abaf47146e454a72 prerequisite-patch-id: 2d5e20587944fe26b277509396dabd362bf8105c prerequisite-patch-id: 016a80d28a5a0135ebed61b6b5acc460f6c43b32 prerequisite-patch-id: e5f81823c9ea1b93abf1f3fec60e695d16909a06 prerequisite-patch-id: 8badae173015a65a237c45b42241e36355e9f2c1 prerequisite-patch-id: af090660b016e08b3612bee7ca2125bb0e1d00b2 prerequisite-patch-id: 294de506884b2b150eba248b4a1731de95d50176 prerequisite-patch-id: 8ed8c96cf2383811b66abe15f6fa9af73689b94c prerequisite-patch-id: 6dd547d424e4eeb99715847136b3fad7f566d9fa prerequisite-patch-id: ff3892aa0acc89208f4eba1f0866f8da01d1cb21 prerequisite-patch-id: 3a9c1b8c45bb320815892e512fdf3271ea9c8f0f prerequisite-patch-id: 526f9ea0e83f7479ac37679b69f9ad18c38e9234 prerequisite-patch-id: ad91b786810c1a4c13d2d39e0eb51d0932f1060c prerequisite-patch-id: e74404537a20ed352985299432056116f2d8881b prerequisite-patch-id: 0aae6b4b352a367bd8770075b16547c060262e34 prerequisite-patch-id: 0b485c3a7c266118cdafc3b30aebd704b1018af7 prerequisite-patch-id: add3eb95e39cd65a47e86d74909f822e4fcbd542 prerequisite-patch-id: 98487d900da05e0a4f39bb28036918afa76e1d9a prerequisite-patch-id: dedc1426c51db76f30ddd92a8ed04e1793f7839c prerequisite-patch-id: e7606e328c545a4db40d37ca3aa5f99c0b4287f8 prerequisite-patch-id: 63fa87ba5ddf33561784e25199d605aa0b18133e prerequisite-patch-id: 04fe1403ea43cfbeeabbd87ee9b6707c64101c07 prerequisite-patch-id: 3f7cf90125fd223507087c94a92aa16dba2662f2 prerequisite-patch-id: e763a43853180ad952fc5eaeb60e4ef2762f6d3f prerequisite-patch-id: 284d08f1257d7e6c69e46b9e7fee165fa1aa5b07 prerequisite-patch-id: 0ebe96fd52cc9140b53b17046b2aa2b6969a6e2c prerequisite-patch-id: 87339b708e38828f9a1769b3f2740f328a9bb59b prerequisite-patch-id: f3698965b06dbb73c6b702c22830a7e400b8b765 prerequisite-patch-id: 6d464271ac1083b7f303d3ac75963a7bf91e8ce0 prerequisite-patch-id: 93d8965a1a7a4110eb7348d43df9fb39899df5cc prerequisite-patch-id: 1bb520f9ad8cc64b07041ccea8ffb6ad51fea4a7 prerequisite-patch-id: d6c45d0b7fd5a8a744f560c1ee24e90e63546196 prerequisite-patch-id: d11dbd6a272b78c06b2373196897bd02da491e66 prerequisite-patch-id: aa2d3d94d3cebd23780c0785098e728080a25063 prerequisite-patch-id: 5e76884b7109e88da98532ec66c469b39335c14d prerequisite-patch-id: dfaa606ac8721e076b9870eca03721b731e3cc65 prerequisite-patch-id: 26a9585f84c5be0cf6ac60eeab3f62e2c1b59a32 prerequisite-patch-id: 790109ae7b8db35051f0532fb9820cc794f6e90e prerequisite-patch-id: cdcb8df8b8060543aeb46727c6097640784c5f77 prerequisite-patch-id: cef60c111cfd4c7c77b8402196710a334ed4244a prerequisite-patch-id: 6801272b174236af0bb5a94be1e105887f525660 prerequisite-patch-id: 3d03b39da9fcc5961b7672ea82784d68512cc9ef prerequisite-patch-id: 56410b64255826975d87f89c6bca96d96b3bddfa prerequisite-patch-id: 455428488cdc812b099c8a0aed3763632dbdc60c prerequisite-patch-id: 66d83739e60670e4a0bd3db34199da0346e84062 prerequisite-patch-id: cb91e8091b251ad54b16ab0c26145ec1e3207cd9 prerequisite-patch-id: 2b1d8e54b873c0c373a5c1fd3117a73c5c9df7a5 prerequisite-patch-id: 4a31a50b43fa9275f7f7801e658d593fe48798a4 prerequisite-patch-id: 43d9065cfb585329af82ff9b7510896ed5be6ea5 prerequisite-patch-id: 0742f873787eafc96b5bf2711e1ff19bc2c55970 prerequisite-patch-id: 0620608a1dfe736dc00327ee00b8bc9b24d374ae -- 2.46.0
Sharlatan Hellseher <sharlatanus@HIDDEN>
:cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
.
Full text available.cox.katherine.e+guix@HIDDEN, sharlatanus@HIDDEN, guix-patches@HIDDEN
:bug#74668
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.