GNU bug report logs - #47028
Discourage single-character package names

Previous Next

Package: guix;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Tue, 9 Mar 2021 21:40:01 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47028 in the body.
You can then email your comments to 47028 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Tue, 09 Mar 2021 21:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 09 Mar 2021 21:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: bug-guix <at> gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>
Subject: Discourage single-character package names
Date: Tue, 09 Mar 2021 22:39:23 +0100
[Message part 1 (text/plain, inline)]
Mark H Weaver 写道:
> Yesterday, an obscure package called "t" was added to Guix.  We 
> should
> reject such short package names in Guix unless there's a very 
> compelling
> reason to keep them.

I completely agree (in fact I can't compel myself to find 
excusable exceptions), but this wasn't explicitly documented 
anywhere I looked.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Tue, 09 Mar 2021 21:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 47028 <at> debbugs.gnu.org
Subject: [PATCH 1/2] doc: Discourage ambiguous package names.
Date: Tue,  9 Mar 2021 22:41:57 +0100
* doc/contributing.texi (Package Naming): Explicitly mention
single-character and otherwise ambiguous names.
---
 doc/contributing.texi | 8 ++++++++
 doc/guix.texi         | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index c9dd7d6c04..a3facdcadc 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -445,6 +445,14 @@ the project name chosen upstream, with underscores replaced with
 hyphens.  For instance, GNUnet is available as @code{gnunet}, and
 SDL_net as @code{sdl-net}.
 
+A noteworthy exception to this rule is when the project name is only a
+single character, or if an older maintained project with the same name
+already exists---regardless of whether it has already been packaged for
+Guix.  Use common sense to make such names unambiguous and meaningful.
+For example, Guix's package for the shell called ``s'' upstream is
+@code{s-shell} and @emp{not} @code{s}.  Feel free to ask your fellow
+hackers for inspiration.
+
 We do not add @code{lib} prefixes for library packages, unless these are
 already part of the official project name.  But @pxref{Python
 Modules} and @ref{Perl Modules} for special rules concerning modules for
diff --git a/doc/guix.texi b/doc/guix.texi
index f01e7ca89d..d726fa491f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -49,7 +49,7 @@ Copyright @copyright{} 2017, 2021 Christopher Lemmer Webber@*
 Copyright @copyright{} 2017, 2018, 2019, 2020 Marius Bakke@*
 Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@*
 Copyright @copyright{} 2017, 2019, 2020, 2021 Maxim Cournoyer@*
-Copyright @copyright{} 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice@*
+Copyright @copyright{} 2017, 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice@*
 Copyright @copyright{} 2017 George Clemmer@*
 Copyright @copyright{} 2017 Andy Wingo@*
 Copyright @copyright{} 2017, 2018, 2019, 2020 Arun Isaac@*
-- 
2.30.1





Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Tue, 09 Mar 2021 21:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 47028 <at> debbugs.gnu.org
Subject: [PATCH 2/2] lint: Warn about single-character package names.
Date: Tue,  9 Mar 2021 22:41:58 +0100
* guix/lint.scm (check-name): New procedure.
(%local-checkers): Add it.
---
 guix/lint.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index 311bc94cc3..5144fa139d 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a <at> scratchpost.org>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
 ;;; Copyright © 2017 Alex Kost <alezost <at> gmail.com>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2017, 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2017, 2018, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2020 Chris Marusich <cmmarusich <at> gmail.com>
