[PATCH 01/13] gnu: Add go-github-com-chyzer-logex

  • Done
  • quality assurance status badge
Details
4 participants
  • Fries
  • Maxim Cournoyer
  • (
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Fries
Severity
normal
Merged with
F
F
Fries wrote on 5 Aug 2023 09:00
(address . guix-patches@gnu.org)(name . Fries)(address . fries1234@protonmail.com)
2d85819290ef06485588ac5f4ba8a79c69d5e196.1691218710.git.fries1234@protonmail.com
* gnu/packages/golang.scm (go-github-com-chyzer-logex): New variable.
* gnu/packages/patches/go-github-com-chyzer-logex-fix-tests.patch: New file.
---
gnu/packages/golang.scm | 28 +++++++++++++++++++
...go-github-com-chzyer-logex-fix-tests.patch | 28 +++++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644 gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch

Toggle diff (82 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..d99f76dc7d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2022 Christopher Howard <christopher@librehacker.com>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+;;; Copyright © 2023 Fries <fries1234@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2112,6 +2113,33 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-chzyer-logex
+ (package
+ (name "go-github-com-chzyer-logex")
+ (version "1.2.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chzyer/logex")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0c9yr3r7dl3lcs22cvmh9iknihi9568wzmdywmc2irkjdrn8bpxw"))
+ (patches (search-patches
+ "go-github-com-chzyer-logex-fix-tests.patch"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/chzyer/logex"
+ #:phases (modify-phases %standard-phases
+ ;; Tests are completely broken on this package.
+ (delete 'check))))
+ (home-page "https://github.com/chzyer/logex")
+ (synopsis "Golang log library")
+ (description "A Golang log library that supports tracing and log levels
+that works by wrapping the standard log library.")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
diff --git a/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch b/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch
new file mode 100644
index 0000000000..2a9b7a228b
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch
@@ -0,0 +1,28 @@
+From bb4921ff5ab77a047ae46d3da0f35abbe3f01f41 Mon Sep 17 00:00:00 2001
+From: Fries <fries1234@protonmail.com>
+Date: Fri, 4 Aug 2023 20:06:20 -0700
+Subject: [PATCH] fix logex tests
+
+---
+ logex_test.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/logex_test.go b/logex_test.go
+index e6027f2..4c07d45 100644
+--- a/logex_test.go
++++ b/logex_test.go
+@@ -46,9 +46,9 @@ func TestLogex(t *testing.T) {
+
+ except := []string{
+ ".test:logex_test.go:19]aa",
+- ".test:logex_test.go:20][INFO] b",
++ ".TestLogex:logex_test.go:42][INFO] b",
+ ".test:logex_test.go:21][INFO] c",
+- ".test:logex_test.go:22][ERROR] ec",
++ ".TestLogex:logex_test.go:42][ERROR] ec",
+ ".(*S).hello:logex_test.go:11][WARN] warn in hello",
+ }
+
+--
+2.41.0
+
--
2.41.0
(
(name . Fries)(address . fries1234@protonmail.com)
87y1iprgvn.fsf@disroot.org
Hi!

Fries via Guix-patches via <guix-patches@gnu.org> writes:
Toggle quote (6 lines)
> + (arguments
> + '(#:import-path "github.com/chzyer/logex"
> + #:phases (modify-phases %standard-phases
> + ;; Tests are completely broken on this package.
> + (delete 'check))))

Generally this should look like this now:

(arguments
(list #:import-path "github.com/chzyer/logex"
#:phases
#~(modify-phases %standard-phases
(delete 'check))))

Also, generally, you'd use ``#:tests? #f'' rather than
``(delete 'check)'' to disable tests.

Toggle quote (3 lines)
> --- /dev/null
> +++ b/gnu/packages/patches/go-github-com-chzyer-logex-fix-tests.patch

Doesn't this effectively do nothing, since you disabled tests?

-- (
F
F
Fries wrote on 5 Aug 2023 11:30
Merge bugs
(address . control@debbugs.gnu.org)
6131230.DvuYhMxLoT@pc
merge 65075 65072 65076 65073 65078 65077 65079 65082 65080 65081 65084 65085 65083 65074
# accidently sent my patch series to the mailing list instead the cover letters bug
quit
F
F
Fries wrote on 6 Aug 2023 01:13
More cleanly merge bugs
(address . control@debbugs.gnu.org)
5713201.DvuYhMxLoT@pc
unmerge 65072
unmerge 65073
unmerge 65075
unmerge 65076
unmerge 65077
unmerge 65078
unmerge 65079
unmerge 65080
unmerge 65081
unmerge 65082
unmerge 65083
unmerge 65084
unmerge 65085
unmerge 65074
merge 65075 65074
merge 65072 65074
merge 65076 65074
merge 65073 65074
merge 65078 65074
merge 65077 65074
merge 65079 65074
merge 65082 65074
merge 65080 65074
merge 65081 65074
merge 65084 65074
merge 65085 65074
merge 65083 65074
# try to merge all the bugs with just 65074 instead of merging with all of themselves
stop
M
M
Maxim Cournoyer wrote on 1 Sep 2023 14:08
Re: bug#65085: [PATCH 12/13] gnu: Add go-github-com-json-iterator-go
(name . Fries)(address . fries1234@protonmail.com)
87wmxa3xl5.fsf_-_@gmail.com
tags 65072 + moreinfo
quit

Hi Fries,

Thank you for your contribution.

Fries <fries1234@protonmail.com> writes:

Toggle quote (34 lines)
> * gnu/packages/golang.scm (go-github-com-chyzer-test): New variable.
> ---
> gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index d99f76dc7d..ef82f0aa1b 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -2113,6 +2113,32 @@ (define-public go-github-com-dhowett-go-plist
> types.")
> (license license:giftware))))
>
> +(define-public go-github-com-chzyer-test
> + (package
> + (name "go-github-com-chzyer-test")
> + (version "1.0.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/chzyer/test")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1axdlcnx2qjsn5wsr2pr1m0w0a8k4nk5kkrngh742fgh81vzzy8s"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/chzyer/test"
> + #:phases
> + ;; Tests relating to a in-memory disk fail due to a Segfault.
> + (modify-phases %standard-phases
> + (delete 'check))))

This should be minimally investigated, and ideally an issue created on
upstream issue tracker and an URL added next to the comment to track its
resolution, e.g:

;; Tests relating to a in-memory disk fail due to a segfault (see:
;; $URL).

Also taking the comments from parens into account, could you please send
a v2 to this same issue (65072@debbugs.gnu.org) ?

--
Thanks,
Maxim
S
S
Sharlatan Hellseher wrote on 6 Apr 17:55 +0200
[PATCH 01/13] gnu: Add go-github-com-chyzer-logex
(address . 65075-done@debbugs.gnu.org)
87le5qmqo6.fsf@gmail.com
Pushed as c28b319640..cf4f87986a to master by closing

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

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYRcHkACgkQdtcnv/Ys
0rWs4BAAlfXrNX4wo0lHARZfYtSwK7/FcHzmI7baJuX3wwLIIo5vsYZZ8jtx4VlY
dQfxRsRCbYBqQ1oDDSMFI63BKDJXn65AVu+eW+YSPwBpZcPZOt0imzjsqQXmlbnj
yF27ncomj65lxxYUJpY33u8gDLBzsLtk+2sB0Gw1eTj0UfHN+A32sIZb//++9fOy
UntIzuRpd5+Wu+lmVjA34R4sh3GFbIrYD+orNHkNWLUprCI6Hd6NOsnkpXMnN7PW
RXKAbvRE2WCBRiGjHAhhZTRidUNKM25wXpgZFGagSjs44VPc3VhfV7UyHlTCkk1f
3oTzhtYMoONPQw//WYM6w1oZE9IHBxJg+oeLKCsf0xXswyaofIHYiH/91A2VUtjN
L/qtcrZ3AfGJuz6Hi1+h04jM7lLkroK/sEIjJCN99DHnPOLrGApesFF/RE8KxLNj
0njgIXdqm/K6gQaFhFvnMwVef2vslP12DjCbASzjFZQgw4Jw+NOwT/djFej+XND+
Uc2VT1iLIz1Pgm4/ajVEFI1lSwYHMYZBdMwrnlQ4YR8pos+qMzwa7O6gNubGEKfA
mf9l1rfDgn9IntIqaMsNCFxmQW2IxsRhxuYaZoz4nqYxJ1Vkgm7b3+/obDc6nhXd
YGrGxG5P+0bGHN0RSYfVFXyo0NPFqLzr5XajQihYt61o7RIFKJc=
=Im/8
-----END PGP SIGNATURE-----

Closed
?