Get loop list warning when doing native compilation
rayw000 opened this issue · comments
I'm trying to native compile powerline.el
on Emacs 28.0.50
, this warning
/path/to/elpa/powerline-20210313.1621/powerline.el: Error: List contains a loop ("22", . #0)
makes powerline
failed to compile.
Currently I add regexp powerline
into comp-deferred-compilation-deny-list
to walk around this issue.
(setq comp-deferred-compilation-deny-list '("powerline"))
any idea what's causing this? I've not got the time to maintain this package right now but there are others lurking that will hopefully help out.
any idea what's causing this? I've not got the time to maintain this package right now but there are others lurking that will hopefully help out.
I'd like to take a look when I have time. 😃
I found that some of the pl/*
functions in pl/memoize
called with different arguments may complain about the "loop list", such as (pl/bar right)
and (pl/brace left)
, but not all.
Lines 218 to 257 in cfff1cf
Seems that these functions are all invoking
pl/pattern-defun
. I'll do some further job when I have time.powerline/powerline-separators.el
Lines 129 to 167 in cfff1cf
There's a circular list somewhere in pl/memoize
https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Errors.html
@rayw000 This appears to be the culprit
powerline/powerline-separators.el
Line 80 in cfff1cf
It looks intentional though. It's a warning, I'm not sure if it's worth getting rid of?
I'll leave it up to the people involved in this bug to send a PR if they feel it necessary to remove.
It's an error, it's preventing the gcc jit from compiling powerline, if any package needs a speed boost, powerline is definitely it as it's one of the major bottlenecks during scrolling.
oh my bad. well I am not really maintaining this anymore. if there are a lot of people upset I guess I'd come out of retirement but prefer a patch. just being honest about my time.
I'd send you a PR if I understand what this code is doing, but I don't, and have no idea how to provide equivalent functionality without a circular list.
Relevant code:
powerline/powerline-separators.el
Lines 109 to 127 in cfff1cf
The idea is that patterns have up to 5 lines,
- pattern
- header
- footer
- second pattern
- center
this allows one to generate glyphs in the powerline using pixels like,
header pixels
pattern pixels
pattern pixels
pattern pixels
pattern pixels
center pixels
second pattern pixels
second pattern pixels
second pattern pixels
second pattern pixels
footer pixels
This, even though pattern pixels only needs to specified once, it may need to be printed multiple times. The "hack" in the code I linked makes it so the list is infinite so it can keep getting printed pattern-height-sym
times using cl-subseq
.
So the fix is to either put a loop in there, or generate the list after you already know pattern-height-sym
.
I'm happy to keep helping with this and review the code but it's the testing I don't really have time for.