7.5 Fixing snippets in LilyPond sources
If some snippet from ‘Documentation/snippets’ causes the
documentation compilation to fail, the following steps should be
followed to fix it reliably.
-
Look up the snippet filename ‘foo.ly’ in the error output
or log, then fix the file ‘Documentation/snippets/foo.ly’ to make the
documentation build successfully.
-
Determine where it comes from by looking at its first line, e.g. run
head -1 Documentation/snippets/foo.ly
-
If the snippet comes from the LSR, also apply the fix to the
snippet in the LSR and send a notification email to an LSR editor with CC to
the development list – see Adding and editing snippets. The
failure may sometimes not be caused by the snippet in LSR but by the
syntax conversion made by
convert-ly
; in this case, try to fix
convert-ly
or report the problem on the development list, then
run makelsr.py
again, see LSR to Git. In some cases,
when some features has been introduced or vastly changed so it requires
(or takes significant advantage of) important changes in the snippet, it
is simpler and recommended to write a new version of the snippet in
‘Documentation/snippets/new’, then run makelsr.py
.
-
If the snippet comes from
‘Documentation/snippets/new’, apply the same fix in
‘Documentation/snippets/new/foo.ly’ that you did in
‘Documentation/snippets/foo.ly’. If the build failure
was caused by a translation string, you may have to fix
‘input/texidocs/foo.texidoc’ instead.
-
When you’ve done, commit your changes to Git and ensure they’re
pushed to the correct branch.