micoloretan / selnolig

All files associated with the lualatex package "selnolig"
22 stars 6 forks source link

Debug table #10

Closed uliska closed 5 years ago

uliska commented 5 years ago

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.

zauguin commented 4 years ago

@micoloretan It would be great if this fix could be uploaded to CTAN soon to make the package more compatible.

stephanlukasczyk commented 1 year ago

@micoloretan May I also request a new release of selnolig to CTAN?