From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Vong Subject: Re: Registering GC roots Date: Fri, 16 Oct 2015 23:55:38 +0800 Message-ID: References: <87io6b943m.fsf@gnu.org> <878u75ql2q.fsf@gnu.org> <87eggxfc5o.fsf@openmailbox.org> <87k2qpp1ko.fsf@gnu.org> <20151014170227.3a293b5a@openmailbox.org> <874mhsiae1.fsf@openmailbox.org> <87h9lrw7w3.fsf_-_@gnu.org> <87mvviizxv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn7M5-0007Mx-0z for guix-devel@gnu.org; Fri, 16 Oct 2015 11:55:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn7M3-00083U-WF for guix-devel@gnu.org; Fri, 16 Oct 2015 11:55:40 -0400 In-Reply-To: <87mvviizxv.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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel On 16/10/2015, Ludovic Court=C3=A8s wrote: > Alex Vong skribis: > >> On 16/10/2015, Ludovic Court=C3=A8s wrote: >>> Alex Vong 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 comman= d >>> line: creating a profile with =E2=80=98guix package=E2=80=99, and using= the -r option of >>> =E2=80=98guix build.=E2=80=99 >>> >>> What David suggests is to add a similar -r option to =E2=80=98guix envi= ronment=E2=80=99, >>> 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 >>> =E2=80=98y=E2=80=99 or =E2=80=98n=E2=80=99 for each one of the thousand= s 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 =E2=80=98guix gc=E2=80=99 ask =E2=80=9CAre you sure you want = to collect garbage?=E2=80=9D, > with the option to bypass it with, say, =E2=80=98guix gc -f=E2=80=99? > 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=E2=80=99s 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=E2=80=99re doing when they press Enter. > > What do others think? > > Ludo=E2=80=99. >