From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CIXbI+uM42UvWgEAe85BDQ:P1 (envelope-from ) for ; Sat, 02 Mar 2024 21:32:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CIXbI+uM42UvWgEAe85BDQ (envelope-from ) for ; Sat, 02 Mar 2024 21:32:43 +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=QdKtmaaW; 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=1709411563; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=VrtKnuvQDy0S8d9RT/TcxurjJIiV6QFTCuFVae2LPTU=; b=Qrz7ydcIXrg1rWX7r0o8fhH97bHnnVl7erYtszTDNP/KjkzZonABJz/EF2vbhaRYMyvBO0 L1jOjVcS+jAX8YhbKlCzuXegoWrI19+dx/+Fno3eKhxqiODdAEf1EukIoVkPQ6T2nhusSk 1uWDHYrbDphmrfwW/drnV6oUb8Taleb/+xYw4yNruk2fYZhldiA0dZ/Hs+xb/I7cX5X8eR 4fllfzhvI5XvQSWm7QmS4ZgTvfXqZe62T111OgHIy6WG61IjedHGYO3BKCQ67eAgerbChV fFEBssb41VB7r4RuaevDZPzGcqjp/QmoukNUrQUz8Ib9pr7ifxJtTL4X0JhlOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=QdKtmaaW; 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=1709411563; a=rsa-sha256; cv=none; b=AWVPjf/aCmIKuM839dIKndETG/qQIJRsmGwDDfaHKKOWLzFpjLRAoVVccTjg9Wu9/8cAKi zZU1uzGxZtQSk+EpVg1fRiEwPYmhsWZB6jKJHEUfmt83mY0sr1VtHZwFG4vszoMA6aHhmj 88/gezh8jj8t4t0bmNoIQYPm4RWSESxbzf0o36tU7bwgPclEtzNn0vu5umrRkKDTrsZAfE adIGT0QAWB7g6C3Dwe9hOtGzP0SHiSXL1FRnbvN7y9wLqURZGQofaUYT9iAsf/M0CkJgGp UuubiJrByysRb2B7eyZlKZ0c6A5C3iahfcd55fonDKJBvygyfMsbXuOFR269MQ== 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 E971959C86 for ; Sat, 2 Mar 2024 21:32:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgW28-0001AP-Gn; Sat, 02 Mar 2024 15:32:36 -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 1rgW26-00019w-Mj for guix-patches@gnu.org; Sat, 02 Mar 2024 15:32:34 -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 1rgW26-0005DB-Eb for guix-patches@gnu.org; Sat, 02 Mar 2024 15:32:34 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rgW2Y-0001JM-Ja for guix-patches@gnu.org; Sat, 02 Mar 2024 15:33:02 -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: Sat, 02 Mar 2024 20:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69512@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17094115454982 (code B ref -1); Sat, 02 Mar 2024 20:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Mar 2024 20:32:25 +0000 Received: from localhost ([127.0.0.1]:39384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgW1w-0001IH-L7 for submit@debbugs.gnu.org; Sat, 02 Mar 2024 15:32:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:59098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgW1t-0001I9-Om for submit@debbugs.gnu.org; Sat, 02 Mar 2024 15:32:22 -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 1rgW1Q-00011n-6d for guix-patches@gnu.org; Sat, 02 Mar 2024 15:31:52 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgW1N-00047v-H8 for guix-patches@gnu.org; Sat, 02 Mar 2024 15:31:51 -0500 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2d29aad15a5so38563471fa.3 for ; Sat, 02 Mar 2024 12:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709411507; x=1710016307; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=VrtKnuvQDy0S8d9RT/TcxurjJIiV6QFTCuFVae2LPTU=; b=QdKtmaaWdwIEgavyr3F9rdpeV6ARw8GSOjlGlNB8UdoqEV9+RFsLFEEnUH/gc5N8rg HsKPaZtT1gnHPFWRkzyYAG4iv82k6XmX18NALkaNCkPQH4ugoT51MRhzsycz5QHUykIk IY97LOLeG+r+pVPiMvSkiigzPLyn9MRT/qjjMnCNhmG52pYWXPFbDNu3Y79nCPWr+O2Y 2PVnvR5rq2CHKeg5vF0ogWctvlQXHqTDSNiIDr+6+1mNDA5zDJnTeaeh8svj5b0rCKp+ TY3qrQflO0nIqN7wyyXVaLZgKCAEPQ/A6PyRzaTEWPDTWHA793NtKHbPqh+MwLhCXnf0 s+JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709411507; x=1710016307; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VrtKnuvQDy0S8d9RT/TcxurjJIiV6QFTCuFVae2LPTU=; b=aNP0zPyEyCF2po+qTuIZ40vnAqRjjpTArQIeZ3ogMxzxHZRiqc0LLM8mM4DCwMqTky 2NVWairKKe6pi0M0y6lvV2twAbmMeHeFiLbiYG0DA9VkbWTod4dJU6IkocsqIlQoYHCU eH7/CbaQQCfsb2zA8ijw5KVS0YdppoWulWtDKPq01hwk3cKkjWEa+Sw07vUI7kZdgC08 px7Fp72GjpnH5AaV1ufpBM5gy5DsXYWtSdp2PnEFPPCJgGIvbkFXqZbG6Sl3eQRs8MEs QBYqy7yr//x7ASJoN2WZPB111aC2lHY6VffPf5ecpA13a7DY7dSjx7PgaM2kobvISf+2 c+lw== X-Gm-Message-State: AOJu0YwReor3IIVJnCTqWxecWtmjd3YnICMMCN9w/37RwS8rbzRH8x0d YH5ZRdrjR6RMzQvz+MgNfKebDiiPIYXhUUCGU2D9cmXFVZsrLqwIrghJigBWa+A= X-Google-Smtp-Source: AGHT+IFGTOTgwEgCZx9umryTxurCdVHbmFe/CfImcKxx+XqAj1rjvZMF5ikMxyNeWunrL/BOd5JpAw== X-Received: by 2002:a05:6512:3eb:b0:512:9c8f:d4c5 with SMTP id n11-20020a05651203eb00b005129c8fd4c5mr2664098lfq.26.1709411506436; Sat, 02 Mar 2024 12:31:46 -0800 (PST) Received: from elephant ([5.164.220.172]) by smtp.gmail.com with ESMTPSA id m17-20020ac24ad1000000b005128d91b9f2sm1089412lfp.161.2024.03.02.12.31.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 12:31:45 -0800 (PST) From: "Artyom V. Poptsov" Date: Sat, 02 Mar 2024 23:31:43 +0300 Message-ID: <87msrgbck0.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" Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=poptsov.artyom@gmail.com; helo=mail-lj1-x234.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.47 X-Spam-Score: -7.47 X-Migadu-Queue-Id: E971959C86 X-Migadu-Scanner: mx11.migadu.com X-TUID: wVBLDfI+HKXe --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello, this patchset adds two packages: "go-github-com-hashicorp-errwrap"[1] and "go-github-com-hashicorp-go-multierror"[2]. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Add-go-github-com-hashicorp-errwrap.patch Content-Transfer-Encoding: quoted-printable From=208ac21911360fa825fc0b13bd58ef64c5c9151ec7 Mon Sep 17 00:00:00 2001 Message-ID: <8ac21911360fa825fc0b13bd58ef64c5c9151ec7.1709411277.git.poptso= v.artyom@gmail.com> 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: 6f5ea7ac1acb3d1c53baf7620cca66cc87fe5a73 =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=207887e3d855da22c33306bbd5729d396b607d78ad Mon Sep 17 00:00:00 2001 Message-ID: <7887e3d855da22c33306bbd5729d396b607d78ad.1709411277.git.poptso= v.artyom@gmail.com> In-Reply-To: <8ac21911360fa825fc0b13bd58ef64c5c9151ec7.1709411277.git.popts= ov.artyom@gmail.com> References: <8ac21911360fa825fc0b13bd58ef64c5c9151ec7.1709411277.git.poptso= v.artyom@gmail.com> 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 Those packages are required for the newer Kubo (IPFS) versions. [3] References: 1. https://github.com/hashicorp/errwrap 2. https://github.com/hashicorp/go-multierror 3. https://github.com/ipfs/kubo/blob/a01cc58c8dc4388eaf067e194ef1ee39191f86= b5/go.mod#L17C2-L17C36 =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+BzbchX4FAmXjjK8ZHHBvcHRzb3Yu YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfvGWD/4kJNJuTN1sZwiCetRYOiYl aiXyOzHbF1unFA/u3hDMW4tkaexvPnQwduhwqWygG4A+PrLAeltcC/ejrhDYvQl8 PC8ryxaQFxevEAm+7/J7cixAscOMXkvb48dLplwsN5cm6zrR/J12qnkTa9IS5lk3 Mh3NnwIwnTmfWB5EMbVVtaiECgjipzf+QgfAL79EN/qNFuzt3eR8b+I33Nddf4W8 Y5HuRrJkbUwiU0o4tnKrRXwKg6buv8RUXkrg8KihIzWHK2QZHbjsgrqoRWAvCaIG xzY1wDCgqB1jtRec4wMOV2K0+CmFDkJottRQnSaXNyql/BH4JFuwKjAf70vxx040 bp56HQQrCzfVBiNSrPhBcS3rpogrpGkAR/Pd19QYu33iDIS5QFfEi37o8LNy4Rbg 11suHGVnlAuOYZA6uFsrF852mDomRtu6RwT6nQ+Omgg2nh+YNWTdFW9eB16X31YF juYG09liRcLu4shtkC/8ABIKoNxLqmAcMgvwfgQJi5o3sJKVszDXdddIdzGawrYF ca+aHbqOtmKwEvaux2GJgZSgGI7fdSBOZuaVkWkJk6GP24LheBzllw6RbOiyabWE zTIIykj/8jdUjbbYMjZmaP2VJVfTvtvVF2wudliE2aHjy1MmUs9g7cWxCgLMPWdh 6pAH9d1NoR0uytj10b3kvg== =LEbP -----END PGP SIGNATURE----- --==-=-=--