Hi
I came across a piece of code thats scans all my Lua files to see if any have a version reference recorded anywhere. I did this because I was interested to know the version of some of the key Lua modules, especially luasec/https
See code and findings below.
local command = io.popen("find . -type f -name '*.lua' | xargs grep -H 'VERSION *=[^=]'")
local response = command:read("*a")
print(response)
And this is what I got back…
./mios/usr/lib/lua/ssl/https.lua:_VERSION = "0.4"
./rom/usr/lib/lua/ltn12.lua:_M._VERSION = "LTN12 1.0.3"
./rom/usr/lib/lua/luci/ltn12.lua:_VERSION = "LTN12 1.0.1"
./rom/usr/lib/lua/luci/model/uci.lua:APIVERSION = uci.APIVERSION
./rom/usr/lib/lua/soap/server.lua:_VERSION = "LuaSOAP 2.0.1 service helping functions"
./rom/usr/lib/lua/soap.lua:_VERSION = "LuaSOAP 2.0.1"
./rom/usr/lib/lua/socket/url.lua:_M._VERSION = "URL 1.0.3"
./rom/usr/lib/lua/ssl/https.lua: _VERSION = "0.8",
./rom/usr/lib/lua/ssl.lua: _VERSION = "0.8",
./tmp/upnp-event-proxy.lua:local API_VERSION = "3"
./usr/lib/lua/ltn12.lua:_M._VERSION = "LTN12 1.0.3"
./usr/lib/lua/luci/ltn12.lua:_VERSION = "LTN12 1.0.1"
./usr/lib/lua/luci/model/uci.lua:APIVERSION = uci.APIVERSION
./usr/lib/lua/soap/server.lua:_VERSION = "LuaSOAP 2.0.1 service helping functions"
./usr/lib/lua/soap.lua:_VERSION = "LuaSOAP 2.0.1"
./usr/lib/lua/socket/url.lua:_M._VERSION = "URL 1.0.3"
./usr/lib/lua/ssl.lua: _VERSION = "0.8"
Does anyone know what all the different areas are for, and also why at times there are different versions ? You’ll notice they have https.lua in 3 places, between v0.4 and v0.8 ?!!??