From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Subdirectories in GUIX_PACKAGE_PATH Date: Mon, 03 Jul 2017 23:53:52 +0200 Message-ID: <87mv8lp4pb.fsf@gnu.org> References: <20170623212058.638c6de8@cbaines.net> <87h8z3kn7j.fsf@elephly.net> <8737ahq0lh.fsf@gnu.org> <87bmp1e693.fsf@gmail.com> 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]:52133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS9IA-0007xG-1y for guix-devel@gnu.org; Mon, 03 Jul 2017 17:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dS9I5-0007zA-7C for guix-devel@gnu.org; Mon, 03 Jul 2017 17:54:02 -0400 In-Reply-To: <87bmp1e693.fsf@gmail.com> (Alex Kost's message of "Mon, 03 Jul 2017 21:15:52 +0300") 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: Alex Kost Cc: guix-devel@gnu.org Hi Alex, Alex Kost skribis: > Ludovic Court=C3=A8s (2017-06-30 11:35 +0200) wrote: [...] >>> Looks like this was removed in an attempt to improve performance over >>> NFS. The =E2=80=9Cscheme-files=E2=80=9D procedure now includes a comme= nt: >>> >>> ;; XXX: We don't recurse if we find a symlink. >>> >>> Would it not be better to fix this instead of adding support for special >>> syntax in GUIX_PACKAGE_PATH? >> >> Indeed, apologies for the breakage. >> >> I think the patch below fixes it. It incurs overhead only when a >> symlink is encountered, which is reasonable I think. >> >> Chris & Alex: could you give it a try and report back? > > I confirm that the patch you attached fixes this problem, thanks! Great, committed with a test as 960c6ce96d746cf19829ad26e092ec5dad2a5c62. > I have a (probably not related) question though: in the past, package > 'location' contained an *absolute* file name for the packages from > GUIX_PACKAGE_PATH. Now these locations are *relative* file names. Is > this intended? > > If so, this is a problem for Emacs-Guix: you see, when you try to open a > package location (for example, by pressing an according button in *Guix > Package Info* buffer), it is expanded against 'guix-directory' variable. > So if you open "gnu/packages/guile.scm" location, it works, but now if > it is your location like "my-guix-packages/foo.scm", the wrong > (non-existent) file will be opened. Previously it worked, because that > location was absolute, like "/home/me/my-guix-packages/foo.scm". I=E2=80=99ve noticed this but I didn=E2=80=99t think it was a regression. Basically Guile supports two =E2=80=9Cfile name canonicalization=E2=80=9D m= odes: one that returns a file name relative to %load-path, and one that returns an absolute file name. By default, when loading modules, we=E2=80=99re in =E2=80=98relative=E2=80=99 mode; this is so that modules can be moved on di= sk and don=E2=80=99t record their initial location. I think the last time this was changed was a year ago in 14d5ca2e2e57643b6b4acfb980b18b7474c27e7b. Thanks, Ludo=E2=80=99.