@@ -170,6 +170,16 @@
   (requires-store? lint-checker-requires-store?
                    (default #f)))
 
+(define (check-name package)
+  "Check whether PACKAGE's name matches our guidelines."
+  ;; Currently checks only whether the name is too short.
+  (if (<= (string-length (package-name package)) 1)
+      (list
+       (make-warning package
+                     (G_ "name should be longer than a single character")
+                     #:field 'name))
+      '()))
+
 (define (properly-starts-sentence? s)
   (string-match "^[(\"'`[:upper:][:digit:]]" s))
 
@@ -1445,6 +1455,10 @@ them for PACKAGE."
 
 (define %local-checkers
   (list
+   (lint-checker
+     (name        'name)
+     (description "Validate package names")
+     (check       check-name))
    (lint-checker
      (name        'description)
      (description "Validate package descriptions")
-- 
2.30.1





Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Tue, 09 Mar 2021 21:52:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: bug-guix <at> gnu.org, 47028 <at> debbugs.gnu.org
Subject: Re: bug#47028: [PATCH 1/2] doc: Discourage ambiguous package names.
Date: Tue, 09 Mar 2021 22:51:09 +0100
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Bug reports for GNU Guix 写道:
> +@code{s-shell} and @emp{not} @code{s}.  Feel free to ask your 
> fellow
                      ???

I'm sorry, I'm really useless today.  This should of course be 
correct & not wrong.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Tue, 09 Mar 2021 21:52:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Wed, 10 Mar 2021 00:47:01 GMT) Full text and rfc822 format available.

Message #20 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 47028 <at> debbugs.gnu.org
Subject: Re: Discourage single-character package names
Date: Tue, 09 Mar 2021 19:44:52 -0500
Hi Tobias,

Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Mark H Weaver 写道:
>> Yesterday, an obscure package called "t" was added to Guix.  We
>> should reject such short package names in Guix unless there's a very
>> compelling reason to keep them.
>
> I completely agree (in fact I can't compel myself to find 
> excusable exceptions), but this wasn't explicitly documented 
> anywhere I looked.

We have one notable exception in Guix: "r", which is "grandfathered in"
so-to-speak, but perhaps it would have been excusable anyway, given its
prominence and its large number of related packages "r-*".

I fully support your proposal to talk about single-character names in
the manual, and also to check for them in the linter, but perhaps "r"
should be whitelisted.

    Thank you!
       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Wed, 10 Mar 2021 11:29:02 GMT) Full text and rfc822 format available.

Message #23 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mark H Weaver <mhw <at> netris.org>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 47028 <at> debbugs.gnu.org
Subject: Re: bug#47028: Discourage single-character package names
Date: Wed, 10 Mar 2021 12:28:35 +0100
Hi Mark & Tobias,

Mark H Weaver <mhw <at> netris.org> skribis:

> I fully support your proposal to talk about single-character names in
> the manual, and also to check for them in the linter, but perhaps "r"
> should be whitelisted.

Seconded on both points!  The patches look great to me.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Wed, 10 Mar 2021 13:07:02 GMT) Full text and rfc822 format available.

Message #26 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Mark H Weaver <mhw <at> netris.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 47028 <at> debbugs.gnu.org
Subject: Re: bug#47028: Discourage single-character package names
Date: Wed, 10 Mar 2021 14:04:12 +0100
Hi,

(CC: Ricardo since they is the master about R stuff. :-))


On Tue, 09 Mar 2021 at 19:44, Mark H Weaver <mhw <at> netris.org> wrote:

> We have one notable exception in Guix: "r", which is "grandfathered in"
> so-to-speak, but perhaps it would have been excusable anyway, given its
> prominence and its large number of related packages "r-*".
>
> I fully support your proposal to talk about single-character names in
> the manual, and also to check for them in the linter, but perhaps "r"
> should be whitelisted.

On the other hand, instead of simply the one letter “r”, we could rename
it “r-environment”.  Because the package currently named “r” is the
interpreter named “r-minimal” plus extra packages, constituting the
basic bricks of the “R environment” [1].

1: <https://www.r-project.org/about.html>

--8<---------------cut here---------------start------------->8---
(define-public r
  (package (inherit r-minimal)
    (name "r")
    (source #f)
    (build-system trivial-build-system)
    (arguments '(#:builder (begin (mkdir %output) #t)))
    (propagated-inputs
     `(("r-minimal" ,r-minimal)
       ("r-boot" ,r-boot)
       ("r-class" ,r-class)
       ("r-cluster" ,r-cluster)
       ("r-codetools" ,r-codetools)
       ("r-foreign" ,r-foreign)
       ("r-kernsmooth" ,r-kernsmooth)
       ("r-lattice" ,r-lattice)
       ("r-mass" ,r-mass)
       ("r-matrix" ,r-matrix)
       ("r-mgcv" ,r-mgcv)
       ("r-nlme" ,r-nlme)
       ("r-nnet" ,r-nnet)
       ("r-rpart" ,r-rpart)
       ("r-spatial" ,r-spatial)
       ("r-survival" ,r-survival)))))
--8<---------------cut here---------------end--------------->8---


I also support the proposal.  My point is: I am not even sure that “r”
should be whitelisted.


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Fri, 26 Mar 2021 08:35:01 GMT) Full text and rfc822 format available.

Message #29 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 47028 <at> debbugs.gnu.org
Subject: Re: bug#47028: [PATCH 2/2] lint: Warn about single-character
 package names.
Date: Fri, 26 Mar 2021 09:26:03 +0100
Hi,

On Tue, 09 Mar 2021 at 22:41, Tobias Geerinckx-Rice <me <at> tobias.gr> wrote:

> +(define (check-name package)
> +  "Check whether PACKAGE's name matches our guidelines."
> +  ;; Currently checks only whether the name is too short.
> +  (if (<= (string-length (package-name package)) 1)

Maybe the length can be negative or zero. ;-)


Well, both patches are LGTM.


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Thu, 01 Apr 2021 08:52:02 GMT) Full text and rfc822 format available.

Message #32 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 47028 <at> debbugs.gnu.org
Subject: Re: bug#47028: [PATCH 2/2] lint: Warn about single-character
 package names.
Date: Thu, 01 Apr 2021 10:51:19 +0200
zimoun writes:
> Maybe the length can be negative or zero. ;-)

‘Defensive programming’!

Thanks, :-)

T G-R




Information forwarded to bug-guix <at> gnu.org:
bug#47028; Package guix. (Thu, 01 Apr 2021 08:58:02 GMT) Full text and rfc822 format available.

Message #35 received at 47028 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Mark H Weaver <mhw <at> netris.org>, 47028 <at> debbugs.gnu.org
Subject: Re: Discourage single-character package names
Date: Thu, 01 Apr 2021 10:57:24 +0200
[Inexcusably breaking thread because I lost the original.]

Mark,

> We have one notable exception in Guix: "r", which is 
> "grandfathered
> in" so-to-speak [...]

Very good point.  So grandfathered it didn't occur to me.

> [...] perhaps "r"should be whitelisted.

I agree.  Thanks for pointing it out!

T G-R




Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Thu, 01 Apr 2021 20:42:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Thu, 01 Apr 2021 20:42:02 GMT) Full text and rfc822 format available.

Message #40 received at 47028-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 47028-done <at> debbugs.gnu.org
Subject: Re: bug#47028: [PATCH 2/2] lint: Warn about single-character
 package names.
Date: Thu, 01 Apr 2021 22:41:24 +0200
[Message part 1 (text/plain, inline)]
zimoun writes:
> My point is: I am not even sure that “r” should be whitelisted.

I think it deserves the name, but my reasons are fuzzy and feely. 
Anyway: I added that exception for ‘r’ and pushed as 
1126bb9cf33f10f004a5f53331389c777c025e75 et al.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 Apr 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.