From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: [PATCH] doc: Improve guile load path recommendation. Date: Sun, 16 Apr 2017 00:19:00 -0400 Message-ID: <86pogdugqz.fsf@gmail.com> References: <864lxplbv5.fsf@gmail.com> <87bmrxdzqj.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]:44258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czbeV-0007Ot-Lh for guix-devel@gnu.org; Sun, 16 Apr 2017 00:19:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czbeQ-0005XA-NG for guix-devel@gnu.org; Sun, 16 Apr 2017 00:19:07 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:36369) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czbeQ-0005X4-Iv for guix-devel@gnu.org; Sun, 16 Apr 2017 00:19:02 -0400 Received: by mail-qk0-x242.google.com with SMTP id v75so15986191qkb.3 for ; Sat, 15 Apr 2017 21:19:02 -0700 (PDT) In-Reply-To: <87bmrxdzqj.fsf@gmail.com> (Chris Marusich's message of "Sat, 15 Apr 2017 16:20:52 -0700") 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: Chris Marusich Cc: guix-devel@gnu.org On 04/15/2017 at 16:20 Chris Marusich writes: > myglc2 writes: > >> Using geiser-guile-load-path as currently recommended results in source >> that was already compiled by the guix build being recompiled :-( >> >> This patch avoids that. It also moves the configuration to >> '~/.bash_profile' so it applies when guile is used directly. >> >> From 4585499f99336dc3e626c3105f0539ef3b5ce33c Mon Sep 17 00:00:00 2001 >> From: George Clemmer >> Date: Sat, 15 Apr 2017 14:21:09 -0400 >> Subject: [PATCH] doc: Improve guile load path recommendation. >> >> * doc/contributing.texi (The Perfect Setup): Advise setting GUILE_LOAD_P= ATH and >> GUILE_LOAD_COMPILED_PATH in .bash_profile rather than emacs init. >> --- >> doc/contributing.texi | 19 +++++++++++-------- >> 1 file changed, 11 insertions(+), 8 deletions(-) >> >> diff --git a/doc/contributing.texi b/doc/contributing.texi >> index bbc93424b..d23f55a6b 100644 >> --- a/doc/contributing.texi >> +++ b/doc/contributing.texi >> @@ -171,14 +171,17 @@ Emacs: code compilation and evaluation from within= buffers, access to >> on-line documentation (docstrings), context-sensitive completion, >> @kbd{M-.} to jump to an object definition, a REPL to try out your code, >> and more (@pxref{Introduction,,, geiser, Geiser User Manual}). For >> -convenient Guix development, make sure to augment Guile=E2=80=99s load = path so >> -that it finds source files from your checkout: >> - >> -@lisp >> -;; @r{Assuming the Guix checkout is in ~/src/guix.} >> -(with-eval-after-load 'geiser-guile >> - (add-to-list 'geiser-guile-load-path "~/src/guix")) >> -@end lisp >> +convenient Guix development, make sure to augment Guile=E2=80=99s load = paths so >> +that it finds source and compiled files from your checkout. Assuming the >> +Guix checkout is in @code{~/src/guix}, add the following lines to your >> +=E2=80=98~/.bash_profile=E2=80=99 (*note (bash)Bash Startup Files::): >> + >> +@verbatim >> +export GUILE_LOAD_PATH=3D\ >> +"$HOME/src/guix${GUILE_LOAD_PATH:+:$GUILE_LOAD_PATH}" >> +export GUILE_LOAD_COMPILED_PATH=3D\ >> +"$HOME/src/guix${GUILE_LOAD_COMPILED_PATH:+:$GUILE_LOAD_COMPILED_PATH}" >> +@end verbatim >>=20=20 >> To actually edit the code, Emacs already has a neat Scheme mode. But in >> addition to that, you must not miss > > How does this change avoid the recompilation you mentioned? It looks to > me like before this change, Geiser would find Guix modules in > ~/src/guix, and after this change, Geiser will still find Guix modules > in ~/src/guix. So from that perspective, it seems like it won't change > the way Geiser behaves. Hi Chris, thank you for the comments ;-) I can report that this has a big, positive effect on the geiser user experience. Before this change guile didn't find the compiled files in the git checkout work tree and so it compiled everything it touched (putting compiled files in '~/.cache/guile/ccache/'). This produced big delays and it just felt broken. > However, before this change, other Guile processes (e.g., launched via > "guix package -i foo") would not see the modules in ~/src/guix, and > after this change, it looks to me like they will see the modules in > ~/src/guix. I believe the guix commands find compiled files in the git work tree because '~/.config/guix/latest' points there ... /home/g1/.config/guix/latest -> /home/g1/src/guix/ > If the intended goal is just to let Geiser know where the > Guix source lives, then this method might not be the best solution, > since it will affect programs outside of Geiser, too. > > If I'm mistaken, please help me understand what I'm missing. The geiser doc says ... You can also specify a couple more initialisation parameters. For Guile, 'geiser-guile-load-path' is a list of paths to add to its load path (and its compiled load path) when it's started, ... ... which implies that geiser sets the compiled load path to the geiser-guile-load-path. But it does not seem to be doing that. I guess that could be a bug. Regarding our other guile apps ... The guix makefile unsets GUILE_LOAD_COMPILED_PATH, so the guix build is unaffected. With the proposed change, a guile user exploring guix via the REPL has a better experience than before. Are there other guile apps you have in mind? HTH, please let me know. - George