Skip to content

Commit 355c8e4

Browse files
committed
delete removed function debug.setcstacklimit
1 parent 9b6f6a6 commit 355c8e4

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

main.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta')
5656
util.enableCloseFunction()
5757
util.enableFormatString()
5858

59-
---@diagnostic disable-next-line: deprecated
60-
debug.setcstacklimit(200)
6159
--collectgarbage('generational', 10, 50)
6260
--collectgarbage('incremental', 120, 120, 0)
6361
collectgarbage('param', 'minormul', 10)

script/service/service.lua

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,6 @@ function m.reportStatus()
242242
proto.notify('$/status/report', info)
243243
end
244244

245-
function m.testVersion()
246-
local stack = debug.setcstacklimit(200)
247-
debug.setcstacklimit(stack + 1)
248-
if type(stack) == 'number' and debug.setcstacklimit(stack) == stack + 1 then
249-
proto.notify('window/showMessage', {
250-
type = 2,
251-
message = 'It seems to be running in Lua 5.4.0 or Lua 5.4.1 . Please upgrade to Lua 5.4.2 or above. Otherwise, it may encounter weird "C stack overflow", resulting in failure to work properly',
252-
})
253-
end
254-
end
255-
256245
function m.sayHello()
257246
proto.notify('$/hello', {'world'})
258247
end
@@ -287,7 +276,6 @@ function m.start()
287276
proto.listen('stdio')
288277
end
289278
m.report()
290-
m.testVersion()
291279
m.lockCache()
292280

293281
require 'provider'

0 commit comments

Comments
 (0)