guix-devel
[Top][All Lists]
Advanced

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

Re: Registering GC roots


From: Alex Vong
Subject: Re: Registering GC roots
Date: Fri, 16 Oct 2015 23:55:38 +0800

On 16/10/2015, Ludovic Courtès <address@hidden> wrote:
> Alex Vong <address@hidden> skribis:
>
>> On 16/10/2015, Ludovic Courtès <address@hidden> wrote:
>>> Alex Vong <address@hidden> skribis:
>>>
>>>> Talking about interactive CLIs, in general I am not a fan of it too,
>>>> especially after you get used to the program. That's why I am using
>>>> plain apt-get instead of aptitude which uses ncurses. However, I will
>>>> say it is sometimes useful. For example, in git clean, there is an
>>>> `-i' switch, which can help if you don't want to mess with your
>>>> .gitignore file. So perhaps making something GC roots is like putting
>>>> it in .gitignore in git, but we should still provide a way for
>>>> interacting GC-ing.
>>>
>>> Currently there are two documented ways to add GC roots from the command
>>> line: creating a profile with ‘guix package’, and using the -r option of
>>> ‘guix build.’
>>>
>>> What David suggests is to add a similar -r option to ‘guix environment’,
>>> which sounds good to me.
>>>
>> I see. So currently there is no way to make an environment GC root and
>> David is proposing using -r to achieve it. Am I right?
>
> Exactly.
>
>>> The GC process itself will not be interactive.  Who would want to hit
>>> ‘y’ or ‘n’ for each one of the thousands of files considered?  :-)
>>>
>> Indeed, option 3 [3. ask for every directories (like interactive
>> `rm')] looks silly. What is your opinions on a big yes/no? Perhaps it
>> is useful for beginners who may not know the "power" of GC?
>
> Like having ‘guix gc’ ask “Are you sure you want to collect garbage?”,
> with the option to bypass it with, say, ‘guix gc -f’?
>
Perhaps also showing what are being GC-ed, in the form of
    PKG-NAME[VERSION] ...

or something like that since a plain question is not so useful.

My initial though is that it should be similar to running
    $ apt-get autoremove --purge

Ideally, the output should not be too verbose to hurt your eyes but
verbose enough to stop from GC-ing things you don't want to GC. What
do you guys think?

> With my biased old-timer’s viewpoint ;-), I would tend to believe that
> the documentation is clear about what it means to collect garbage, and
> that the user knows what they’re doing when they press Enter.
>
> What do others think?
>
> Ludo’.
>



reply via email to

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