hchunhui / librime-lua

Extending RIME with Lua scripts
BSD 3-Clause "New" or "Revised" License
357 stars 43 forks source link

升级mac鼠须管18之后log.info无效 #340

Closed Urie96 closed 6 months ago

Urie96 commented 6 months ago

不仅如此,下面这个require在16.2上可以,但升级到18之后也会导致lua整个插件失效

package.cpath = os.getenv("HOME") .. "/Library/Rime/lua/lib/lib?.so;" .. package.cpath
local timer = require("timer")
mirtlebot commented 6 months ago

干嘛关掉,用 librime 的 rime_api_console 试了下,稳定复现,不是鼠须管的问题

local function test_log(input)
    print('test_log') 
    log.info('test_log') --> not work
    log.warning('test_log') --> work
    log.error('test_log') --> work
    for _ in input:iter() do
        _.comment = '*'
        yield(_)
    end
end
return test_log

@shewer

shewer commented 6 months ago

不仅如此,下面这个require在16.2上可以,但升级到18之后也会导致lua整个插件失效

package.cpath = os.getenv("HOME") .. "/Library/Rime/lua/lib/lib?.so;" .. package.cpath
local timer = require("timer")

313