diff mbox series

[bug#46234] Add new gopkg.in/yaml.v3

Message ID CAO+9K5q4byCp4vSe7TR603SDN-_FEJwAJ2eX4o5eREdkBBaaAQ@mail.gmail.com
State Accepted
Headers show
Series [bug#46234] Add new gopkg.in/yaml.v3 | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Sharlatan Hellseher June 18, 2021, 7:29 p.m. UTC
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:
>
> 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.

Comments

Xinglu Chen June 19, 2021, 8:31 a.m. UTC | #1
On Fri, Jun 18 2021, Sharlatan Hellseher wrote:

> 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 :)
Nicolas Goaziou June 22, 2021, 8:53 a.m. UTC | #2
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:

> gnu: Add gopkg.in/yaml.v3

I added a final full stop.


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

I removed the ".git" suffix.

> +    (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,
diff mbox series

Patch

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(+)

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