guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 01/01: scripts: refresh: Allow searching recursively.


From: swedebugia
Subject: Re: 01/01: scripts: refresh: Allow searching recursively.
Date: Sat, 05 Jan 2019 12:15:19 -0800

On 2019-01-05 18:43, Ludovic Courtès wrote:
> Efraim Flashner <address@hidden> skribis:
> 
>> On Tue, Dec 25, 2018 at 04:05:11PM +0100, Ludovic Courtès wrote:
>>> Hello!
>>> 
>>> address@hidden skribis:
>>> 
>>> > efraim pushed a commit to branch master
>>> > in repository guix.
>>> >
>>> > commit c39491829a0c1d870f8133b8f7a699152fc71503
>>> > Author: Efraim Flashner <address@hidden>
>>> > 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.
>>> 
>>> Nice work!
>>> 
>>> > address@hidden --list-transitive
>>> > +List all the packages which one or more packages depend upon.
>>> 
>>> What about ‘--list-dependencies’, for clarity and symmetry with
>>> ‘--list-dependents’?
>>> 
>> 
>> It was originally '--list-recursive' but Bavier suggested
>> '--list-transitive' so it would match 'guix build --sources=transitive'
>> 
>> 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?'
> 
> Good point.  I do feel like ‘--list-dependencies’ is clearer though.
> With ‘list-transitive’, since “transitive” is an adjective, I first
> wondered: transitive what?
> 
> What do people think?

I pondered this a bit. 

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.
=>
--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 <=50 upward links
- medium root >50<=100 upward links
- heavy root >100<=500 upward links
- very heavy root >500<=1000 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?

-- 
Cheers
Swedebugia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]