Writing a Lua-based package I suddenly stumbled over a seemingly unexplicable error message attempt to index global 'debug' (a boolean value). After some poking I managed to track this down to the use of selnolig in one of my documents, and further investigation turned up this line to be the culprit: https://github.com/micoloretan/selnolig/blob/master/selnolig.lua#L26
Using global variables is always risky, doing so without need should be avoided, and overwriting a standard library is a cardinal sin ...
This Pull Request fixes the “deadly“ issue and improves the module by wrapping everything in one single global variable with the unique name selnolig. If it were my own package I would apply some more changes but I have deliberately not changed anything beyond the necessary.
It would be nice if you could merge this and release an update to CTAN as soon as possible because I have to document the incompatibility in my soon-to-be-released package luaformatters. If you release an update right now then it would be guaranteed that the packages in CTAN and Tex Live will work together.
Writing a Lua-based package I suddenly stumbled over a seemingly unexplicable error message
attempt to index global 'debug' (a boolean value).
After some poking I managed to track this down to the use ofselnolig
in one of my documents, and further investigation turned up this line to be the culprit: https://github.com/micoloretan/selnolig/blob/master/selnolig.lua#L26Using global variables is always risky, doing so without need should be avoided, and overwriting a standard library is a cardinal sin ...
This Pull Request fixes the “deadly“ issue and improves the module by wrapping everything in one single global variable with the unique name
selnolig
. If it were my own package I would apply some more changes but I have deliberately not changed anything beyond the necessary.It would be nice if you could merge this and release an update to CTAN as soon as possible because I have to document the incompatibility in my soon-to-be-released package luaformatters. If you release an update right now then it would be guaranteed that the packages in CTAN and Tex Live will work together.