From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wBuCAVZ352X2dwEAqHPOHw:P1 (envelope-from ) for ; Tue, 05 Mar 2024 20:49:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id wBuCAVZ352X2dwEAqHPOHw (envelope-from ) for ; Tue, 05 Mar 2024 20:49:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=BQBP6VIi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709668181; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=3BDSX9wWDlPPhmYN1bRD+0QbnYFxAS2pqPVcnLsYv7I=; b=PnLBSVJrLb2ZYG7LVpP2XeFhgFl9i9eDCU0fXJgi7ikZBZNfSCdvsLgJ7kHFpFkOpMjb4a 8O+OoueQcErW1vju/dcopJzjDBSlDv15T5gu6+vm87zPE1LKiAmUGb576hYTYpeasbcj5p XvbilC/MrE8N33qViUPeg8n7x4KbR5DR+9wgPHT7aJrn0QtVVHSpqB2x3DmSQtg8jSDvKZ he/gb1F8lKwKh2Q2U9fUWaPVpt/iNaCAoPfvBuEctT4/FjenwSJbCZQc8LpO+KA//DTHuW HhJOuB/J3xNUmX1i1FNcR4Q4qzzAIviSi/XVPA4GW1Iq6JTcYrv2kTcHrE5wGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=BQBP6VIi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709668181; a=rsa-sha256; cv=none; b=nue2wFzEZ4rsGzBcC4Tn/9HbZyimCllJL+jYljpN/bwkwkni/xpEGhqhXlueXYEZpmv6p7 oM6YjO8ERj090TvXWuhjlCFD0SWrOYCK163rQEkI85OY2q66zIBZLDeLqiad3rv6Kxvis7 Aw/VaGNA48Euq8a1Pz2A8uBKMKVAr20Unb7x+ZBwUcvi4xZPAfojW8ifPc4lJNlaIVumXE XEhMk582kr8pjo/VNA6uIC9R9zr56mmlYPEHy8Lrg0sD78VQF7yGPGIZjbIUhIZikvLuKx grW1j4cYHwSrYZ9aED60OGz/kk0PXDRsVMSrj/gACmPHt4VO8bdAWWt8vRhzsA== 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 A2E6672C01 for ; Tue, 5 Mar 2024 20:49:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhan6-0004SV-Qo; Tue, 05 Mar 2024 14:49:32 -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 1rhan5-0004SN-O8 for guix-patches@gnu.org; Tue, 05 Mar 2024 14:49:31 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhan5-0000IB-GH for guix-patches@gnu.org; Tue, 05 Mar 2024 14:49:31 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhanZ-0003DB-Rc for guix-patches@gnu.org; Tue, 05 Mar 2024 14:50:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69512] [PATCH] gnu: Add go-github-com-hashicorp-go-multierror. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Mar 2024 19:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sharlatan Hellseher Cc: 69512@debbugs.gnu.org Received: via spool by 69512-submit@debbugs.gnu.org id=B69512.170966816012215 (code B ref 69512); Tue, 05 Mar 2024 19:50:01 +0000 Received: (at 69512) by debbugs.gnu.org; 5 Mar 2024 19:49:20 +0000 Received: from localhost ([127.0.0.1]:49047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhamt-0003Au-SZ for submit@debbugs.gnu.org; Tue, 05 Mar 2024 14:49:20 -0500 Received: from mail-lj1-f177.google.com ([209.85.208.177]:49282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhamo-00039l-Dk for 69512@debbugs.gnu.org; Tue, 05 Mar 2024 14:49:18 -0500 Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d288bac3caso75365261fa.2 for <69512@debbugs.gnu.org>; Tue, 05 Mar 2024 11:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709668057; x=1710272857; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=3BDSX9wWDlPPhmYN1bRD+0QbnYFxAS2pqPVcnLsYv7I=; b=BQBP6VIiE8zBy5KmMLRMnDMt6NyQjqHo7ZeWXBLeSDJEmVSIrgUstwgM95A+BQl8H6 2G0suoxpxHF7T+Rt0TNq7yxyJt2koaab+Yyt+JJdzRa+M+drsKwR+4oxeuKM7iGDa38u nIC1OLnxB6lzrwW4dH0035wAGcZJCxpTB+kQyAGidn6SN2YUHb3cMIsj4hItw1TDrlqQ Pnfngo/JjIPy9y6HwMEDsNpplCBl8XI7/SfwYv9GJ0Qm6DuTplyFH8iwgC0WXE2hZt6E Ie9hKB5B/OGJvBjb4HnSMtOU85Lbn6/Wys/ReEzy+NY+IwDstf9sb0WsEdxG/wxPFKYz xFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709668057; x=1710272857; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3BDSX9wWDlPPhmYN1bRD+0QbnYFxAS2pqPVcnLsYv7I=; b=ICApbRCRfyjA05oIvBryrZzwHIZ6ChkeTzMZxiSDE/Alf34BjWLOY+yfesOoAoG961 rHH5uHJiTRFSFegZmFA5kwaoiGO0jRoxnj1/XohtT3iINw0Kh1Qm1yNakzSGyiF9CnCE 4SteJc1t6Nkg3XBmcBolIpPv0zzBEuOUKnRkV1GQTk19lHpohLhj1UtNQjboMzaFCRfI rSZQdxzfYmLOBG8dUcLyMuEssqzvmi0P0FOJyW0Z7x4gSgv2qC/zIkpIajPlstlPBM7Z INfh9OpDUKqEVNaGTkaqVWLeJi5zYEp4iLS+4ZatqL+cyoxE88FHRe3z0/xLrtDgSnrs 3Rtw== X-Gm-Message-State: AOJu0YypqQPBzwjdcBOMDxBpqIsZ5+Ro+kb1UIJMHvlGlahLZOqoLI8/ fZiV9cnnWrdb+qwjPtiRGxWh5hUMQ9dBRxW/HLE6/2Uk0RqrUIRxI+pM7JQZ X-Google-Smtp-Source: AGHT+IEEUU7871Pu29A+lNJ2XNizjMmgZwCsQRNMc3Pqz8Oy5bYNQs6YDbjyeUus+ASZT42j1qLM2g== X-Received: by 2002:a2e:bc1b:0:b0:2d2:e9f7:6753 with SMTP id b27-20020a2ebc1b000000b002d2e9f76753mr2549507ljf.39.1709668057101; Tue, 05 Mar 2024 11:47:37 -0800 (PST) Received: from elephant ([5.164.220.172]) by smtp.gmail.com with ESMTPSA id r4-20020a2e9944000000b002d2a4431fc4sm2267441ljj.119.2024.03.05.11.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 11:47:36 -0800 (PST) From: "Artyom V. Poptsov" In-Reply-To: <87jzmhnfyr.fsf@gmail.com> (Sharlatan Hellseher's message of "Tue, 05 Mar 2024 10:14:04 +0000") References: <87jzmhnfyr.fsf@gmail.com> Date: Tue, 05 Mar 2024 22:47:34 +0300 Message-ID: <87edco8nqh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.41 X-Spam-Score: -5.41 X-Migadu-Queue-Id: A2E6672C01 X-TUID: DPnpq8joqSVf --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Oleg, here are re-based patches -- maybe it'll help to solve build problems. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Add-go-github-com-hashicorp-errwrap.patch Content-Transfer-Encoding: quoted-printable From=20d2a20e0d9659b3fbdfd6593c01067dafd61cf157 Mon Sep 17 00:00:00 2001 Message-ID: From: "Artyom V. Poptsov" Date: Sat, 2 Mar 2024 23:25:06 +0300 Subject: [PATCH 1/2] gnu: Add go-github-com-hashicorp-errwrap. * gnu/packages/golang-xyz.scm (go-github-com-hashicorp-errwrap): New variable. Change-Id: I4a0e7c23f9aaab4e29c81a68d976dafcd86dd2d1 =2D-- gnu/packages/golang-xyz.scm | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index e68948e495..b52753c9bb 100644 =2D-- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -686,6 +686,44 @@ (define-public go-github-com-gabriel-vasile-mimetype @end itemize") (license license:expat))) =20 +(define-public go-github-com-hashicorp-errwrap + (package + (name "go-github-com-hashicorp-errwrap") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/errwrap") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0p5wdz8p7dmwphmb33gwhy3iwci5k9wkfqmmfa6ay1lz0cqjwp7a")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/hashicorp/errwrap")) + (home-page "https://github.com/hashicorp/errwrap") + (synopsis "Go library for wrapping and querying errors") + (description + "@code{errwrap} is a package for Go that formalizes the pattern of wr= apping +errors and checking if an error contains another error. + +There is a common pattern in Go of taking a returned @code{error} value an= d then +wrapping it (such as with @code{fmt.Errorf}) before returning it. The pro= blem with +this pattern is that you completely lose the original @code{error} structu= re. + +Arguably the correct approach is that you should make a custom structure i= mplementing +the @code{error} interface, and have the original error as a field on that= structure, +such as @url{http://golang.org/pkg/os/#PathError, this example}. This is = a good +approach, but you have to know the entire chain of possible rewrapping tha= t happens, +when you might just care about one. + +@code{errwrap} formalizes this pattern (it doesn't matter what approach yo= u use +above) by giving a single interface for wrapping errors, checking if a spe= cific error +is wrapped, and extracting that error.") + (license license:mpl2.0))) + (define-public go-github-com-jinzhu-copier (package (name "go-github-com-jinzhu-copier") base-commit: b6dec0108f99d75066bad15aaa124b84bb0261f3 =2D-=20 2.41.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-gnu-Add-go-github-com-hashicorp-go-multierror.patch Content-Transfer-Encoding: quoted-printable From=20f728a31c50c34a13efdfc4dec1a928efbbd35e39 Mon Sep 17 00:00:00 2001 Message-ID: In-Reply-To: References: From: "Artyom V. Poptsov" Date: Sat, 2 Mar 2024 23:26:40 +0300 Subject: [PATCH 2/2] gnu: Add go-github-com-hashicorp-go-multierror. * gnu/packages/golang-xyz.scm (go-github-com-hashicorp-go-multierror): New variable. Change-Id: I6b09a52dc314c4cc6903690738debf4b6c99393f =2D-- gnu/packages/golang-xyz.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index b52753c9bb..3dcfd690a3 100644 =2D-- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -724,6 +724,39 @@ (define-public go-github-com-hashicorp-errwrap is wrapped, and extracting that error.") (license license:mpl2.0))) =20 +(define-public go-github-com-hashicorp-go-multierror + (package + (name "go-github-com-hashicorp-go-multierror") + (version "1.1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/go-multierror") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0l4s41skdpifndn9s8y6s9vzgghdzg4z8z0lld9qjr28888wzp00")))) + (build-system go-build-system) + (inputs (list go-github-com-hashicorp-errwrap)) + (arguments + (list + #:import-path "github.com/hashicorp/go-multierror")) + (home-page "https://github.com/hashicorp/go-multierror") + (synopsis "Go package for representing a errors list as a single error= ") + (description + "@code{go-multierror} is a package for Go that provides a mechanism f= or +representing a list of @code{error} values as a single @code{error}. + +This allows a function in Go to return an @code{error} that might actually= be a list +of errors. If the caller knows this, they can unwrap the list and access = the errors. +If the caller doesn't know, the error formats to a nice human-readable for= mat. + +@code{go-multierror} is fully compatible with the Go standard library @cod= e{errors} +package, including the functions @code{As}, @code{Is}, and @code{Unwrap}. = This +provides a standardized approach for introspecting on error values.") + (license license:mpl2.0))) + (define-public go-github-com-jinzhu-copier (package (name "go-github-com-jinzhu-copier") =2D-=20 2.41.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D avp =2D-=20 Artyom "avp" Poptsov Home page: https://memory-heap.org/~avp/ CADR Hackerspace co-founder: https://cadrspace.ru/ GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmXndtYZHHBvcHRzb3Yu YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfsGYD/944CHM60QSNklpSWjZm+qA E8oFExQu4SHuH77La35SAhbhKs/yKl6Klwq48f+bkfBQOBGZjDlags+w3WnxHA7v 1WUpko8pyLMeKTp/g8ncA/1yTfEj1OhAHg+urEtYus1lillji7t1Z7jxfh6uRYJ0 EmwHiiywFq0t0i1uga3ULlxA/9K+/ybt9F7ILDFKtPUeInjXPtk4zmlCDyP9hnTx h2orGWw6OVIw4TTsvym0DyJ6I4VEUYIKv5ziJoiXNEMfT+SsaTZebImD8PxvOsis D4esg9Rb7q8SAh1lRRnGKDgoUPvlcazRcLcEiT0y26hQ2hJsgvqOm6ug+2zhGDNe L1mSomMaJQ+EnAyGtzx/XltXHT8Y/v1ehDf8688AwKqP9KdU55/zUPmqKa6JADnf /4DtWyPhkF80V1eRiWjWRCFRGij130kugV11wMLTymrk+AWl0Oa72OiY448lhzsM xwad97M+neEAaU6IKpPVk7vDicnpbVu4emimR1nitvE2EJEmZPI71ymTFeuUYV9J 6A1Od/Lj59Vaq2FiFPJIabHJyxBwQD3bVKAT52Qv7IHdbKQLvmMIyvqTB2BuyP2F ENEFJjCLBg6huxGa/jXGIoGfcuLyYoDMrBnw7i+DHIORKuIhiC0GBzDxvlFks6aD +RgineVtCmGcggRaTj8tmQ== =R6qd -----END PGP SIGNATURE----- --==-=-=--