<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 10, 2020 at 1:24 PM Simon Dales <<a href="mailto:simon@getthingsfixed.co.uk">simon@getthingsfixed.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Luigi Scarso,<br>
<br>
When building/testing the new TeX Live 2020 (for Raspberry Pi) I spotted<br>
an apparent fault with luaharfbuzz.<br>
<br>
I did a recursive listing of _G and it broke. Turned out that some of<br>
the classes' tostrings are broken.<br>
<br>
The lua reference says that tostring() should return a sensible string<br>
for __all__ values.<br>
<br>
////////////////<br>
for k,v in pairs(luaharfbuzz) do<br>
  print(k,v)<br>
end<br>
////////////////<br>
<br>
The errant entries: Direction, Feature, Language, Script, Tag<br>
<br>
// investigation<br>
I checked the classes' metatables for __tostring, and the errant ones<br>
all had an entry, and those without worked fine.<br>
<br>
Checked the c sources and the classes with a simple register_class()<br>
worked fine. Those that set their own explicit __tostring() caused the<br>
problems.<br>
<br>
// test 1<br>
In my lua test script I iterated over luaharfbuzz looking for<br>
metatable.__tostring nd set to nil. Then re-listed, and all happy.<br>
<br>
// test 2<br>
I checked the sources, commented out their __tostring entries and<br>
rebuilt. The TeX Live ./Build self-tests work OK.<br>
<br>
So now the luaharfbuzz table has no __tostrings and now passes.<br>
<br>
Now they all return strings of the form: "harfbuzz.wibble: 0x12eac68",<br>
like one would expect.<br>
<br>
//////////////<br>
<br>
* How did this get through?<br>
* Is it safe to run luaharfbuzz with their __tostrings suppressed?<br>
* Other/better solution?<br>
<br>
/////////////////<br></blockquote><div><br></div><div>Yes the message is not nice, but it's not wrong .</div><div>Probably we will fix it in luatex 1.13.0 .</div><div>I have added a section to the reference manual -- it's the luaharfbuzz docs plus the example.</div><div> </div></div>-- <br><div dir="ltr" class="gmail_signature">luigi<br></div></div>