jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
58 stars 12 forks source link

Stacktrace with \include in LilyPond code (regression) #83

Closed uliska closed 6 years ago

uliska commented 6 years ago

I have noticed a strange regression that seems to be introduced with https://github.com/jperon/lyluatex/commit/c118d45f05ae49107f5e67fd368b002dfa68e592 (Implicitly add '.ly'...).

\documentclass{scrartcl}
\usepackage{lyluatex}
\begin{document}
\begin{ly}
\include "oll-core/package.ily"
{
  c'
}
\end{ly}

\end{document}

This file will fail with

lyluatex.
lua:80: attempt to index local 'includepaths' (a nil value)
stack traceback:
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:80: in function 'e
xtract_includepaths'
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:103: in function <
...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:99>
    (...tail calls...)
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:343: in function '
flatten_content'
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:542: in function '
output_filename'
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:224: in function '
calc_properties'
    ...e/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.lua:549: in function '
process'
    [\directlua]:1: in main chunk.
\env@ly@compilely@process ... {ly.score:process()}
                                                  \env@ignore 
l.10 \end{ly}

starting with this commit. With anything earlier checked out the file will still fail, but "cleanly", reporting only that LilyPond (expectedly) can't find the included file.

Commenting out the \include line in the LilyPond code fixes the crash.

So either there's some actual issue with this commit, or it exposes a similar issue as we had with \repeat.

jperon commented 6 years ago

My mistake, sorry.

uliska commented 6 years ago

Thanks. I did browse the file but didn't spot this. Maybe if I had inspected the commit instead (I had even identified it ...)