Patchwork Commit 958dd3ce68 will break emacs interface after "guix pull"

login
register
mail settings
Submitter Alex Kost
Date May 6, 2016, 6:25 p.m.
Message ID <87k2j7m4bm.fsf@gmail.com>
Download mbox | patch
Permalink /patch/12115/
State New
Headers show

Comments

Alex Kost - May 6, 2016, 6:25 p.m.
Ludovic Courtès (2016-05-06 13:36 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Hello Ludo, this is not related to system tests, but in this patchset
>> you also moved 'memoize' to (guix combinators).  In commit 86670ca4b7 I
>> adjusted emacs interface to use it.
>
> Ooops, sorry for the breakage.  I guess I don’t master ‘grep’ yet.  ;-)

No problem, I keep an eye emacs UI :-)

>> However, it is not enough (see [1]): currently, if a user does "guix
>> pull", (s)he gets the recent guile code with the new (guix combinators)
>> module, but the emacs stuff is still old as it comes with the
>> development snapshot.
>>
>> So in this case emacs interface will not work (complaining about unbound
>> 'memoize' variable).
>
> Indeed.
>
>> So I think it's the time to update guix-devel package.  Is it OK to do
>> it now?
>
> Yes, we could do that, but the problem remains on foreign distros
> though.

Not really: on foreign distros the recommended way (it's probably the
only way except using git checkout) to use emacs interface is to install
guix into a user profile, so once we update guix-devel snapshot, it can
be updated by a user, and this breakage will be fixed.

> What about simply #:re-export (memoize) in (guix utils) for now?

Oh, indeed, this is a good workaround, thanks!  OK for the attached
patch or should I add some comment there?

>> In general, it is not perfect that "guix pull" updates only guile
>> modules, and not emacs interface.  I recall there were similar (but much
>> smaller) breakages when emacs stuff and guile code (from
>> "~/.config/guix/latest") were out of sync.
>
> Yes, that’s definitely one of the shortcomings we should address:
>
>   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22629

Yes, I'm aware of this, thanks (and sorry that I'm not the taker).
Ludovic Courtès - May 8, 2016, 4:04 p.m.
Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-05-06 13:36 +0300) wrote:

[...]

>>> So I think it's the time to update guix-devel package.  Is it OK to do
>>> it now?
>>
>> Yes, we could do that, but the problem remains on foreign distros
>> though.
>
> Not really: on foreign distros the recommended way (it's probably the
> only way except using git checkout) to use emacs interface is to install
> guix into a user profile, so once we update guix-devel snapshot, it can
> be updated by a user, and this breakage will be fixed.

At any rate, I’ll probably update it very soon.

>> What about simply #:re-export (memoize) in (guix utils) for now?
>
> Oh, indeed, this is a good workaround, thanks!  OK for the attached
> patch or should I add some comment there?


[...]

> --- a/guix/utils.scm
> +++ b/guix/utils.scm
> @@ -44,6 +44,7 @@
>    #:use-module (ice-9 format)
>    #:use-module ((ice-9 iconv) #:select (bytevector->string))
>    #:use-module (system foreign)
> +  #:re-export (memoize)

Just add a comment there, like “for backwards compatibility”.

Thank you!

Ludo’.
Alex Kost - May 9, 2016, 8:43 a.m.
Ludovic Courtès (2016-05-08 19:04 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2016-05-06 13:36 +0300) wrote:
 [...]
>>> What about simply #:re-export (memoize) in (guix utils) for now?
>>
>> Oh, indeed, this is a good workaround, thanks!  OK for the attached
>> patch or should I add some comment there?
>
> [...]
>
>> --- a/guix/utils.scm
>> +++ b/guix/utils.scm
>> @@ -44,6 +44,7 @@
>>    #:use-module (ice-9 format)
>>    #:use-module ((ice-9 iconv) #:select (bytevector->string))
>>    #:use-module (system foreign)
>> +  #:re-export (memoize)
>
> Just add a comment there, like “for backwards compatibility”.

Done and commited, thanks.

Patch

From e07a1bc4b33f232f3812b687caca2c34ddfcf339 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Fri, 6 May 2016 21:19:06 +0300
Subject: [PATCH] guix: utils: Re-export 'memoize'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Suggested by Ludovic Courtès <ludo@gnu.org>.

* guix/utils.scm: Re-export 'memoize' to avoid a potential breakage of
  emacs interface.  See
  <http://lists.gnu.org/archive/html/guix-devel/2016-05/msg00146.html>
  for details.
---
 guix/utils.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index f18bbd1..64ecdd7 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -44,6 +44,7 @@ 
   #:use-module (ice-9 format)
   #:use-module ((ice-9 iconv) #:select (bytevector->string))
   #:use-module (system foreign)
+  #:re-export (memoize)
   #:export (bytevector->base16-string
             base16-string->bytevector
 
-- 
2.7.3