From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia@riseup.net Subject: Re: 01/01: scripts: refresh: Allow searching recursively. Date: Sat, 05 Jan 2019 12:15:19 -0800 Message-ID: References: <20181224103304.24211.61386@vcs0.savannah.gnu.org> <20181224103305.59E3520448@vcs0.savannah.gnu.org> <87bm59fxzs.fsf@gnu.org> <20181225171003.GP2581@macbook41> <87tvin2e6j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggsout.gnu.org ([209.51.188.92]:33999 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfsM2-00087v-41 for guix-devel@gnu.org; Sat, 05 Jan 2019 15:15:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfsM1-00035Q-8d for guix-devel@gnu.org; Sat, 05 Jan 2019 15:15:34 -0500 In-Reply-To: <87tvin2e6j.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org, Guix-devel On 2019-01-05 18:43, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 >> On Tue, Dec 25, 2018 at 04:05:11PM +0100, Ludovic Court=C3=A8s wrote: >>> Hello! >>>=20 >>> guix-commits@gnu.org skribis: >>>=20 >>> > efraim pushed a commit to branch master >>> > in repository guix. >>> > >>> > commit c39491829a0c1d870f8133b8f7a699152fc71503 >>> > Author: Efraim Flashner >>> > Date: Wed Dec 19 22:08:18 2018 +0200 >>> > >>> > scripts: refresh: Allow searching recursively. >>> > >>> > * guix/scripts/refresh.scm (refresh-recursive, list-transitive)= : New >>> > procedures. >>> > (show-help): Document it. >>> > (guix-refresh): Add flags and checks for new options. >>> > * doc/guix.texi (Invoking guix refresh): Document new options. >>>=20 >>> Nice work! >>>=20 >>> > +@item --list-transitive >>> > +List all the packages which one or more packages depend upon. >>>=20 >>> What about =E2=80=98--list-dependencies=E2=80=99, for clarity and sym= metry with >>> =E2=80=98--list-dependents=E2=80=99? >>>=20 >>=20 >> It was originally '--list-recursive' but Bavier suggested >> '--list-transitive' so it would match 'guix build --sources=3Dtransiti= ve' >>=20 >> If it's too close to '--list-dependents' then I'm worried people could >> look at it and ask 'packages FOO is dependent on or packages that are >> dependent on FOO?' >=20 > Good point. I do feel like =E2=80=98--list-dependencies=E2=80=99 is cl= earer though. > With =E2=80=98list-transitive=E2=80=99, since =E2=80=9Ctransitive=E2=80= =9D is an adjective, I first > wondered: transitive what? >=20 > What do people think? I pondered this a bit.=20 What about evolving our terminology as if we talk about the graph produced by "guix graph"? That means we have only 2 directions. Upwards: 'packages that are dependent on FOO' Downwards: 'packages FOO is dependent on' This could give us the following terms: X is an upwards dependency to Y. FOO is a downward dependency of BAR. =3D> --list-upwards-dependencies --list-downwards-dependencies Furthermore we could create words to describe packages with many/few dependencies: Package X is a heavy root with 120 upward links. We could define a scale and make our commands output it consistently: - light root <=3D50 upward links - medium root >50<=3D100 upward links - heavy root >100<=3D500 upward links - very heavy root >500<=3D1000 upward links - extremely heavy root >1000 upward links (The numbers above are just an example) With npm-packages we could say: Package X is a heavy root with 3 versions in use. Package Y is a light root with only the latest in use. (In npm a package can appear multiple times as dependency to dependencies and sometimes in different versions meaning we have to package it multiple versions of some packages.) Thoughts? --=20 Cheers Swedebugia