# microtype error with lualatex: “attempt to call field warning a nil value”

After todays update of luaotfload microtype gives an error when used with lualatex:

\documentclass{article}

\usepackage{microtype}

\begin{document}
abc

\end{document}


/tex/latex/microtype/microtype.lua:145: attempt to call field 'warning' (a nil v
alue)
stack traceback:
...exlive/2018/texmf-dist/tex/latex/microtype/microtype.lua:145: in main chunk
[C]: in function 'require'
[\directlua]:1: in main chunk.
l.59 \MT@lua{require("microtype")}


This is due to a bug in microtype. It uses an undefined lua-function, the bug appears now due as a side-effect of some changes in luaotfload.

A work-around until microtype is fixed is to load luatexbase:

\documentclass{article}
\usepackage{luatexbase}
\usepackage{microtype}

\begin{document}
abc

\end{document}

• Oh no, right now texlive 2018 is frozen with this bug in it. I hope the texlive people can make an exception for this that breaks so many documents! – pst Feb 27 at 8:24
• @Krishna then we would have had a broken luaotfload in texlive (the letterspacing didn't work). This would have been much worser. – Ulrike Fischer Feb 27 at 19:08
• @Krishna no it broke from version 2.94 to 2.95, the problem was only there for around two weeks: github.com/u-fischer/luaotfload/issues/38. – Ulrike Fischer Feb 27 at 19:13
• @UlrikeFischer cool. Got it. Thank you for fixing this. – Krishna Feb 27 at 19:15
• microtype should be fixed in v2.7b tug.org/pipermail/tex-live-commits/2019-March/008911.html, just a tad is too late for TeX live 2018. – moewe Mar 3 at 8:22