-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing final system on recompile #290
Comments
Op 2 aug. 2022, om 23:41 heeft Stephen Robinson ***@***.******@***.***>> het volgende geschreven:
melody = \relative c'' {
g1 | \break
g1 | \break
g1 |
}
\score {
\new Staff <<
\melody
>
}
|
Dear Stephen,
I tested this several times. The code looks good to me.
I cannot reproduce the error you have.
So your testfiles are OK.
You might have to dig into the logfiles, see what is happening on your system.
regards, Eef
Op 2 aug. 2022, om 23:41 heeft Stephen Robinson ***@***.******@***.***>> het volgende geschreven:
I have found that on the master branch of lyluatex, I often get an erroneous output if I compile my document twice. For a trivial example, I have two files in a directory:
test.tex:
\documentclass{minimal}
\usepackage{lyluatex}
\begin{document}
\lilypondfile{test.ly<http://test.ly>}
\end{document}
test.ly<http://test.ly>:
melody = \relative c'' {
g1 | \break
g1 | \break
g1 |
}
\score {
\new Staff <<
\melody
>
}
The first time I compile it I get this result with all three systems:
[image]<https://user-images.githubusercontent.com/1923776/182477133-f9f65066-f0e7-4435-b5fc-057b89ff8ffc.png>
But if I compile it again (without changing anything) I only get two systems:
[image]<https://user-images.githubusercontent.com/1923776/182477264-00bc9f0b-59a7-427c-a6b7-3151154d8c1a.png>
No further recompilations give me any different results. I am stuck with only two systems. I have to remove the tmp-ly directory to get all three systems again.
I found that this bug does not seem to exist in the 1.0 version, so I used git bisect to try and find the guilty commit. It only seems to occur in the most recent commit (06a7c27<06a7c27>).
I have not had any time to delve in any deeper, or try to root cause it yet. This is my first time using lyluatex (I am new to lilypond in general), so I wasn't positive that this wasn't user error, but it seems pretty clearly erroneous to me.
I am running Ubuntu 20.04.2 LTS under WSL2 and using it's version of tex-live.
Cheers 🍻
—
Reply to this email directly, view it on GitHub<#290>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOERR2LY2CLLDZWAAN4UW23VXGI2HANCNFSM55MUYAQQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@eefweenink Thanks for looking into this. I tried on some other computers that I have with different Linux distros. One replicated the issue, but one didn't. If I get some free time, I will dig deeper into this. |
I misspoke before. It turns out I can replicate the issue on all my systems. I dug in a bit with some log statements like this: diff --git a/lyluatex.lua b/lyluatex.lua
index 96a14aa..5f1d25d 100644
--- a/lyluatex.lua
+++ b/lyluatex.lua
@@ -708,9 +708,11 @@ function Score:count_systems(force)
for f in lfs.dir(self.tmpdir) do
if f:match(systems) then
count = count + 1
+ info('have match: '..f..' count is now:'..count)
end
end
if count > 1 then count = count - 1 end
+ info('final count: '..count)
self.system_count = count
end
return self.system_count The first time this ran, I saw this in the log:
The second time I ran it, I saw this in the log:
So the first time I run it, it sees an extra One solution might be to move the call to The other solution I found was to change the lua pattern to only match files with diff --git a/lyluatex.lua b/lyluatex.lua
index 96a14aa..89b5a25 100644
--- a/lyluatex.lua
+++ b/lyluatex.lua
@@ -704,13 +704,12 @@ end
function Score:count_systems(force)
local count = 0
if force or not count then
- local systems = self.output:match("[^/]*$").."%-?%d*%.eps"
+ local systems = self.output:match("[^/]*$").."%-%d+%.eps"
for f in lfs.dir(self.tmpdir) do
if f:match(systems) then
count = count + 1
end
end
- if count > 1 then count = count - 1 end
self.system_count = count
end
return self.system_count |
@sudobash1 Thank you very much for reporting and investigating! I must confess I don’t have so much time as I used to have to closely follow all that. Could you please test against #292 (branch fix-290) to ensure I didn’t miss anything? Thanks again! |
I have found that on the
master
branch of lyluatex, I often get an erroneous output if I compile my document twice. For a trivial example, I have two files in a directory:test.tex:
test.ly:
The first time I compile it I get this result with all three systems:
But if I compile it again (without changing anything) I only get two systems:
No further recompilations give me any different results. I am stuck with only two systems. I have to remove the
tmp-ly
directory to get all three systems again.I found that this bug does not seem to exist in the 1.0 version, so I used git bisect to try and find the guilty commit. It only seems to occur in the most recent commit (06a7c27).
I have not had any time to delve in any deeper, or try to root cause it yet. This is my first time using lyluatex (I am new to lilypond in general), so I wasn't positive that this wasn't user error, but it seems pretty clearly erroneous to me.
I am running Ubuntu 20.04.2 LTS under WSL2 and using it's version of tex-live.
Cheers 🍻
The text was updated successfully, but these errors were encountered: