Skip to content
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

processing of FTML files by SILE does not work #60

Open
devosb opened this issue Jan 7, 2021 · 7 comments
Open

processing of FTML files by SILE does not work #60

devosb opened this issue Jan 7, 2021 · 7 comments

Comments

@devosb
Copy link
Contributor

devosb commented Jan 7, 2021

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 added a commit that referenced this issue Jan 7, 2021
This does not work, and causes smith to return an error. Details at
#60

This commit essentially reverts half of the previous commit.
@devosb
Copy link
Contributor Author

devosb commented Jan 7, 2021

I disabled using SILE for FTML files in cb9cb43

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
Copy link
Contributor

mhosken commented Jan 8, 2021

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
Copy link
Contributor

n7s commented Jan 9, 2021

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
Copy link
Contributor Author

devosb commented Jan 11, 2021

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
Copy link
Contributor

n7s commented Jan 20, 2021

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
Copy link
Contributor Author

devosb commented Jan 22, 2021

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
Copy link
Contributor

bobh0303 commented Jan 22, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants