GNU bug report logs -
#75817
[PATCH] profiles: emacs-subdirs: Avoid building list with a loop
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75817 in the body.
You can then email your comments to 75817 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Fri, 24 Jan 2025 23:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thiago Jung Bauermann <bauermann <at> kolabnow.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 24 Jan 2025 23:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
If the EMACSNATIVELOADPATH environment variable (by mistake) has duplicated
paths, Emacs fails to load with:
$ emacs
List contains a loop:
("/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
"/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" . #2)
$ echo $?
255
A git bisect in Guix to find when the problem was introduced arrived at
commit e9b13294700d ("profiles: emacs-subdirs: Also expand
native-comp-eln-load-path.").
Fix the problem by applying Liliana's suggestion of changing 'nconc' to
'append' in the Elisp code written to subdirs.el.
* guix/profiles.scm (emacs-subdirs): Use 'append' rather than 'nconc'.
Change-Id: If646b806f24666b5247850d30d2819c7482c130b
Fixes: <https://issues.guix.gnu.org/75709>
Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
---
guix/profiles.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 87b9543ac01f..63b2a08a48d4 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1230,8 +1230,8 @@ (define build
(setq native-comp-eln-load-path
(mapcan (lambda (dir)
(if (equal dir needle)
- (nconc ',native-comp-dirs
- (list dir))
+ (append ',native-comp-dirs
+ (list dir))
(list dir)))
native-comp-eln-load-path))))
port)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Sat, 25 Jan 2025 00:31:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Am Freitag, dem 24.01.2025 um 20:01 -0300 schrieb Thiago Jung
Bauermann:
> If the EMACSNATIVELOADPATH environment variable (by mistake) has
> duplicated paths, Emacs fails to load with:
>
> $ emacs
> List contains a loop:
> ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" .
> #2)
> $ echo $?
> 255
>
> A git bisect in Guix to find when the problem was introduced arrived
> at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
> native-comp-eln-load-path.").
>
> Fix the problem by applying Liliana's suggestion of changing 'nconc'
> to 'append' in the Elisp code written to subdirs.el.
It's better to describe the bug in code so that folks won't stumble
over it again. E.g. "Note: needle may be found multiple times, so
don't use destructive procedures like nconc."
> * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
> 'nconc'.
>
> Change-Id: If646b806f24666b5247850d30d2819c7482c130b
> Fixes: <https://issues.guix.gnu.org/75709>
You have some horizontal space here to name the bug :)
> Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
> ---
> guix/profiles.scm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/guix/profiles.scm b/guix/profiles.scm
> index 87b9543ac01f..63b2a08a48d4 100644
> --- a/guix/profiles.scm
> +++ b/guix/profiles.scm
> @@ -1230,8 +1230,8 @@ (define build
> (setq native-comp-eln-load-path
> (mapcan (lambda (dir)
> (if (equal dir needle)
> - (nconc ',native-comp-
> dirs
> - (list dir))
> + (append ',native-comp-
> dirs
> + (list dir))
> (list dir)))
> native-comp-eln-load-path))))
> port)
Cheers
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Sat, 25 Jan 2025 04:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> Am Freitag, dem 24.01.2025 um 20:01 -0300 schrieb Thiago Jung
> Bauermann:
>> If the EMACSNATIVELOADPATH environment variable (by mistake) has
>> duplicated paths, Emacs fails to load with:
>>
>> $ emacs
>> List contains a loop:
>> ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" .
>> #2)
>> $ echo $?
>> 255
>>
>> A git bisect in Guix to find when the problem was introduced arrived
>> at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
>> native-comp-eln-load-path.").
>>
>> Fix the problem by applying Liliana's suggestion of changing 'nconc'
>> to 'append' in the Elisp code written to subdirs.el.
> It's better to describe the bug in code so that folks won't stumble
> over it again. E.g. "Note: needle may be found multiple times, so
> don't use destructive procedures like nconc."
Good point. I added your suggested note as a comment in the Elisp code.
>> * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
>> 'nconc'.
>>
>> Change-Id: If646b806f24666b5247850d30d2819c7482c130b
>> Fixes: <https://issues.guix.gnu.org/75709>
> You have some horizontal space here to name the bug :)
Indeed. I added a short description.
Thank you for your quick review!
--
Thiago
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Sat, 25 Jan 2025 04:19:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 75817 <at> debbugs.gnu.org (full text, mbox):
If the EMACSNATIVELOADPATH environment variable (by mistake) has duplicated
paths, Emacs fails to load with:
$ emacs
List contains a loop:
("/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
"/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/home/user/.guix-profile/lib/emacs/native-site-lisp"
"/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" . #2)
$ echo $?
255
A git bisect in Guix to find when the problem was introduced arrived at
commit e9b13294700d ("profiles: emacs-subdirs: Also expand
native-comp-eln-load-path.").
Fix the problem by applying Liliana's suggestion of changing 'nconc' to
'append' in the Elisp code written to subdirs.el.
* guix/profiles.scm (emacs-subdirs): Use 'append' rather than 'nconc'.
Change-Id: If646b806f24666b5247850d30d2819c7482c130b
Fixes: Emacs "List contains a loop" error <https://issues.guix.gnu.org/75709>
Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
---
guix/profiles.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Changes since v1:
Made the following changes suggested by Liliana:
- Added comment to Elisp comment warning about destructive procedures
- Added short bug description to "Fixes" tag.
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 87b9543ac01f..fb4dbc5bd079 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1230,8 +1230,12 @@ (define build
(setq native-comp-eln-load-path
(mapcan (lambda (dir)
(if (equal dir needle)
- (nconc ',native-comp-dirs
- (list dir))
+ ;; Note: needle may be found
+ ;; multiple times, so don't use
+ ;; destructive procedures like
+ ;; nconc.
+ (append ',native-comp-dirs
+ (list dir))
(list dir)))
native-comp-eln-load-path))))
port)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Sat, 25 Jan 2025 14:27:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Am Samstag, dem 25.01.2025 um 01:14 -0300 schrieb Thiago Jung
Bauermann:
> If the EMACSNATIVELOADPATH environment variable (by mistake) has
> duplicated
> paths, Emacs fails to load with:
>
> $ emacs
> List contains a loop:
> ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" .
> #2)
> $ echo $?
> 255
>
> A git bisect in Guix to find when the problem was introduced arrived
> at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
> native-comp-eln-load-path.").
>
> Fix the problem by applying Liliana's suggestion of changing 'nconc'
> to 'append' in the Elisp code written to subdirs.el.
>
> * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
> 'nconc'.
>
> Change-Id: If646b806f24666b5247850d30d2819c7482c130b
> Fixes: Emacs "List contains a loop" error
> <https://issues.guix.gnu.org/75709>
> Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
> ---
Reworded commit message slightly and pushed to emacs-team. Let's wait
a little for all Emacsen to rebuild on CI before merging this into
master :)
Thanks
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Sun, 26 Jan 2025 18:05:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:
> Am Samstag, dem 25.01.2025 um 01:14 -0300 schrieb Thiago Jung
> Bauermann:
>> If the EMACSNATIVELOADPATH environment variable (by mistake) has
>> duplicated
>> paths, Emacs fails to load with:
>>
>> $ emacs
>> List contains a loop:
>> ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" .
>> #2)
>> $ echo $?
>> 255
>>
>> A git bisect in Guix to find when the problem was introduced arrived
>> at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
>> native-comp-eln-load-path.").
>>
>> Fix the problem by applying Liliana's suggestion of changing 'nconc'
>> to 'append' in the Elisp code written to subdirs.el.
>>
>> * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
>> 'nconc'.
>>
>> Change-Id: If646b806f24666b5247850d30d2819c7482c130b
>> Fixes: Emacs "List contains a loop" error
>> <https://issues.guix.gnu.org/75709>
>> Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
>> ---
> Reworded commit message slightly and pushed to emacs-team. Let's wait
> a little for all Emacsen to rebuild on CI before merging this into
> master :)
>
> Thanks
Thank you!
--
Thiago
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Mon, 27 Jan 2025 08:42:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Hello,
Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
> Am Samstag, dem 25.01.2025 um 01:14 -0300 schrieb Thiago Jung
> Bauermann:
>> If the EMACSNATIVELOADPATH environment variable (by mistake) has
>> duplicated
>> paths, Emacs fails to load with:
>>
>> $ emacs
>> List contains a loop:
>> ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/home/user/.guix-profile/lib/emacs/native-site-lisp"
>> "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp" .
>> #2)
>> $ echo $?
>> 255
>>
>> A git bisect in Guix to find when the problem was introduced arrived
>> at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
>> native-comp-eln-load-path.").
>>
>> Fix the problem by applying Liliana's suggestion of changing 'nconc'
>> to 'append' in the Elisp code written to subdirs.el.
>>
>> * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
>> 'nconc'.
>>
>> Change-Id: If646b806f24666b5247850d30d2819c7482c130b
>> Fixes: Emacs "List contains a loop" error
>> <https://issues.guix.gnu.org/75709>
>> Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
>> ---
> Reworded commit message slightly and pushed to emacs-team. Let's wait
> a little for all Emacsen to rebuild on CI before merging this into
> master :)
Looking forward to applying this fix (exwm wouldn’t start this morning).
:-)
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Mon, 27 Jan 2025 18:00:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Am Montag, dem 27.01.2025 um 09:41 +0100 schrieb Ludovic Courtès:
> Hello,
>
> Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
>
> > Am Samstag, dem 25.01.2025 um 01:14 -0300 schrieb Thiago Jung
> > Bauermann:
> > > If the EMACSNATIVELOADPATH environment variable (by mistake) has
> > > duplicated
> > > paths, Emacs fails to load with:
> > >
> > > $ emacs
> > > List contains a loop:
> > > ("/home/user/.guix-profile/lib/emacs/native-site-lisp"
> > > "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
> > > "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> > > "/home/user/.guix-profile/lib/emacs/native-site-lisp"
> > > "/gnu/store/…-emacs-lsp-mode-9.0.0/lib/emacs/native-site-lisp"
> > > .
> > > #2)
> > > $ echo $?
> > > 255
> > >
> > > A git bisect in Guix to find when the problem was introduced
> > > arrived
> > > at commit e9b13294700d ("profiles: emacs-subdirs: Also expand
> > > native-comp-eln-load-path.").
> > >
> > > Fix the problem by applying Liliana's suggestion of changing
> > > 'nconc'
> > > to 'append' in the Elisp code written to subdirs.el.
> > >
> > > * guix/profiles.scm (emacs-subdirs): Use 'append' rather than
> > > 'nconc'.
> > >
> > > Change-Id: If646b806f24666b5247850d30d2819c7482c130b
> > > Fixes: Emacs "List contains a loop" error
> > > <https://issues.guix.gnu.org/75709>
> > > Suggested-by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
> > > ---
> > Reworded commit message slightly and pushed to emacs-team. Let's
> > wait a little for all Emacsen to rebuild on CI before merging this
> > into master :)
>
> Looking forward to applying this fix (exwm wouldn’t start this
> morning).
> :-)
Welp, I just found out the hard way there is no jobset for emacs-team…
Should we add one or just directly push to master?
Cheers
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Mon, 27 Jan 2025 22:48:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Hello,
Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
>> Looking forward to applying this fix (exwm wouldn’t start this
>> morning).
>> :-)
> Welp, I just found out the hard way there is no jobset for emacs-team…
> Should we add one or just directly push to master?
There was one but it was deactivated; I’ve now reactivated it.
https://ci.guix.gnu.org/jobset/emacs-team
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Tue, 28 Jan 2025 23:59:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 75817 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
How would I apply this patch? Like so?
guix build guix --with-patch=guix=guix.patch
My EXWM, too, wouldn’t start this morning and I am desperate.
—Navajeeth
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Wed, 29 Jan 2025 07:50:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 75817 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Navajeeth,
Have you tried reverting to a previous generation? This should have a
working version of Emacs, etc. You should be able to do this from the
console without entering your window manager.
Something along the lines of
guix package -S <previous generation>
or even
guix package --roll-back
to get you back to the previous working generation
Good luck!
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75817
; Package
guix-patches
.
(Mon, 03 Feb 2025 19:42:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 75817 <at> debbugs.gnu.org (full text, mbox):
Hey Liliana,
Ludovic Courtès <ludo <at> gnu.org> skribis:
> Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
>
>>> Looking forward to applying this fix (exwm wouldn’t start this
>>> morning).
>>> :-)
>> Welp, I just found out the hard way there is no jobset for emacs-team…
>> Should we add one or just directly push to master?
>
> There was one but it was deactivated; I’ve now reactivated it.
>
> https://ci.guix.gnu.org/jobset/emacs-team
Could you please merge it if that’s OK?
I think it’s a real problem to keep Emacs broken when we have a fix and
substitutes.
Ludo’.
Reply sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
You have taken responsibility.
(Mon, 03 Feb 2025 20:25:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Thiago Jung Bauermann <bauermann <at> kolabnow.com>
:
bug acknowledged by developer.
(Mon, 03 Feb 2025 20:25:04 GMT)
Full text and
rfc822 format available.
Message #43 received at 75817-done <at> debbugs.gnu.org (full text, mbox):
Am Montag, dem 03.02.2025 um 20:40 +0100 schrieb Ludovic Courtès:
> Hey Liliana,
>
> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
> > Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:
> >
> > > > Looking forward to applying this fix (exwm wouldn’t start this
> > > > morning).
> > > > :-)
> > > Welp, I just found out the hard way there is no jobset for emacs-
> > > team… Should we add one or just directly push to master?
> >
> > There was one but it was deactivated; I’ve now reactivated it.
> >
> > https://ci.guix.gnu.org/jobset/emacs-team
>
> Could you please merge it if that’s OK?
>
> I think it’s a real problem to keep Emacs broken when we have a fix
> and substitutes.
Ahh, my bad. It was already merged as
f9b1e548c95a115e2bb143d0f4b1632a600f32da, but I forgot to close the
bug.
Cheers
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 04 Mar 2025 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 103 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.