From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Emacs interface for Guix Date: Sun, 20 Jul 2014 20:52:37 +0400 Message-ID: <87iomsq8fe.fsf@gmail.com> References: <87zjg9rgih.fsf@gmail.com> <871ttlgzfl.fsf@gnu.org> <87vbqxqg3n.fsf@gmail.com> <87ha2fm3gk.fsf@gnu.org> <87r41hrdks.fsf@gmail.com> <8738dxe2jq.fsf@gnu.org> <87mwc4qzd5.fsf@gmail.com> <878uno9l7b.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]:52613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8uLy-00021v-Hp for guix-devel@gnu.org; Sun, 20 Jul 2014 12:52:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8uLp-0008Kt-Fd for guix-devel@gnu.org; Sun, 20 Jul 2014 12:52:50 -0400 In-Reply-To: <878uno9l7b.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 20 Jul 2014 16:08:40 +0200") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2014-07-20 18:08 +0400) wrote: > Alex Kost skribis: > >> Yes, that's what concerned me since the very beginning =E2=80=93 unique = entities >> should have unique identifiers, i.e. ideally there should be an >> easy-to-get ID for every package. But as I'm using a non-unique >> =E2=80=98name-version=E2=80=99 spec to "identify" a package, information= about installed >> outputs is displayed for every matching package. > > OK. At the Scheme level, package objects are unique of course; but at > the UI level, we can=E2=80=99t guarantee that there=E2=80=99s a single pa= ckage for each > name/version pair (and this is not even desirable, I think.) I don't say that name+version should identify a package, but I think it would be very convenient to have an ID for a package definition. For example now manifest may tell that "out" of a "guile-2.0.11" package is installed but there are 2 "guile-2.0.11" packages out there and it's impossible to distinguish those. And vice versa when I list available packages I want to see my installed outputs only for the right packages, not for all packages with the same name+version. What if to make some =E2=80=98get-package-by-id=E2=80=99 function that will= always return a single package? And there is no need to add IDs for all package definitions, as most of them are identified with name+version already. What I suggest is to add an optional =E2=80=9Cpostfix=E2=80=9D fi= eld to record, so that a combination =E2=80=9Cname+version+[postfix]=E2= =80=9D will be unique and will be returned by =E2=80=98package-id=E2=80=99 like this: (package-id #) =3D=3D> "gui= le-2.0.11" (package-id #) =3D=3D> "gui= le-2.0.11_base" And also to add this ID to the manifest entries. I believe all this will not break current functionality but it may be very useful. What do you think? >> You may look at: >> >> M-x guix-search-by-name guile-2.0.11 >> >> to see how it looks like in a =E2=80=9Clist=E2=80=9D and especially =E2= =80=9Cinfo=E2=80=9D buffers >> currently (I have updated the repo). > > Looks good to me! It doesn't look good to me. As I said before, installed outputs should =E2=80=9Cbelong=E2=80=9D only to a single package, which can be done only (= IMHO) if there will be a unique ID for a package definition. >> Also I made some changes for augmenting paths, so please report if >> something does not work. > > I=E2=80=99m still seeing a lot of these at the top of *Guix REPL*: > > ;;; note: source file /data/src/guix.el/guix-helper.scm > ;;; newer than compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0= /data/src/guix.el/guix-helper.scm.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /data/src/guix.el/guix-helper.scm A lot? Hm, for me =E2=80=9Cguix-helper.scm=E2=80=9D was the only file that= was compiled as it was changed. Could you check that =E2=80=9CC-h v guix-directory=E2= =80=9D tells you the proper directory? (for me it is "/home/alexx/.config/guix/latest" now) Also check =E2=80=98%load-compiled-path=E2=80=99 in the =E2=80=9C*Gui= x REPL*=E2=80=9D buffer, please. Thanks.