LuaLS / LuaLS/lua-language-server
Test failure: attempt to yield from outside a coroutine
未关闭
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
How are you using the lua-language-server?
Other
Which OS are you using?
Linux
What is the issue affecting?
Other
Expected Behaviour
The test suite should pass consistently.
Actual Behaviour
One time when running the tests, I saw this failure. However, I haven't seen it since.
bin/lua-language-server: attempt to yield from outside a coroutine
stack traceback:
[C]: in function 'coroutine.yield'
script/await.lua:152: in function 'await.wait'
script/workspace/workspace.lua:529: in function 'workspace.workspace.awaitReady'
test/full/self.lua:35: in main chunk
[C]: in upvalue 'originRequire'
test.lua:42: in function 'require'
test/full/init.lua:28: in main chunk
[C]: in upvalue 'originRequire'
test.lua:42: in function 'require'
test.lua:48: in upvalue 'test'
test.lua:109: in local 'main'
test.lua:115: in main chunk
(bootstrap.lua):85: in main chunk
[C]: in ?
The test failed in Alpine's build system CI and the full output is here: https://gitlab.alpinelinux.org/xordspar0/aports/-/jobs/1554206
Reproduction steps
git clone --recursive https://github.com/LuaLS/lua-language-server.gitcd lua-language-serverninja -C 3rd/luamake -f compile/ninja/linux.ninja3rd/luamake/luamake all3rd/luamake/luamake unit-test- Rarely see the above failure.
Additional Notes
lua-language-server version: 3.11.1
Log File
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行列出的 build 和 unit-test 命令,然后检查 script/await.lua、workspace/workspace.lua 和 test/full/self.lua 中报告的 coroutine.yield 堆栈附近的内容。使用 Alpine CI 日志和重复运行测试来调查间歇性失败。当 unit-test 套件能够始终通过,且不会在 coroutine 外部执行 yield 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- testing-qa
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100