lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: source file ... .scm newer than compiled ... .go file


From: Jean Abou Samra
Subject: Re: source file ... .scm newer than compiled ... .go file
Date: Wed, 19 Oct 2022 17:12:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 17/10/2022 à 22:23, Federico Bruni a écrit :
If anybody can provide a patch which can disable automatic recompilation internal to Guile and LilyPond only, I'd be happy to apply it.


I'm not sure how to test this but I think it should work:


From fa8f848423d6a104aad0e8ba8fdf87feedd0c4a6 Mon Sep 17 00:00:00 2001
From: Jean Abou Samra <jean@abou-samra.fr>
Date: Wed, 19 Oct 2022 17:09:42 +0200
Subject: [PATCH] Never recompile files in /app/

---
 libguile/load.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libguile/load.c b/libguile/load.c
index c209812dc..c0d7b5fd0 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -550,6 +550,11 @@ static int
 compiled_is_fresh (SCM full_filename, SCM compiled_filename,
                    struct stat *stat_source, struct stat *stat_compiled)
 {
+  if (scm_to_int (scm_string_length (full_filename)) >= 5
+      && scm_to_bool (scm_equal_p (scm_substring (full_filename, scm_from_int (0), scm_from_int (5)),
+                                   scm_from_utf8_string ("/app/"))))
+    return 1;
+
   int compiled_is_newer;
   struct timespec source_mtime, compiled_mtime;

--
2.37.3



Basically it limits "never recompile" to files whose path starts
with "/app/".

I don't know Flatpak enough to be certain that /app/ is the right
path to check, though.


If I merge the flatpak PR tomorrow, can you test it with the edition engraver and report what happens?
If you don't have time, no problem and we'll wait for users to report it.



Sorry for asking dumb questions: how do I test it?

When I install Frescobaldi from Flatpak, it only has LilyPond
2.22 preconfigured. Where should I find 2.23?


I don't have any spare time unfortunately and I can work on LilyPond only for small chunks of time during night.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]