silnrsi / smith

font development, testing and release
Other
14 stars 5 forks source link

processing of FTML files by SILE does not work #60

Open devosb opened 3 years ago

devosb commented 3 years ago

In mid December 2020 several font projects, such as Doulos are failing to run a test. I think this is due to SILE being enabled to process FTML files while fixing another bug. The log report for this font is

smith: Entering directory `/var/lib/tc/work/ff823f505067ba1b/results'
[14/60] DoulosSIL-Regular_gr.ttf: results/DoulosSIL-Regular.ttf -> results/tests/ftml/fonts/DoulosSIL-Regular_gr.ttf
[15/60] DoulosSIL-Regular_ot.ttf: results/DoulosSIL-Regular.ttf -> results/tests/ftml/fonts/DoulosSIL-Regular_ot.ttf
[16/60] allchars_doulossil-regular.pdf: tests/allchars.ftml results/DoulosSIL-Regular.ttf -> results/tests/sile/allchars_doulossil-regular.pdf
[17/60] allframed_doulossil-regular.pdf: tests/allframed.ftml results/DoulosSIL-Regular.ttf -> results/tests/sile/allframed_doulossil-regular.pdf
SILE v0.10.13 (Lua 5.2)
Loading ftml.sil
SILE v0.10.13 (Lua 5.2)
</usr/lib/python3/dist-packages/smithlib/classes/ftml.sil>
Loading ftml.sil
</usr/lib/python3/dist-packages/smithlib/classes/ftml.sil>
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /usr/lib/python3/dist-packages/smithlib/classes/ftml.sil: in <file> (\)
</var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml>
</var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml>
! SILE.toPoints() was deprecated in SILE v0.10.0. Please use SILE.measurement():tonumber() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:4:3: in \head
! SILE.nodefactory.hfillGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.hfillglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.nodefactory.hfillGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.hfillglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.length.parse() was deprecated in SILE v0.10.0. Please use SILE.length() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:29: in \raggedtable: 0x56393680fa90
! SILE.toPoints() was deprecated in SILE v0.10.0. Please use SILE.measurement():tonumber() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:4:3: in \head
! SILE.nodefactory.hfillGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.hfillglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! SILE.nodefactory.hfillGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.hfillglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! SILE.nodefactory.zeroGlue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.zeroglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! SILE.nodefactory.newVglue() was deprecated in SILE v0.10.0. Please use SILE.nodefactory.vglue() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! SILE.length.parse() was deprecated in SILE v0.10.0. Please use SILE.length() instead. nil at /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:29: in \raggedtable: 0x55eaab7371d0
! Unhandled content type string passed to macro \ftml:testgroupcomment at:
  /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml: in \ftml:testgroupcomment near 12:3: in \testgrouptable: 0x563936672a90
  /var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml:12:3: in \testgrouptable: 0x563936672a90
stack traceback:
  /usr/share/sile/core/utilities.lua:29: in function 'error'
  /usr/share/sile/core/baseclass.lua:79: in function '?'
  /usr/share/sile/core/sile.lua:300: in function 'call'
  /usr/share/sile/packagemanager/ftmlsile/classes/ftml.lua:374: in function '?'
  /usr/share/sile/core/sile.lua:300: in function 'call'
  /usr/share/sile/core/inputs-common.lua:64: in function 'process'
  /usr/share/sile/core/inputs-xml.lua:22: in function 'process'
  /usr/share/sile/core/sile.lua:253: in function 'readFile'
  /usr/bin/sile:62: in function </usr/bin/sile:62>
  [C]: in function 'xpcall'
  /usr/bin/sile:62: in main chunk
  [C]: in ?
! Unhandled content type string passed to macro \ftml:testgroupcomment at:
  /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml: in \ftml:testgroupcomment near 12:3: in \testgrouptable: 0x55eaab599050
  /var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml:12:3: in \testgrouptable: 0x55eaab599050
stack traceback:
  /usr/share/sile/core/utilities.lua:29: in function 'error'
  /usr/share/sile/core/baseclass.lua:79: in function '?'
  /usr/share/sile/core/sile.lua:300: in function 'call'
  /usr/share/sile/packagemanager/ftmlsile/classes/ftml.lua:374: in function '?'
  /usr/share/sile/core/sile.lua:300: in function 'call'
  /usr/share/sile/core/inputs-common.lua:64: in function 'process'
  /usr/share/sile/core/inputs-xml.lua:22: in function 'process'
  /usr/share/sile/core/sile.lua:253: in function 'readFile'
  /usr/bin/sile:62: in function </usr/bin/sile:62>
  [C]: in function 'xpcall'
  /usr/bin/sile:62: in main chunk
  [C]: in ?
smith: Leaving directory `/var/lib/tc/work/ff823f505067ba1b/results'
Build failed
 -> task failed (exit status 1):
  {task 140308995387576: allframed_doulossil-regular.pdf allframed.ftml,DoulosSIL-Regular.ttf -> allframed_doulossil-regular.pdf}
' SILE_PATH="/usr/lib/python3/dist-packages/smithlib" /usr/bin/sile -o "tests/sile/allframed_doulossil-regular.pdf" -e \'SILE.scratch.ftmlfontlist={"DoulosSIL-Regular.ttf"}\' -I ftml.sil "/var/lib/tc/work/ff823f505067ba1b/tests/allframed.ftml"  #; test -e "tests/sile/allframed_doulossil-regular.pdf" '
 -> task failed (exit status 1):
  {task 140308995370848: allchars_doulossil-regular.pdf allchars.ftml,DoulosSIL-Regular.ttf -> allchars_doulossil-regular.pdf}
' SILE_PATH="/usr/lib/python3/dist-packages/smithlib" /usr/bin/sile -o "tests/sile/allchars_doulossil-regular.pdf" -e \'SILE.scratch.ftmlfontlist={"DoulosSIL-Regular.ttf"}\' -I ftml.sil "/var/lib/tc/work/ff823f505067ba1b/tests/allchars.ftml"  #; test -e "tests/sile/allchars_doulossil-regular.pdf" '
Process exited with code 1

In order to build and test fonts on the CI without errors, I will comment out the line in the commit mentioned above that enables SILE to process FTML.

devosb commented 3 years ago

I disabled using SILE for FTML files in https://github.com/silnrsi/smith/commit/cb9cb4347db48d12a3fdef4f4da6794c094b1b6c

I was not able to reproduce the warnings and errors on my Ubuntu Focal system with SILE and smith installed from source, updated today.

mhosken commented 3 years ago

sile no longer allows passing string content to a defined command call, one has to wrap it in a table now. Update various deprecated calls to quieten sile's winging. One would expect no break of backward compatibility in a 0.x.y version bump, but I suppose that is too much to ask.

n7s commented 3 years ago

Thanks, after some more testing, it looks good to me.

I only see one error in Mingzat, but maybe it's a syntax issue in the ftml itself:

Loading ftml.sil
</usr/lib/python3/dist-packages/smithlib/classes/ftml.sil>
</smith/font-mingzat/tests/AllChars.ftml>
</smith/font-mingzat/tests/AllCombinations.ftml>

Error detected:
        /usr/lib/python3/dist-packages/smithlib/classes/ftml.lua:578: bad argument #1 to 'find' (string expected, got nil)
devosb commented 3 years ago

All the FTML files in the Mingzat project validate with the FTML DTD, so if there is a syntax error, maybe the DTD should be corrected.

n7s commented 3 years ago

Other lua errors in other projects:

Abyssinica /usr/lib/python3/dist-packages/smithlib/classes/ftml.lua:578: bad argument #1 to 'find' (string expected, got nil)

Alkalami /usr/lib/python3/dist-packages/smithlib/classes/ftml.lua:608: attempt to index field 'styles' (a nil value)

Lateef /usr/lib/python3/dist-packages/smithlib/classes/ftml.lua:627: attempt to get length of global 'colinfo' (a nil value)

devosb commented 3 years ago

These other three projects have (at least some) FTML files that do not validate. I suggest that @LornaSIL fix the FTML files before the errors from Lua are investigated.

bobh0303 commented 3 years ago

Good catch, Bobby.

On Fri, Jan 22, 2021, 7:16 AM devosb notifications@github.com wrote:

These other three projects have (at least some) FTML files that do not validate. I suggest that @LornaSIL https://github.com/LornaSIL fix the FTML files before the errors from Lua are investigated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/silnrsi/smith/issues/60#issuecomment-765429633, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUGN7F43Y324A3XITQW6KDS3GCFVANCNFSM4VYIJ6HA .