Subject: bug#63100: closed (Re: bug#63103: 30.0.50; nconc compiler optimization breaks user packages)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 27 Apr 2023 12:30:03 +0000

Your bug report

#63103: 30.0.50; nconc compiler optimization breaks user packages

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
63103: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63103
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#63103: 30.0.50; nconc compiler optimization breaks user packages
From: Mattias Engdegård <[email-masked]>
To: Daniel Mendler <[email-masked]>
Cc: Philip Kaludercic <[email-masked]>, Stefan Monnier <[email-masked]>, [email-masked]
Date: Thu, 27 Apr 2023 14:28:58 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

27 apr. 2023 kl. 12.42 skrev Daniel Mendler <[email-masked]>:

> I think it is
> kind of nice that `nconc' can be used as a tool to turn a proper list
> into an improper list and vice versa.

It's a bit obscure, though --

  (setcdr (last X) nil)

is a lot clearer than

  (nconc X nil)

and when the latter is preferred for performance, a comment might be polite to the reader.

Anyway, a fix has been pushed to master, and the manual entry for `nconc` got an extra example.

Subject: 30.0.50; nconc compiler optimization breaks user packages
From: Maks <[email-masked]>
To: [email-masked]
Date: Wed, 26 Apr 2023 18:37:42 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

after long debugging time I figured out that commit
e6ca5834a6eab91023e9f968b65683d0a74db1e7 ('Improved nconc and append
compiler optimisations') breaks package vertico.el. I'm not completely
understanding how it works but try to describe the problem.

If I set breakpoint before breaking commit I get the following stacktrace:

```
Debugger entered--entering a function:
  vertico--arrange-candidates()
  vertico--exhibit()
```
, but after breaking commit I get slightly different stacktrace:

```
Debugger entered--entering a function:
  vertico--arrange-candidates()
  vertico--exhibit()
```

As you can see, the difference is in the tail of the input list. This
list comes from completion-hilit-commonality function from
minibuffer.el and it has nconc call. But testing
completion-hilit-commonality in REPL separetely from vertico.el package
give the same result (with 0 at the end of list).

Before sending this report I have tried a lot of versions of the
vertico.el package and have the same result. So I tend to think that problem is not directly
related to package.