[PATCH 08/25] gnu: go-github-com-pkg-diff: Update to 0.0.0-20210226163009-20ebb0f2a09e.

  • Done
  • quality assurance status badge
Details
4 participants
  • Katherine Cox-Buday
  • Christopher Baines
  • Tobias Geerinckx-Rice
  • (
Owner
unassigned
Submitted by
Katherine Cox-Buday
Severity
normal
Merged with
K
K
Katherine Cox-Buday wrote on 18 Jan 2023 02:44
(address . guix-patches@gnu.org)(name . Katherine Cox-Buday)(address . cox.katherine.e@gmail.com)
20230118014510.19320-9-cox.katherine.e@gmail.com
* gnu/packages/golang.scm (go-github-com-pkg-diff): Update to 0.0.0-20210226163009-20ebb0f2a09e.
---
gnu/packages/golang.scm | 44 +++++++++++++++++++----------------------
1 file changed, 20 insertions(+), 24 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9554234c7b..5e8159975f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8736,30 +8736,26 @@ (define-public go-github-com-go-git-go-git-fixtures
(license license:asl2.0)))
(define-public go-github-com-pkg-diff
- (let ((commit "531926345625d489a6b56f860a569e68245ace36")
- (revision "1"))
- (package
- (name "go-github-com-pkg-diff")
- (version (git-version "0.0.1" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/pkg/diff")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1770m7qhww6lm0wj1v3mhv6hwa2v92p4w2fqxj1xyrg5dd58d944"))))
- (build-system go-build-system)
- (arguments
- `(#:import-path "github.com/pkg/diff"))
- (native-inputs
- (list go-github-com-sergi-go-diff))
- (home-page "https://github.com/pkg/diff/")
- (synopsis "Create and print diffs")
- (description
- "This package provides a Go library to create and print diffs.")
- (license license:bsd-3))))
+ (package
+ (name "go-github-com-pkg-diff")
+ (version "0.0.0-20210226163009-20ebb0f2a09e")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pkg/diff")
+ (commit "20ebb0f2a09e612109b224b32f79370409108bcc")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1g3dzgwhz4fx3ddpsv7fsa4r1v5clsp2lbw2qrkdk9y1vc5gi8yi"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/pkg/diff"))
+ (home-page "https://github.com/pkg/diff/")
+ (synopsis "Create and print diffs")
+ (description
+ "This package provides a Go library to create and print diffs.")
+ (license license:bsd-3)))
(define-public go-github-com-twpayne-go-shell
(package
--
2.38.1
T
T
Tobias Geerinckx-Rice wrote on 18 Jan 2023 11:56
(no subject)
(address . control@debbugs.gnu.org)
542e82bcc0f385c117ba662c7dcf1dbf@tobias.gr
merge 60898 60899 60900 60901 60902
merge 60898 60903 60904 60905 60906
merge 60898 60907 60908 60909 60910
merge 60898 60911 60912 60913 60914
merge 60898 60915 60916 60917 60918
merge 60898 60919 60920
T
T
Tobias Geerinckx-Rice wrote on 18 Jan 2023 12:43
(address . control@debbugs.gnu.org)
37de5823441633151229c783f2acfca3@tobias.gr
merge 60898 60921 60922
thanks

Weird: I got ‘Unknown command or malformed arguments to command.’ for
this obviously correct line.

Let's try again.
K
K
Katherine Cox-Buday wrote on 18 Jan 2023 18:07
Merging erroneously opened bugs
(address . control@debbugs.gnu.org)
87zgafrct9.fsf@gmail.com
merge 60899 60904 60907 60908 60917 60920 60921 60919 60910 60903 60915 60914 60922 60909 60918 60913 60900 60899 60905 60901 60912 60898 60906 60902 60916 60911
--
Katherine
C
C
Christopher Baines wrote on 6 Feb 2023 23:04
Re: [bug#60905] [PATCH 08/25] gnu: go-github-com-pkg-diff: Update to 0.0.0-20210226163009-20ebb0f2a09e.
(name . Katherine Cox-Buday)(address . cox.katherine.e@gmail.com)
87wn4ucuts.fsf@cbaines.net
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

Toggle quote (61 lines)
> * gnu/packages/golang.scm (go-github-com-pkg-diff): Update to 0.0.0-20210226163009-20ebb0f2a09e.
> ---
> gnu/packages/golang.scm | 44 +++++++++++++++++++----------------------
> 1 file changed, 20 insertions(+), 24 deletions(-)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 9554234c7b..5e8159975f 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -8736,30 +8736,26 @@ (define-public go-github-com-go-git-go-git-fixtures
> (license license:asl2.0)))
>
> (define-public go-github-com-pkg-diff
> - (let ((commit "531926345625d489a6b56f860a569e68245ace36")
> - (revision "1"))
> - (package
> - (name "go-github-com-pkg-diff")
> - (version (git-version "0.0.1" revision commit))
> - (source (origin
> - (method git-fetch)
> - (uri (git-reference
> - (url "https://github.com/pkg/diff")
> - (commit commit)))
> - (file-name (git-file-name name version))
> - (sha256
> - (base32
> - "1770m7qhww6lm0wj1v3mhv6hwa2v92p4w2fqxj1xyrg5dd58d944"))))
> - (build-system go-build-system)
> - (arguments
> - `(#:import-path "github.com/pkg/diff"))
> - (native-inputs
> - (list go-github-com-sergi-go-diff))
> - (home-page "https://github.com/pkg/diff/")
> - (synopsis "Create and print diffs")
> - (description
> - "This package provides a Go library to create and print diffs.")
> - (license license:bsd-3))))
> + (package
> + (name "go-github-com-pkg-diff")
> + (version "0.0.0-20210226163009-20ebb0f2a09e")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/pkg/diff")
> + (commit "20ebb0f2a09e612109b224b32f79370409108bcc")))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1g3dzgwhz4fx3ddpsv7fsa4r1v5clsp2lbw2qrkdk9y1vc5gi8yi"))))
> + (build-system go-build-system)
> + (arguments
> + `(#:import-path "github.com/pkg/diff"))
> + (home-page "https://github.com/pkg/diff/")
> + (synopsis "Create and print diffs")
> + (description
> + "This package provides a Go library to create and print diffs.")
> + (license license:bsd-3)))
>
> (define-public go-github-com-twpayne-go-shell
> (package

I'm not sure I prefer the longer version here, and also having the
commit in the origin but then part of it in the version makes this a
little harder to update since you have to update both bits.

What led you to change from using the (let ((... bit here?
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmPhee9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcCKw/+OlFcTShxtaQHc9dLU/2BxmURE27P5UsE
j8v2wLWbQTZTA+CYJDNATS078BcZjkuiQ4OYe443sJolbyRgHZYgBk+wkj8R3gK+
tPjSBDNtGBldGbKoI79OKlmssV/fN9kACVbkfyd4G6TnIq2vi0h8+Zn7D8lariA6
CKSmuK7zMoUVP7+VM3r1bMg6e5QUbDLMzkZOkMys7eSiezGv64HXTyk204aVTCiD
44q9Xixox3GfZPW+3QykXXv9Xm0NtMPST5Dt4twhunzFzFHsgSnJ150cStDmG9vd
jVuy67KIxXvuFpokTkzdAYazZGWgQlvoGmtPFk1fIPt6CbuLUGrJjO9gm/40zDoV
7Jq1I08M7JPFC9a5W1agU4B6Q//t5Pzf5rBUt8vN+9HKjeI2BAiyE+s/bx5Ht66A
Bv0yY0NiulmMXSBDaqhKfwfQEsS4FETA2AQB/azBVatAXcfT5PIHH4SH6yAaw/Sh
QgXJhNwXH+SpYPP0yuyjr0owUnRRAio32rthqmW6f0g8jVmgwuIw8TFB7KPxBmZd
pNcZ6Uu/pcyegplYqzXPwS8Ow88R/g2//SwMRrtZYDNZIicwBoHGpd5CbzVxPCbe
lUqokbAG0HJWic/yGr9aQnnURT39+woZnwM3L8tP7zRh2L2dX5Wr5p0BP1AauVId
x0ev7ZWQTFA=
=pxpu
-----END PGP SIGNATURE-----

(
CQBTVQ0JESJY.2A766BKNWC23R@guix-framework
* gnu/packages/golang.scm (go-github-com-pkg-diff): Update to 0.0.0-20210226163009-20ebb0f2a09e.

Toggle quote (9 lines)
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm

> @@ -8736,30 +8736,26 @@ (define-public go-github-com-go-git-go-git-fixtures

> + (package
> + (name "go-github-com-pkg-diff")
> + (version "0.0.0-20210226163009-20ebb0f2a09e")

As Chris said, don't use this kind of version string :)

Toggle quote (6 lines)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/pkg/diff")
> + (commit "20ebb0f2a09e612109b224b32f79370409108bcc")))

And especially don't write the commit twice.

Toggle quote (2 lines)
> + (synopsis "Create and print diffs")

(synopsis "Generate and print diffs in Go")

Toggle quote (3 lines)
> + (description
> + "This package provides a Go library to create and print diffs.")

(description
"This package provides a Go library to generate and print file
differences in the @code{diff} format.")

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmPhfSgACgkQ7ImHg/nq
I21Kfwv/RP3h1xVj1KL3YJMtG2SwzhxEzLfZBf3qs2yBO/jBY0aiBJmveNi6/eR/
W/e1eUz8SDIsUTN4j+bE3GyARXsDl9Stwp5lIFe7ZoVc9W2+h1pHdQW1KAEkcN7z
bnJY6vUI5po9JYC76M0wxHfmZd2Vek5vdM/YoyYQe6rLcOlyB5I3/Ouqoe5C4UBP
4y2DyLD40AoQfYMp5RHWHwV5VNkbBaERmQI/XMrFew92mPGyUJvzNvTrEVnMdQzY
0pxCxuvqHmoqmmiUH+IvDYCVcwsiOeb5PJzbR3p5xle34ly7i4L9RJeOUKpJhgts
C1U7Ha5B8ub4g8ZX+Wm+bQILa2C0yG6xEz9wR6elt/8jmd8TX3MCGpNK2zVtilQ5
F2owJ4gETGPF+2K9E7uru8A+M7rUMGItoLajCJwjqBoTyMJPvIWkRsJ97z/hYcfs
1IMv/oBvAfhmWCWcelBtil+WFrzHQy9xtMBbqD4+WYbQlKR5sY+6FeROQxtC8nOl
GFInEXSu
=BusQ
-----END PGP SIGNATURE-----


K
K
Katherine Cox-Buday wrote on 7 Feb 2023 18:04
87mt5pxv8u.fsf@gmail.com
"( via Guix-patches" via <guix-patches@gnu.org> writes:

Toggle quote (14 lines)
> * gnu/packages/golang.scm (go-github-com-pkg-diff): Update to
> 0.0.0-20210226163009-20ebb0f2a09e.
>
>> --- a/gnu/packages/golang.scm
>> +++ b/gnu/packages/golang.scm
>
>> @@ -8736,30 +8736,26 @@ (define-public go-github-com-go-git-go-git-fixtures
>
>> + (package
>> + (name "go-github-com-pkg-diff")
>> + (version "0.0.0-20210226163009-20ebb0f2a09e")
>
> As Chris said, don't use this kind of version string :)

Ah, I actually have (what I think) is a valid reason for this. In Go,
when a module is in development, this long string, including the SHA, is
the actual version[1] of the module, and carries semantics for Go developers, i.e. "Signals that the module is still in development and unstable. The release carries no backwards compatibility or stability guarantees."

It's how it will be referenced by other Go modules, and so I thought it
best to make the version field reflect the actual version. The previous
iteration of this package had an incorrect version: upstream did not
assign it a 0.0.1 version; that's something we did.

I agree that this is confusing for Guix maintainers, and causes
duplicate information in the version and commit fields.

What are your opinions on this?

Toggle quote (12 lines)
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/pkg/diff")
>> + (commit "20ebb0f2a09e612109b224b32f79370409108bcc")))
>
> And especially don't write the commit twice.
>
>> + (synopsis "Create and print diffs")
>
> (synopsis "Generate and print diffs in Go")

I only bumped the version here; the synopsis was pre-existing. But: is the language important? Do we say "Diff creates and prints diffs in
C"?

Toggle quote (7 lines)
>> + (description
>> + "This package provides a Go library to create and print diffs.")
>
> (description
> "This package provides a Go library to generate and print file
> differences in the @code{diff} format.")

(
(address . 60905@debbugs.gnu.org)
CQCIQGZDXDEL.2XK17OP05IIF2@guix-framework
On Tue Feb 7, 2023 at 5:04 PM GMT, Katherine Cox-Buday wrote:
Toggle quote (2 lines)
> What are your opinions on this?

Hmm, interesting. I think this would be better answered by more experienced
contributors.
Toggle quote (9 lines)
>
> >> + (source (origin
> >> + (method git-fetch)
> >> + (uri (git-reference
> >> + (url "https://github.com/pkg/diff")
> >> + (commit "20ebb0f2a09e612109b224b32f79370409108bcc")))
> >
> > And especially don't write the commit twice.

I should've elaborated: use GO-VERSION->GIT-REF here :)

Toggle quote (3 lines)
> I only bumped the version here; the synopsis was pre-existing. But: is the language important? Do we say "Diff creates and prints diffs in
> C"?

Isn't this also a Go library? If it isn't, then yeah, it's not important,
but if it is, I'd say you should add "in Go".

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmPijwwACgkQ7ImHg/nq
I22fPgwA5oN+JDo9QPluPDZOs7wcNyjBwYmQvbChBGWrbhhTwxuAjix6X8FCFNZC
jVhNt1kf9CbuectvWbAM07Fa0j8mrRxTDEeXOz4QFFyYzrCRurrNDTTzmA0rrMOZ
1kAecmBIQYEwk9YueLO7edztThPSkABJq/7eMTOqYOjTm3itMeWdjPu//F8yMegs
YNRZWhgB5a3PfihJp1y9EziJGhrouI0Q+TjKIbOk4MvswymjKx46j8SOplC3z0KG
+qV2pnUd/96fROgN8Zl6Z6jU2aioSVld2b6NX/ubFgZ+HCUyQv4ZD777dr0QNyD6
aYsDz8SbuywW23i/ip7as36SIK9P461Y6APpTs6FEU5h4tnuBGneK5bvSoD8t5Hz
q9DdGrPe6pvy/S5WMhwveJMWKxKYpNaxZsBcmOeChKGJ5jl5VGJzHEOQlsskXl89
PUPgMANnjxHEn69w9F4ax5BxKr3IQLMn/+SRyaJGKOxfA0t3p58oyj8ODZyE0k0A
L0L4qZjR
=peD8
-----END PGP SIGNATURE-----


C
C
Christopher Baines wrote on 8 Feb 2023 12:47
(name . Katherine Cox-Buday)(address . cox.katherine.e@gmail.com)
877cws74wr.fsf@cbaines.net
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes:

Toggle quote (33 lines)
> "( via Guix-patches" via <guix-patches@gnu.org> writes:
>
>> * gnu/packages/golang.scm (go-github-com-pkg-diff): Update to
>> 0.0.0-20210226163009-20ebb0f2a09e.
>>
>>> --- a/gnu/packages/golang.scm
>>> +++ b/gnu/packages/golang.scm
>>
>>> @@ -8736,30 +8736,26 @@ (define-public go-github-com-go-git-go-git-fixtures
>>
>>> + (package
>>> + (name "go-github-com-pkg-diff")
>>> + (version "0.0.0-20210226163009-20ebb0f2a09e")
>>
>> As Chris said, don't use this kind of version string :)
>
> Ah, I actually have (what I think) is a valid reason for this. In Go,
> when a module is in development, this long string, including the SHA, is
> the actual version[1] of the module, and carries semantics for Go
> developers, i.e. "Signals that the module is still in development and
> unstable. The release carries no backwards compatibility or stability
> guarantees."
>
> It's how it will be referenced by other Go modules, and so I thought it
> best to make the version field reflect the actual version. The previous
> iteration of this package had an incorrect version: upstream did not
> assign it a 0.0.1 version; that's something we did.
>
> I agree that this is confusing for Guix maintainers, and causes
> duplicate information in the version and commit fields.
>
> What are your opinions on this?

I guess I'm not that fussed if a long version has some use.

What I would say is that as long as the version incorporates the commit
in some way and the commit is used in the package source bit, I'd use
the (let ((commit ... pattern to avoid duplicating bits of the commit
hash and make tweaking the commit easier.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmPjjGRfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe1cg//VMgthrE21DVF60JWLFe0SUY6JZbHOggi
/fT0iEDnrkW4Tr1r7OwBWlZ2BRHoLia44zlZWG08+e7rGJqzbxaVcZGRUv+Dk5Gu
53Vy6OpGttOgldMfRvmpVzciNGVlVuR7BIPN+qjZgWClnq99InTWU0lJ8rxmSCqc
XKShr7OuCYtqwMu4LLyz1z3J2h9+Nq7Kq2sSVRuwTFqXmKZK9POjdmODXD4Vuarx
5Cp268KFKB2RAIxGpYv3nzTcBTNobDDDwEyFVrvClAXo9GffrHiT1C0Np2w3AAP1
URjr8/Jgu7Q5Xmk0y7ddq/4z9VqppEaqi6/paC3+iXt/5nofnH3A9pOT6HiaZO0i
RJQzBBfBpxoE4WHFCl1ExehzPFyvpcwBGuu1hAjSOsGQc02P4RDCO8nhvYXUuqlJ
EIpYifMf9Nz/Pd/lBvFXZtjLT9mtqgKQkJot6NGtmYxR0z5RHkz7Z9kYddFfDqVG
9AgiGSUMVBngHzH/myZsFehvCGvjNPm4ykJqTtVJzerVxoK35VhGG0Rx3G3yUzx5
jOLZyAZjmS23s7RV7xFeNMuOEsMDBNGCHnEVTn7Y/TE6WLNfW1uGsUVXlInA+8zK
tNeqpvZb4ipmINcWMekviPDgFyigSVtL2BHNwP9/Z2rcS+jNrO5TVGS3GHHd57/R
gMWCzFbPmyM=
=2yqj
-----END PGP SIGNATURE-----

?