I assume this is os specific because the issue makes openlilylib
unusable and my understanding was that most of the oll developers were
living on the 2.21 branch already before the release and should have run
into the problem as well.

Right now my understanding is that the separation of input and output
parameters introduced by commit 5a4039b700f3a7447401780c720070d14e2891bd
leads to a situation with no valid reference to the source file present
in the output. My guess is that differences in the os' threading
libraries influence if the issue manifests itself.

The attached file location.ly demonstrates the issue. The file
location.out contoins the out put of three different runs:
1. lilypond at commit 520c0c31d468f9112aa305b93c8f038bf5d7e996 (the last
one unaffected)
2. lilypond at commit 5a4039b700f3a7447401780c720070d14e2891bd (first
one affected)
3. lilypond release 2.21.1 with the attached patch applied
Best regards,
Martin

-- 
My other computer is your Windows box.
\version "2.21.0"

loc =
#(define-void-function ()()
    (display (*location*)))

\loc

#(ly:message "~a" (*location*))
%#(ly:message "~a" (ly:input-file-line-char-column (*location*)))
Starting lilypond 2.21.0 [location.ly]...
Processing `/home/mn/src/lp/test/location.ly'
Parsing...
#<location /home/mn/src/lp/test/location.ly:9:2>
#<location /home/mn/src/lp/test/location.ly:7:1>
Success: compilation successfully completed
Completed successfully in 0.7".

Starting lilypond 2.21.0 [location.ly]...
Processing `/home/mn/src/lp/test/location.ly'
Parsing...
#<location  (position unknown)>
#<location /home/mn/src/lp/test/location.ly:7:1>
Success: compilation successfully completed
Completed successfully in 0.8".

Starting lilypond 2.21.1 [location.ly]...
Processing `/home/mn/src/lp/test/location.ly'
Parsing...
#<location /home/mn/src/lp/test/location.ly:9:2>
#<location /home/mn/src/lp/test/location.ly:7:1>
Success: compilation successfully completed
Completed successfully in 0.7".
From 00b37f47249fdefe7cca67fbb29e89bdd4ab0d2e Mon Sep 17 00:00:00 2001
From: mrtnnbr <[email protected]>
Date: Sat, 2 May 2020 17:47:01 +0200
Subject: [PATCH] fix (*location*) on freebsd

Make sure there's a valid reference to the source file while parsing embedded scheme code.
---
 lily/parse-scm.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc
index ab1b6006b0..0253d9982d 100644
--- a/lily/parse-scm.cc
+++ b/lily/parse-scm.cc
@@ -51,6 +51,7 @@ struct Parse_start
   Parse_start (SCM form, const Input &start, bool safe, Lily_parser *parser)
     : form_ (form), start_ (start), safe_ (safe), parser_ (parser)
   {
+    parsed_.set (start.get_source_file (), start.start (), start.end ());
   }
 
   static SCM handle_error (void *data, SCM /*tag*/, SCM args)
-- 
2.26.2

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to