[PATCH] Add new gopkg.in/yaml.v3

  • Done
  • quality assurance status badge
Details
3 participants
  • Nicolas Goaziou
  • Xinglu Chen
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 1 Feb 2021 13:46
(address . guix-patches@gnu.org)
CAO+9K5pOzyzZVOHvANf9WQuCtVJx9_iOGaywmpZGCv9QynX+pA@mail.gmail.com
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 31a174054c86fd51e81185d5b2bfcf2ab6bcf208 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 1 Feb 2021 12:44:15 +0000
Subject: [PATCH] gnu: Add gopkg.in/yaml.v3

* gnu/packages/golang.scm (go-gopkg-in-yml-v3): New variable
---
gnu/packages/golang.scm | 42 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d34bb1acb7..56843820f0 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@mgail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2408,6 +2409,47 @@ which satisfies the cron expression.")
values.")
(license license:asl2.0)))
+(define-public go-gopkg-in-yaml-v3
+ (package
+ (name "go-gopkg-in-yaml-v3")
+ (version "3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gopkg.in/yaml.v3.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/yaml.v3"))
+ (native-inputs
+ `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
+ (home-page "https://gopkg.in/yaml.v2")
+ (synopsis "YAML reader and writer for the Go language")
+ (description
+ "This package provides a Go library for encode and decode YAML
+values.
+
+v3 specification difference:
+@itemize
+@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are
+being decoded into a typed bool value. Otherwise they behave as a string.
+Booleans in YAML 1.2 are true/false only.
+
+@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as
+specified in YAML 1.2, because most parsers still use the old format. Octals in
+the 0o777 format are supported though, so new files work.
+
+@item Does not support base-60 floats. These are gone from YAML 1.2, and were
+actually never supported by this package as it's clearly a poor choice.
+@end itemize\n")
+
+@end itemize\n")
+ (license license:asl2.0)))
+
(define-public go-github-com-mattn-go-isatty
(package
(name "go-github-com-mattn-go-isatty")
--
2.30.0
S
S
Sharlatan Hellseher wrote on 13 Jun 2021 13:14
Re: bug#46234: Acknowledgement ([PATCH] Add new gopkg.in/yaml.v3)
(address . 46234@debbugs.gnu.org)
CAO+9K5qzKVaQoBVhKfHme4AZNDQvSZXKXiQzWn0DLPQ4+Ri86w@mail.gmail.com
Hi Guix team!
Is there anything I may fix in this patch?
go Yaml v3 goes as one of the dependencies of some good packages like
dive and lazygit.
Regards
On Mon, 1 Feb 2021 at 12:48, GNU bug Tracking System
<help-debbugs@gnu.org> wrote:
Toggle quote (22 lines)
>
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 46234@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 46234: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46234
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
X
X
Xinglu Chen wrote on 18 Jun 2021 16:42
Re: [bug#46234] [PATCH] Add new gopkg.in/yaml.v3
87y2b75j4s.fsf@yoctocell.xyz
On Mon, Feb 01 2021, Sharlatan Hellseher wrote:

Toggle quote (19 lines)
> +(define-public go-gopkg-in-yaml-v3
> + (package
> + (name "go-gopkg-in-yaml-v3")
> + (version "3")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://gopkg.in/yaml.v3.git")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "gopkg.in/yaml.v3"))
> + (native-inputs
> + `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
> + (home-page "https://gopkg.in/yaml.v2")
^^
Shouldn’t this be “https://gopkg.in/yaml.v3”?

Toggle quote (21 lines)
> + (synopsis "YAML reader and writer for the Go language")
> + (description
> + "This package provides a Go library for encode and decode YAML
> +values.
> +
> +v3 specification difference:
> +@itemize
> +@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are
> +being decoded into a typed bool value. Otherwise they behave as a string.
> +Booleans in YAML 1.2 are true/false only.
> +
> +@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as
> +specified in YAML 1.2, because most parsers still use the old format. Octals in
> +the 0o777 format are supported though, so new files work.
> +
> +@item Does not support base-60 floats. These are gone from YAML 1.2, and were
> +actually never supported by this package as it's clearly a poor choice.
> +@end itemize\n")
> +
> +@end itemize\n")

Duplicate lines/syntax error. I don’t think \n is needed either.

Otherwise, LGTM.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDMsOMVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5Qd4P/iIpxxNMAgcEu/wojl1TV4zx6Vne
dcdn4dbtr6B4ggnlQGeG5oGQMutf57CHadE+xsiRHwIq+ATPg3/YWB7OMV4khiaO
0+/In5ob/u+mCN5HUNEWh7Q3WOodMZx4KiG/AiUbZ/H3zeomKSTjaeJEHT3DeWVZ
v7bCNCvN/MKa9GKJAbjdCYxCEMAr+zQY7zBkzWZxhBdq03NsWXoJO2P6MKucEIrP
SORrhqQ3UgJljlgR1znC4fH1l+4EarxwWaOVgQ8at3kfKCufAq+L9Irl58Su9BEU
TGe1dUsImPK9J9moyu2Us7bFywGxbZ7fj/S4gRGbuwNuaZWQ/IJXZoo3Zxx6ICOS
/AF4Wm/QkCTnmCFT5lWRRlby1HeSXuOW4Qm5pN40hA7fqzBCt5x881fbtwUbPaA9
q2brg5L/B8gLb+1BYFqgBiPSQ5v5Ml2cp1OrLOeg66VqSymuL7lrFRakIoYyaokE
vQCD0/pccHUOOpvpAj8g6VVtaDsyUebpfBelS12ipTBehrFW5iqDnmDGuOTAHPK9
9Pd49/QDWchjf4WfQvd5Loz2GKhwWGaDA53je/0vHlsHvwF2UYBVrEHNNOHWPmT7
Pm7oePvZcfQeV3TXEGgATpKNBbwqQFn0Q1zwx7iE/HZkYasG/FRdOe3DDztFaWre
FMeGiafTzC98U1vw
=LP7D
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 18 Jun 2021 21:29
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 46234@debbugs.gnu.org)
CAO+9K5q4byCp4vSe7TR603SDN-_FEJwAJ2eX4o5eREdkBBaaAQ@mail.gmail.com
Hi Xinglu,

I've reviewed your comments and updated the patch, thanks for your time!

On Fri, 18 Jun 2021 at 14:42, Xinglu Chen <public@yoctocell.xyz> wrote:
Toggle quote (52 lines)
>
> On Mon, Feb 01 2021, Sharlatan Hellseher wrote:
>
> > +(define-public go-gopkg-in-yaml-v3
> > + (package
> > + (name "go-gopkg-in-yaml-v3")
> > + (version "3")
> > + (source
> > + (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + (url "https://gopkg.in/yaml.v3.git")
> > + (commit (string-append "v" version))))
> > + (file-name (git-file-name name version))
> > + (sha256
> > + (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
> > + (build-system go-build-system)
> > + (arguments
> > + '(#:import-path "gopkg.in/yaml.v3"))
> > + (native-inputs
> > + `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
> > + (home-page "https://gopkg.in/yaml.v2")
> ^^
> Shouldn’t this be “https://gopkg.in/yaml.v3”?
>
> > + (synopsis "YAML reader and writer for the Go language")
> > + (description
> > + "This package provides a Go library for encode and decode YAML
> > +values.
> > +
> > +v3 specification difference:
> > +@itemize
> > +@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are
> > +being decoded into a typed bool value. Otherwise they behave as a string.
> > +Booleans in YAML 1.2 are true/false only.
> > +
> > +@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as
> > +specified in YAML 1.2, because most parsers still use the old format. Octals in
> > +the 0o777 format are supported though, so new files work.
> > +
> > +@item Does not support base-60 floats. These are gone from YAML 1.2, and were
> > +actually never supported by this package as it's clearly a poor choice.
> > +@end itemize\n")
> > +
> > +@end itemize\n")
>
> Duplicate lines/syntax error. I don’t think \n is needed either.
>
> Otherwise, LGTM.



--

… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 55ccab7fbbd5a1610ce630f17e79db8bdc6b4d79 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Fri, 18 Jun 2021 20:27:27 +0100
Subject: [PATCH] gnu: Add gopkg.in/yaml.v3

* gnu/packages/golang.scm (go-gopkg-in-yml-v3): New variable
---
gnu/packages/golang.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8c3c81ceda..19a70c7a82 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@mgail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2413,6 +2414,45 @@ which satisfies the cron expression.")
values.")
(license license:asl2.0)))
+(define-public go-gopkg-in-yaml-v3
+ (package
+ (name "go-gopkg-in-yaml-v3")
+ (version "3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gopkg.in/yaml.v3.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/yaml.v3"))
+ (native-inputs
+ `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
+ (home-page "https://gopkg.in/yaml.v3")
+ (synopsis "YAML reader and writer for the Go language")
+ (description
+ "This package provides a Go library for encode and decode YAML
+values.
+
+v3 specification difference:
+@itemize
+@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are
+being decoded into a typed bool value. Otherwise they behave as a string.
+Booleans in YAML 1.2 are true/false only.
+
+@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as
+specified in YAML 1.2, because most parsers still use the old format. Octals in
+the 0o777 format are supported though, so new files work.
+
+@item Does not support base-60 floats. These are gone from YAML 1.2, and were
+actually never supported by this package as it's clearly a poor choice.
+@end itemize")
+ (license license:asl2.0)))
+
(define-public go-github-com-mattn-go-isatty
(package
(name "go-github-com-mattn-go-isatty")
--
2.32.0
X
X
Xinglu Chen wrote on 19 Jun 2021 10:31
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 46234@debbugs.gnu.org)
87bl8245n7.fsf@yoctocell.xyz
On Fri, Jun 18 2021, Sharlatan Hellseher wrote:

Toggle quote (5 lines)
> Hi Xinglu,
>
> I've reviewed your comments and updated the patch, thanks for your
> time!

You are welcome! The patch looks good to me, but you will have to wait
for someone with commit access to apply it :)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDNq2wVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5vIYQALj/Ocy5eLJ4Tiy4R7GE35I1u5nH
SkZuyKT+hp4KytO8C+VJA/+wHU3H0/VDhuAILtN8zrS0KH8IsuqKoMGG7kJ8ZKyA
bwKYdq/3F1CRzS9xPiVMYf8GLfwBD2u8w7KkdR7F1vIIaLeSfIPFsr0IgijfbCLd
HETtGO7kpD20gMXkoT6t1/9xQ5iDSqItKzOpTgTRfOV9lrYMBRRs6oN14mRh5Orx
KXGkI3rziRFp7F1Jvcvp13o+uonaIVnEza6dZuaE7l5oCa4Raj0ch7lcXLqHU65I
J0+yZA3qCqj9fc0gKHRAyK3H0HcrVt9nYYthg+ic8BAFd8weJGUq+JtGMjW5HoCN
SRl8OqhfQapR3TzbIeYP7LgWyNPw5GIpTgYygLaDupy2oBF136YecZZ4mWQajxGF
2dneYFyeQARH4+8oM64Wm5U1Ic1B9lGoUlCoQDEeo9nVzqwHAh1C89fvCbNslHVP
hOYy3WRPUXbfg2v+cjxDJLWMCCUKe9GBWxJQKsPyWYt7fckpkuQbxNhQS/daB9px
nOi4sxF1jxFWYqkoG0xoOoksbOUYLSD4+LMe7518B6ekvRnbX+ufNDH11spJoSoQ
vv96tEaNWVXqrhcGeNxuygPJ78OV+VOhFzO+5NIvfczeX4Rm83e6HGetObL0rRMv
bYxUWe6NPKttv62f
=VSjn
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 22 Jun 2021 10:53
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
87r1gugu03.fsf@nicolasgoaziou.fr
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Thank you for the patch, and thanks Xinglu for the review.

I applied your patch with the following changes:

Toggle quote (2 lines)
> gnu: Add gopkg.in/yaml.v3

I added a final full stop.


Toggle quote (3 lines)
> + (uri (git-reference
> + (url "https://gopkg.in/yaml.v3.git")

I removed the ".git" suffix.

Toggle quote (18 lines)
> + (description
> + "This package provides a Go library for encode and decode YAML
> +values.
> +
> +v3 specification difference:
> +@itemize
> +@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are
> +being decoded into a typed bool value. Otherwise they behave as a string.
> +Booleans in YAML 1.2 are true/false only.
> +
> +@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as
> +specified in YAML 1.2, because most parsers still use the old format. Octals in
> +the 0o777 format are supported though, so new files work.
> +
> +@item Does not support base-60 floats. These are gone from YAML 1.2, and were
> +actually never supported by this package as it's clearly a poor choice.
> +@end itemize")

I shortened the description.

Regards,
--
Nicolas Goaziou
Closed
?