LuaLS / LuaLS/lua-language-server
[Suggestion / Feature Request] Sandboxed scripts
未关闭
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
Lua is able to run scripts in sandbox, but there is currently no way to tell that to LuaLS (that i know).
So my suggestion would be making a annotation in the beginning of the file (---@sandbox), and all global variables inside this file wouldn't be visible to others.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件或测试。首先追踪 LuaLS 如何处理文件注解,以及如何确定全局变量是否在文件之间可见。完成的实现应包含一个 ---@sandbox 注解,用于限制该文件中的全局变量而不影响其他文件,并包含覆盖可见性行为的测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- devtools
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100