Software /
code /
prosody
Comparison
util/dependencies.lua @ 6778:4009ae66e0f0
util.dependencies: Only abort on Lua versions before 5.1, log a warning about 5.2 and above for now
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:38:44 +0100 |
parent | 6777:5de6b93d0190 |
child | 7007:e28fbe6dd424 |
comparison
equal
deleted
inserted
replaced
6777:5de6b93d0190 | 6778:4009ae66e0f0 |
---|---|
45 error("module 'util.ztact' has been deprecated in Prosody 0.8."); | 45 error("module 'util.ztact' has been deprecated in Prosody 0.8."); |
46 end | 46 end |
47 end; | 47 end; |
48 | 48 |
49 local function check_dependencies() | 49 local function check_dependencies() |
50 if _VERSION ~= "Lua 5.1" then | 50 if _VERSION < "Lua 5.1" then |
51 print "***********************************" | 51 print "***********************************" |
52 print("Unsupported Lua version: ".._VERSION); | 52 print("Unsupported Lua version: ".._VERSION); |
53 print("Only Lua 5.1 is supported."); | 53 print("At least Lua 5.1 is required."); |
54 print "***********************************" | 54 print "***********************************" |
55 return false; | 55 return false; |
56 end | 56 end |
57 | 57 |
58 local fatal; | 58 local fatal; |
134 end | 134 end |
135 return not fatal; | 135 return not fatal; |
136 end | 136 end |
137 | 137 |
138 local function log_warnings() | 138 local function log_warnings() |
139 if _VERSION > "Lua 5.1" then | |
140 log("warn", "Support for %s is experimental, please report any issues", _VERSION); | |
141 end | |
139 local ssl = softreq"ssl"; | 142 local ssl = softreq"ssl"; |
140 if ssl then | 143 if ssl then |
141 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | 144 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); |
142 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | 145 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then |
143 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | 146 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); |