You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifmodulethen-- heuristic for exporting a global package table
ltn12=_M-- luacheck: ignore
end
module function exists in 5.1 (in 5.2 manual it is referenced as deprecated).
Still nobody nowadays expect that module exports globals.
Nor other (sub)modules of luasocket do that.
The text was updated successfully, but these errors were encountered:
I agree this should be removed, but doing so will probably warrant a breaking release semver bump because it will not be a smooth upgrade path for anybody that was relying on this quirk.
I tend to view that as fixing a bug, which only requires a minor version bump. Of course, there may be someone who relies on the bug in their own workflow, but it is still a bug.
A long time ago almost all Lua modules used to export a global. ltn12 is a module from that era and used in a lot of places. So yes I can guarantee you changing this will break code, it should be done in a major revision.
luasocket/src/ltn12.lua
Lines 16 to 19 in 1fad162
module
function exists in 5.1 (in 5.2 manual it is referenced as deprecated).Still nobody nowadays expect that module exports globals.
Nor other (sub)modules of
luasocket
do that.The text was updated successfully, but these errors were encountered: