Subject: bug#58660: closed (Re: bug#58660: [PATCH 0/4] Minor tweaks of etc/teams.scm)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 29 Aug 2023 18:59:02 +0000

Your bug report

#58660: [PATCH 0/4] Minor tweaks of etc/teams.scm

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
58660: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58660
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#58660: [PATCH 0/4] Minor tweaks of etc/teams.scm
From: Maxim Cournoyer <[email-masked]>
To: zimoun <[email-masked]>
Cc: Mathieu Othacehe <[email-masked]>, [email-masked]
Date: Tue, 29 Aug 2023 14:58:09 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

zimoun <[email-masked]> writes:

> Hi Mathieu,
>
> On Fri, 18 Nov 2022 at 18:23, Mathieu Othacehe <[email-masked]> wrote:
>
>
>> Why not:
>>
>> (scope (format #f "scope:~%~{+ ~s ~}~%" scope))
>
> Because this does not “itemize” correctly.  For instance, it outputs:
>
> id: python
> name: Python team
> description: Python, Python packages, the "pypi" importer, and the python-build-system.
> scope:
> + "gnu/packages/django.scm" + "gnu/packages/jupyter.scm" + #<regexp 7f408800d500> + "gnu/packages/sphinx.scm" + "gnu/packages/tryton.scm" + "guix/build/pyproject-build-system.scm" + "guix/build-system/pyproject.scm" + "guix/build/python-build-system.scm" + "guix/build-system/python.scm" + "guix/import/pypi.scm" + "guix/scripts/import/pypi.scm" + "tests/pypi.scm" 
> members:
> + Lars-Dominik Braun <[email-masked]>
> + jgart <[email-masked]>
>
>
> When what we want is:
>
> scope:
> + "gnu/packages/django.scm"
> + "gnu/packages/jupyter.scm"
> + #<regexp 7f408800d500>
> + "gnu/packages/sphinx.scm"
> + "gnu/packages/tryton.scm"
> + "guix/build/pyproject-build-system.scm"
> + "guix/build-system/pyproject.scm"
> + "guix/build/python-build-system.scm"
> + "guix/build-system/python.scm"
> + "guix/import/pypi.scm"
> + "guix/scripts/import/pypi.scm"
> + "tests/pypi.scm" 
>
>
> Well, the ’~%’ is included:
>
>     (scope (format #f "scope:~%~{+ ~s~% ~}~%" scope))))
>
> then there is one extra:
>
> id: python
> name: Python team
> description: Python, Python packages, the "pypi" importer, and the python-build-system.
> scope:
> + "gnu/packages/django.scm"
>  + "gnu/packages/jupyter.scm"
>  + #<regexp 7f40de756500>
>  + "gnu/packages/sphinx.scm"
>  + "gnu/packages/tryton.scm"
>  + "guix/build/pyproject-build-system.scm"
>  + "guix/build-system/pyproject.scm"
>  + "guix/build/python-build-system.scm"
>  + "guix/build-system/python.scm"
>  + "guix/import/pypi.scm"
>  + "guix/scripts/import/pypi.scm"
>  + "tests/pypi.scm"
>  
> members:
> + Lars-Dominik Braun <[email-masked]>
> + jgart <[email-masked]>

That's fixable with the 'escape' escape, ~^:

--8<---------------cut here---------------start------------->8---
(format #f "scope:~%~{+ ~a~^~%~}~%" scope)
--8<---------------cut here---------------end--------------->8---

I've reworked your v2, integrating the comments from Mathieu and
installed it as 4d7b25a0e2abd77625cdc888c60da8e6add02bbd.

Closing!

-- 
Thanks,
Maxim

Subject: [PATCH 0/4] Minor tweaks of etc/teams.scm
From: zimoun <[email-masked]>
To: [email-masked]
Cc: zimoun <[email-masked]>
Date: Thu, 20 Oct 2022 15:21:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

The first patch displays the regexp pattern and sort the files.  Compare,

--8<---------------cut here---------------start------------->8---
 $ etc/teams.scm list-teams | recsel -n 21
 id: java
name: Java and Maven team
description: The JDK and JRE, the Maven build system, Java packages, the ant-build-system, and the maven-build-system.
scope: #<regexp 7f61135ef3c0> #<regexp 7f61135ef380> "guix/build/ant-build-system.scm" "guix/build/java-utils.scm" "guix/build/maven-build-system.scm" #<regexp 7f61135ef340> "guix/build-system/ant.scm" "guix/build-system/maven.scm"
members:
+ Julien Lepiller <[email-masked]>
+ Björn Höfling <[email-masked]>
--8<---------------cut here---------------end--------------->8---

with

--8<---------------cut here---------------start------------->8---
id: java
name: Java and Maven team
description: The JDK and JRE, the Maven build system, Java packages, the ant-build-system, and the maven-build-system.
scope: "^gnu/packages/java(-.+|)\\.scm$" "^gnu/packages/maven(-.+|)\\.scm$" "^guix/build/maven/" "guix/build-system/ant.scm" "guix/build-system/maven.scm" "guix/build/ant-build-system.scm" "guix/build/java-utils.scm" "guix/build/maven-build-system.scm"
members:
+ Julien Lepiller <[email-masked]>
+ Björn Höfling <[email-masked]>
--8<---------------cut here---------------end--------------->8---

Maybe I miss a point about regexp but I have not found a way to access the
pattern.  Hence this new <regexp*> record.

The second patch sorts the members,

--8<---------------cut here---------------start------------->8---
$ etc/teams.scm list-members mentors
( <[email-masked]>
Christopher Baines <[email-masked]>
Ludovic Courtès <[email-masked]>
Mathieu Othacehe <[email-masked]>
Ricardo Wurmus <[email-masked]>
Simon Tournier <[email-masked]>
jgart <[email-masked]>
--8<---------------cut here---------------end--------------->8---

The third patch sorts the teams,

--8<---------------cut here---------------start------------->8---
$ etc/teams.scm list-teams | recsel -Cp id
id: core
id: emacs
id: embedded-bootstrap
id: games
id: go
id: haskell
id: home
id: installer
id: java
id: julia
id: kernel
id: lisp
id: mentors
id: mozilla
id: ocaml
id: python
id: r
id: racket
id: ruby
id: rust
id: science
id: translations
--8<---------------cut here---------------end--------------->8---

Note that show a team is not super handy,

--8<---------------cut here---------------start------------->8---
$ etc/teams.scm list-teams | recsel -Cp id | grep -n id
1:id: core
2:id: emacs
3:id: embedded-bootstrap
4:id: games
5:id: go
6:id: haskell
7:id: home
8:id: installer
9:id: java
10:id: julia
11:id: kernel
12:id: lisp
13:id: mentors
14:id: mozilla
15:id: ocaml
16:id: python
17:id: r
18:id: racket
19:id: ruby
20:id: rust
21:id: science
22:id: translations

$ etc/teams.scm list-teams | recsel -n 7
id: installer
name: Installer script and system installer
description: <none>
scope: "^gnu/installer(\\.scm$|/)"
members:
+ Josselin Poiret <[email-masked]>
+ Mathieu Othacehe <[email-masked]>
--8<---------------cut here---------------end--------------->8---

Hence the last patch, (hum, I am not convinced :-))

--8<---------------cut here---------------start------------->8---
$ etc/teams.scm list-teams | recsel -Cp id
id: (0) core
id: (1) emacs
id: (2) embedded-bootstrap
id: (3) games
id: (4) go
id: (5) haskell
id: (6) home
id: (7) installer
id: (8) java
id: (9) julia
id: (10) kernel
id: (11) lisp
id: (12) mentors
id: (13) mozilla
id: (14) ocaml
id: (15) python
id: (16) r
id: (17) racket
id: (18) ruby
id: (19) rust
id: (20) science
id: (21) translations

$ etc/teams.scm list-teams | recsel -n 15
id: (15) python
name: Python team
description: Python, Python packages, the "pypi" importer, and the python-build-system.
scope: "^gnu/packages/python(-.+|)\\.scm$" "gnu/packages/django.scm" "gnu/packages/jupyter.scm" "gnu/packages/sphinx.scm" "gnu/packages/tryton.scm" "guix/build-system/python.scm" "guix/build/python-build-system.scm" "guix/import/pypi.scm" "guix/scripts/import/pypi.scm" "tests/pypi.scm"
members:
+ Lars-Dominik Braun <[email-masked]>
+ jgart <[email-masked]>
--8<---------------cut here---------------end--------------->8---

Cheers,
simon

zimoun (4):
  etc: teams: Improve scope display.
  etc: teams: List members sorted by name.
  etc: teams: List teams sorted by id.
  etc: teams: Display an id number.

 etc/teams.scm.in | 83 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 59 insertions(+), 24 deletions(-)

base-commit: 4716cea6256523a8ecf90a426d675bfb7620f3e4
-- 
2.36.0