[bug#60905,08/25] gnu: go-github-com-pkg-diff: Update to 0.0.0-20210226163009-20ebb0f2a09e.
Message ID | 20230118014510.19320-9-cox.katherine.e@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BEF7C27BBF2; Wed, 18 Jan 2023 01:47:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6C57827BBED for <patchwork@mira.cbaines.net>; Wed, 18 Jan 2023 01:47:45 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1pHxWn-0002dG-I2; Tue, 17 Jan 2023 20:46:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWh-0002T2-LO for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWg-0007Aq-Tn for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWg-0007ad-PV for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60905] [PATCH 08/25] gnu: go-github-com-pkg-diff: Update to 0.0.0-20210226163009-20ebb0f2a09e. Resent-From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Jan 2023 01:46:06 +0000 Resent-Message-ID: <handler.60905.B.167400633028837@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60905 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60905@debbugs.gnu.org Cc: Katherine Cox-Buday <cox.katherine.e@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167400633028837 (code B ref -1); Wed, 18 Jan 2023 01:46:06 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2023 01:45:30 +0000 Received: from localhost ([127.0.0.1]:38610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pHxW4-0007Uc-SW for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:60134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVx-0007SR-FM for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVx-00023Q-00 for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:21 -0500 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVv-0006y2-2o for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:20 -0500 Received: by mail-il1-x132.google.com with SMTP id i17so11543911ila.9 for <guix-patches@gnu.org>; Tue, 17 Jan 2023 17:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CEN3zEjZIR8Oo4tRFEZjvXakRAoY7MTC+t1ICzAu2CI=; b=OPENwus8X32m2nEm3AxAxqfbfdVpDqKX1t1xwPDSQ6sBSnRAS19PPKEPRmYkcDD9IS DPxGhnTy6dNNQl3ROAs2242C0kXnc995eigkXp+zUc6fWTN5rIAAVEYrcm9/LSJnvSjO buozFieAcHh9XlvKM34A5J+1k4WUMq8ANWot7MczvtsZiodckb92EfofdVxXIR/jd6DD fp2p32riLdVpZMNHjzoZL6t9AFkUtfMHTqAhAOAGw1GtDOKQGm/T4wu2459yGRjf+xgU sAxFaUeGIoHGOPXWSCmmGcbkEk7TDjxsS31+bdE7ieKQoKbV8vw8HU31Qn9eTFR0z5w/ sLtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CEN3zEjZIR8Oo4tRFEZjvXakRAoY7MTC+t1ICzAu2CI=; b=kiR7UfgyWnEHH0PqmZV1ofJlFF1oJq9zapBJcWedNvdAx2+ZM9Ekg85nANtV+mdjLt K9RiakSnRZnD6NjEDIaRXZWHMX+hH7Qtpj6DQbmcnDsA/Hk6a9tryUHUgpF2StSUiVlr TJIzzSH+QBseDg4YWn4Cii4yZS+XllF/HNqSnwrLNOmr4iFNDFPrrls+64d+6XV8GP7a TD8fbn3Vf6pWTJa56dJJzx7cLO268pT+U7+SSSlkeE4zjKzY3YPOFiXPPuHe7o3ahgO5 adFQlgWST2Q8Ggu+ERyYtXUoKrNaldz7mq78pTdDZxUs6/EiujqDZVMD+RgRxm/DMPoU AYng== X-Gm-Message-State: AFqh2kpxrNcjr+NF4MU2rMv81FLM4FeYDtoMU6DJMbXWkRF5YUGsm+iD UrdpT8oH2DjWNNakaqTYWh5v/s9FCkE= X-Google-Smtp-Source: AMrXdXs5W3U9ss12gONkD6NiCqyyVxjFzPfjOwYfCXP9NsaXKGD/v2QfW6qnMrsChRTzJ2dRbmPqVQ== X-Received: by 2002:a92:2809:0:b0:30e:e3b7:83d9 with SMTP id l9-20020a922809000000b0030ee3b783d9mr5008358ilf.20.1674006318114; Tue, 17 Jan 2023 17:45:18 -0800 (PST) Received: from washu-v4.home.cox-buday.com (c-174-51-139-101.hsd1.co.comcast.net. [174.51.139.101]) by smtp.gmail.com with ESMTPSA id p32-20020a056638192000b0039e89ea68f9sm7889250jal.135.2023.01.17.17.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 17:45:17 -0800 (PST) From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Date: Tue, 17 Jan 2023 18:44:53 -0700 Message-Id: <20230118014510.19320-9-cox.katherine.e@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230118014510.19320-1-cox.katherine.e@gmail.com> References: <20230118014510.19320-1-cox.katherine.e@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::132; envelope-from=cox.katherine.e@gmail.com; helo=mail-il1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: golang: Add gopls
|
|
Commit Message
Katherine Cox-Buday
Jan. 18, 2023, 1:44 a.m. UTC
* 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(-)
Comments
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes: > * 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?
* 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 :) > + (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") > + (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.") -- (
"( 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? >> + (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"? >> + (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.") [1] https://go.dev/doc/modules/version-numbers#in-development
On Tue Feb 7, 2023 at 5:04 PM GMT, Katherine Cox-Buday wrote: > What are your opinions on this? Hmm, interesting. I think this would be better answered by more experienced contributors. > > >> + (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 :) > 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". -- (
Katherine Cox-Buday <cox.katherine.e@gmail.com> writes: > "( 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.
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