[PATCH] gnu: Add go-github-com-warpfork-go-wish.

  • Done
  • quality assurance status badge
Details
2 participants
  • Artyom V. Poptsov
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 28 Apr 12:52 +0200
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
e844bacc8d04ef734ca14890cfe551eb04233e8b.1714301574.git.poptsov.artyom@gmail.com
* gnu/packages/golang-xyz.scm (go-github-com-warpfork-go-wish): New variable.
* gnu/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add
"go-github-com-warpfork-go-wish-fix-tests.patch".

Change-Id: Ic3245a1112ef2e04b22cf26be23f27bf3ff90e9e
---
gnu/local.mk | 1 +
gnu/packages/golang-xyz.scm | 28 ++++++
...ithub-com-warpfork-go-wish-fix-tests.patch | 85 +++++++++++++++++++
3 files changed, 114 insertions(+)
create mode 100644 gnu/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch

Toggle diff (146 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 42961e60b2..03c91cfb9d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1394,6 +1394,7 @@ dist_patch_DATA = \
%D%/packages/patches/go-github-com-golang-snappy-32bit-test.patch \
%D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
%D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \
+ %D%/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch \
%D%/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch \
%D%/packages/patches/go-skip-gc-test.patch \
%D%/packages/patches/gourmet-sqlalchemy-compat.patch \
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index fcb352148c..34e9220e40 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -3132,6 +3132,34 @@ (define-public go-github-com-vividcortex-ewma
weighted moving averages}.")
(license license:expat)))
+(define-public go-github-com-warpfork-go-wish
+ (package
+ (name "go-github-com-warpfork-go-wish")
+ (version "0.0.0-20220906213052-39a1cc7a02d0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/warpfork/go-wish")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0rqbxmqwzy1q2zwy3mszp0li0pg8zzh3j9l8wlzr6p1pq2idallq"))
+ (patches (search-patches
+ "go-github-com-warpfork-go-wish-fix-tests.patch"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:go go-1.21
+ #:import-path "github.com/warpfork/go-wish"))
+ (home-page "https://github.com/warpfork/go-wish")
+ (synopsis "Simple, functional, composable test assertions for Go")
+ (description
+ "@code{wish} is a test assertion library for Go, designed to gracefully enhance
+the Go standard library testing package and behaviors of the @command{go test}
+command.")
+ (license license:expat)))
+
(define-public go-github-com-whyrusleeping-go-sysinfo
(package
(name "go-github-com-whyrusleeping-go-sysinfo")
diff --git a/gnu/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch b/gnu/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch
new file mode 100644
index 0000000000..27738ac59b
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-warpfork-go-wish-fix-tests.patch
@@ -0,0 +1,85 @@
+From d53c651a8fd65656e486eb5c7e20ab889f64639b Mon Sep 17 00:00:00 2001
+From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
+Date: Sun, 28 Apr 2024 13:24:34 +0300
+Subject: [PATCH] output_test.go: Fix tests
+
+* output_test.go (TestGoTestOutputTree, TestGoTestOutputFun): Fix
+ tests.
+---
+ output_test.go | 40 ++++++++++++++++++++--------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/output_test.go b/output_test.go
+index eb3e0e9..58948c2 100644
+--- a/output_test.go
++++ b/output_test.go
+@@ -75,15 +75,15 @@ func TestGoTestOutputTree(t *testing.T) {
+ diff := strdiff(nom, Dedent(`
+ === RUN TestGoTestOutputTree_helper
+ === RUN TestGoTestOutputTree_helper/subtest
++ output_test.go:NN: wtf
+ === RUN TestGoTestOutputTree_helper/subtest/subsubtest
++ output_test.go:NN: sadz
+ === RUN TestGoTestOutputTree_helper/subtest/happy_subsubtest
++ output_test.go:NN: ooh!
+ --- FAIL: TestGoTestOutputTree_helper (N.NNs)
+ --- FAIL: TestGoTestOutputTree_helper/subtest (N.NNs)
+- output_test.go:NN: wtf
+ --- FAIL: TestGoTestOutputTree_helper/subtest/subsubtest (N.NNs)
+- output_test.go:NN: sadz
+ --- PASS: TestGoTestOutputTree_helper/subtest/happy_subsubtest (N.NNs)
+- output_test.go:NN: ooh!
+ FAIL
+ exit status N
+ FAIL github.com/warpfork/go-wish N.NNNs
+@@ -149,28 +149,28 @@ func TestGoTestOutputFun(t *testing.T) {
+ diff := strdiff(nom, Dedent(`
+ === RUN TestGoTestOutputFun_helper
+ === RUN TestGoTestOutputFun_helper/subtest
++ output_test.go:NNN: hello!
+ === RUN TestGoTestOutputFun_helper/subtest/subsubtest
++ output_test.go:NNN: ShouldEqual check rejected:
++ @@ -N +N @@
++ - snafoo
++ + zounds
++
++ output_test.go:NNN: ShouldEqual check rejected:
++ @@ -N +N @@
++ - zebras
++ + cats
++
++ output_test.go:NNN: ShouldEqual check rejected:
++ interface{}(
++ - struct{ Foo string }{},
++ + struct{ Bar string }{},
++ )
++
+ === RUN TestGoTestOutputFun_helper/subtest/happy_subsubtest
+ --- FAIL: TestGoTestOutputFun_helper (N.NNs)
+ --- FAIL: TestGoTestOutputFun_helper/subtest (N.NNs)
+- output_test.go:NNN: hello!
+ --- FAIL: TestGoTestOutputFun_helper/subtest/subsubtest (N.NNs)
+- output_test.go:NNN: ShouldEqual check rejected:
+- @@ -N +N @@
+- - snafoo
+- + zounds
+-
+- output_test.go:NNN: ShouldEqual check rejected:
+- @@ -N +N @@
+- - zebras
+- + cats
+-
+- output_test.go:NNN: ShouldEqual check rejected:
+- interface{}(
+- - struct{ Foo string }{},
+- + struct{ Bar string }{},
+- )
+-
+ --- PASS: TestGoTestOutputFun_helper/subtest/happy_subsubtest (N.NNs)
+ FAIL
+ exit status N
+
+base-commit: 39a1cc7a02d01d037bc6bc075e6550279026e645
+--
+2.41.0
+

base-commit: 4178eaf3b2eeea8f6c2e49b1d65cd60a1663c4a9
--
2.41.0
S
S
Sharlatan Hellseher wrote on 28 Apr 21:47 +0200
(address . 70625@debbugs.gnu.org)
CAO+9K5oCVsDe0UsEjfqkkuS1_CbMnhShSui0J8Dx67CMEcTgvQ@mail.gmail.com
Hi,

Thanks for the patch.

It would be nice to ping upstream first about failed tests.
They may be disabled with ref link to open issue in the package.

Oleg
Attachment: file
A
A
Artyom V. Poptsov wrote on 30 Apr 07:33 +0200
(address . 70625@debbugs.gnu.org)
877cgfl8i8.fsf@gmail.com
Hello Oleg!

Toggle quote (2 lines)
> Thanks for the patch.

You're welcome!

Toggle quote (3 lines)
> It would be nice to ping upstream first about failed tests.
> They may be disabled with ref link to open issue in the package.

I made a fork and pushed the changes on a branch:

But the upstream is archived and does not accepts pull requests nor new
issues:

As the "go-with" author writes in the README:
Toggle quote (2 lines)
> Deprecated, and unmaintained. Alternatives are available!

Unfortunately for us there are some[1] Go packages that still require
"go-wish" (namely some Kubo-related packages) and unless those packages
migrate away from "go-wish" we have to keep to patch it.

- avp

References:

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmYwgrAZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfrItD/wPLwHhLdsGyJxwKdDOlzJd
PdKLn7e0F6Iey/57SV4kEFOkZ2Fpwa3a3bB3yDdudfF3Zt4dXApIJhZdB158sHhg
qxUJ8dNzWeH8VTuQTbclJzjPgTEwgkGOSvBV3HvEemo6hD60NQutPxX618LwzthX
gFr8vLTJ0oW1XOwKromtd96TxjoxOVdXk3THf7H/QoTXXcYYhbv5dzw4Vv/fsWzI
419HNpP9j2IqDWQDjx30izfZeYM0njWEZXdBoawsKf1EbzH84UCHqwFvUGwbUQGC
Nnxt0oaRmt+CA6Cf3ImPG6HDPORWZlwzNR7A5LP1482ScdGP6JCqQFP9jxodvJPy
EPa9oBbvgw24h0KNQ6e87n4JdynPvHSiu6ZtGNt1GPH3AXlP4jOhdTBrOSpviP5V
GBrA05xGUzyUseFfHsMFPdf09Mnfnz23YXsSrlIlH1dzhUVgJqqSc62zFVcmU0sH
PI7yhi8XL0QpkmpD1lOd2R1Ojl7DzwXkPLGwOCAwiq75bXhtfIc2ZMVqSXRUlRIf
0o2qH0Y9pvS7vT0UZ63Th9gV6BThz8NLqsEawiqPkmNHcGA3r9qsfTcslXiAX0xr
WrNiHkaqxFaijjbnjykWZe63AanIEJSd2sDwV/Sx92RoPji3bYtFfOAn5SXXb2fw
W+9D93UV15J1GGVxrHGWgA==
=tcvD
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 17 May 00:28 +0200
(address . 70625-done@debbugs.gnu.org)
87o7958k8a.fsf@gmail.com
Hi,

Moved to golang-check and pushed
6d36befee8a74e206aead4b5c5a037b4a1b85310 to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmZGiJUACgkQdtcnv/Ys
0rV4NA/+L5QQzhWcUMU2jeJECWvpEg1Ai6/uNwg0hKHg6LkG89wUbiL7ohwnZ80Y
uTON4uhN1arKWBlvbe0D+Yv4p90++V30sIIIMVnuLmwk9C1x2jP2jBur266gauRh
OEgLnXaKM5jBWPZg4lklfkUfSxokXQRlwOVVks+GusOKsmEM+Fi6PU022ky3gWd9
QoNyAig8zT9teR9bHVrcemWqr7CJSQGQPD9gYl7p2d889WIUbHve6X2jiEc0q0D5
yzAI/2BKPxk7VkAliULxJcRmhsdM0jCM25tur1SA2vFXy2u8wyNTlD9pfbrVIKQm
IMeAWhwMnMn35OtxLHeExbzJyauyBAuB9DmsgYcTQlYE54nBcMBuTc3vjFoLUhfp
XrA9p9kXAf3JGrIqW8tVEYh32CTc4wuLszau9QiPz+Lr63OD6cpD+G9+Axhzv52b
thW7r6uC0hVTM5HCO9WOFWuzheCHP3tJYEiz2EI62JZ73nVQgQsMSH7Wp0n5VUK3
Lfok8+/gN7VTflnQki+oZsJkE/C7Pm7I4ybxGcbq235rHxPOzbvCTilhxFIqk6sU
O11PQnvuCeHw6xgIbDTElwInqSDybvvgmj8NT6RqPG6Ox38AuCsk2Ubr/bI+8IzM
ZBV0bMDLKFAIQRGIFIWrT3lQBYM3chiZg3w+m6h+gpTvWyO6tRw=
=y2Qh
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70625@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70625
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch