Title: feat(logging): LuaLS 日志写入宿主会话日志目录 by xiaoyumuxi · Pull Request #6 · Lithe-IDEA/lithe-plugin-lua · GitHub
Open Graph Title: feat(logging): LuaLS 日志写入宿主会话日志目录 by xiaoyumuxi · Pull Request #6 · Lithe-IDEA/lithe-plugin-lua
X Title: feat(logging): LuaLS 日志写入宿主会话日志目录 by xiaoyumuxi · Pull Request #6 · Lithe-IDEA/lithe-plugin-lua
Description: 概要 Lua 插件接入结构化日志 v2:插件升到插件 API 2,通过启动模板 ${logDir} 把宿主分配的会话日志目录传给 LuaLS,LuaLS 只保留 warn/error 并写入该目录,不再在用户缓存目录下自建 log/。语言服务生命周期、window/logMessage 和有界 stderr 仍由宿主统一写入 lsp/lua 通道。本插件没有后端,也不使用 SDK。 依赖: 宿主 https://github.com/1lck/Lithe-IDEA/pull/1676(插件 API 2 的 ${logDir} 启动模板,已合入 preview,尚未进入稳定版) 与宿主 #1699 和 SDK #17 没有代码依赖;一起提交是因为同属结构化日志 v2 的插件接入。 清单(plugin.json) pluginAPIVersion 从 1 改为 2。 语言服务器启动参数从 [] 改为 ["${logDir}"]。 启动器(bin/lithe-lua-language-server) 第一个参数必须是宿主提供的日志目录: 缺失时以 “Lithe must supply the current session log directory” 退出。 不是绝对路径时以退出码 64 拒绝。 校验后 shift,其余参数照旧传给 LuaLS。 只创建 $state_dir/meta,不再创建 $state_dir/log。 LuaLS 参数改为 --logpath="$log_dir" --loglevel=warn;--metapath 仍指向用户缓存目录。 README 日志去向:LuaLS 的警告和错误写入当前会话的 plugins/io.github.lithe-idea.lua-support/files/;生成的标准库定义仍在 ~/Library/Caches/io.github.lithe-idea.lua-support/meta/(设置 XDG_CACHE_HOME 时用其对应目录),两者生命周期独立。 安装要求改为支持插件 API 2、结构化日志 v2 和本地 logDirectory 的最新 macOS Lithe preview。 新增“诊断日志”一节: --logpath、--loglevel、--metapath 是 LuaLS 3.19.1 的公开 CLI 参数;默认只保留 warn/error,避免 trace/debug 的协议和文档内容写进文件。 LuaLS 原生文件只用于单独排障,不等同于宿主脱敏后的 v2 事件。 启动器不删除旧版本留在缓存目录里的日志。 旧宿主或远程进程缺少 logDirectory 时,按已有启动契约明确拒绝 ${logDir},不回退到安装目录。 只发布 macOS;Windows 仍是 v1,不声明支持 Windows v2。 目录说明和“改造成其他插件”步骤同步更新。 验证 本地: sh -n 检查启动器语法通过。 传相对路径时退出码 64,不传参数时报上面的提示并退出。 node scripts/package.mjs 通过,生成 arm64、x64 两个包。 此前在 Codex 工作区(计划记录):固定 SHA 的 LuaLS 3.19.1 两架构打包;真实 arm64 启动;1214 个安装文件哈希在运行后不变,进程正常回收。 本地没有跑 Lithe Store 规则校验,交给 CI。 预期的 CI 状态与合并顺序 CI 只打包并做 Store 规则校验,不检出宿主,预期通过。 发布要等包含 #1676 的 Lithe 稳定版:不含 #1676 的宿主不提供 ${logDir},LuaLS 无法启动。 与宿主 #1699 无合并先后要求。 本 PR 没有改插件版本号(仍为 0.3.0)。 限制 只覆盖 macOS 宿主;Windows 仍是 v1 writer。 未在 Lithe 整机日志窗口里做端到端验收。 配套 PR: 宿主 Core:1lck/Lithe-IDEA#1699 SDK:Lithe-IDEA/lithe-plugin-docs#17 Database 插件:Lithe-IDEA/lithe-plugin-database#2 Docker 插件:Lithe-IDEA/lithe-plugin-docker#3 HTTP Client 插件:Lithe-IDEA/lithe-plugin-http-client#5 Cargo 插件:https://github.com/Lithe-IDEA/lithe-plugin-cargo/pull/5 SVN 插件:Lithe-IDEA/lithe-plugin-svn#2 Maven 插件:Lithe-IDEA/lithe-plugin-maven#9 Lua 插件:https://github.com/Lithe-IDEA/lithe-plugin-lua/pull/6(本 PR) Go 插件:Lithe-IDEA/lithe-plugin-go#3 Gradle 插件:Lithe-IDEA/lithe-plugin-gradle#5 LLDB 插件:Lithe-IDEA/lithe-plugin-lldb#3 PHP 插件:Lithe-IDEA/lithe-plugin-php#3
Open Graph Description: 概要 Lua 插件接入结构化日志 v2:插件升到插件 API 2,通过启动模板 ${logDir} 把宿主分配的会话日志目录传给 LuaLS,LuaLS 只保留 warn/error 并写入该目录,不再在用户缓存目录下自建 log/。语言服务生命周期、window/logMessage 和有界 stderr 仍由宿主统一写入 lsp/lua 通道。本插件没有后端,也不使用 SDK。 依赖: ...
X Description: 概要 Lua 插件接入结构化日志 v2:插件升到插件 API 2,通过启动模板 ${logDir} 把宿主分配的会话日志目录传给 LuaLS,LuaLS 只保留 warn/error 并写入该目录,不再在用户缓存目录下自建 log/。语言服务生命周期、window/logMessage 和有界 stderr 仍由宿主统一写入 lsp/lua 通道。本插件没有后端,也不使用 SDK。 依赖: ...
Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-lua/pull/6
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:797435b5-acd3-ad6a-7ebe-57aa35d3f863 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 976E:2636FF:1B4C224:256CF17:6B071AFD |
| html-safe-nonce | 2a6353a4cfdf79670f1104d9f2df12ecac3a605536d934d82431be2462b01576 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzZFOjI2MzZGRjoxQjRDMjI0OjI1NkNGMTc6NkIwNzFBRkQiLCJ2aXNpdG9yX2lkIjoiMTA2NTY4ODcyNzc1NTg4OTQwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 384c565f41617e15251e2dd7e903d4f451d71eaeccfde3e9dc52c2e8c08a5cea |
| hovercard-subject-tag | pull_request:5148242243 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/Lithe-IDEA/lithe-plugin-lua/pull/6/files |
| twitter:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| og:image:alt | 概要 Lua 插件接入结构化日志 v2:插件升到插件 API 2,通过启动模板 ${logDir} 把宿主分配的会话日志目录传给 LuaLS,LuaLS 只保留 warn/error 并写入该目录,不再在用户缓存目录下自建 log/。语言服务生命周期、window/logMessage 和有界 stderr 仍由宿主统一写入 lsp/lua 通道。本插件没有后端,也不使用 SDK。 依赖: ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/Lithe-IDEA/lithe-plugin-lua git https://github.com/Lithe-IDEA/lithe-plugin-lua.git |
| octolytics-dimension-user_id | 340144206 |
| octolytics-dimension-user_login | Lithe-IDEA |
| octolytics-dimension-repository_id | 1415781792 |
| octolytics-dimension-repository_nwo | Lithe-IDEA/lithe-plugin-lua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1415781792 |
| octolytics-dimension-repository_network_root_nwo | Lithe-IDEA/lithe-plugin-lua |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c43783771de038e2c401dd343799000e8d1253 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width