Repository navigation
feat(logging): 接入结构化日志 v2 插件操作事实(由宿主代记) - #5
Merged
Merged
Conversation
- README 新增“诊断日志”一节:说明宿主记录到哪个通道、哪些输出留在控制台、 排障时用什么入口,以及哪些内容不应写入日志 - 注明 Windows 仍为 v1 日志,未声明 Windows v2 验收
This was referenced Nov 4, 2026
xiaoyumuxi
marked this pull request as ready for review
November 4, 2026 10:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Gradle 插件接入结构化日志 v2 的插件操作事实。本插件是纯声明式插件(
buildSystems声明 Gradle 模型导出与依赖树命令来源),没有自己的进程,无法像 SDK 插件那样发送lithe/log。宿主 1lck/Lithe-IDEA#1720 因此替它记录:lithe/build/model与lithe/build/dependencies(与插件后端提供时的请求名相同)写成与 SDK 插件同一组的plugins.operation.finished/plugins.operation.failed,落到plugins/io.github.lithe-idea.gradle-build/host通道。插件清单、启动方式和版本都不需要改;本 PR 在 README 里说明插件会得到哪些事实和失败码。
插件会得到的操作事实
plugins/io.github.lithe-idea.gradle-build/host,与 SDK 插件的lithe/log同一类通道,日志窗口可按插件筛选。lithe/build/model与lithe/build/dependencies(与插件后端提供时的请求名相同)。plugins.operation.finished(INFO,含耗时),条件是命令输出成功解码为模型或依赖树。plugins.operation.failed(ERROR),失败码只取自执行阶段,不解析错误文本:host.planFailed:无法生成命令计划host.executableUnavailable:无法解析 Gradle 或 wrapperhost.launchFailed:进程拉起失败host.timedOut:超时host.commandFailed:命令失败退出host.outputInvalid:输出文件无法解码run通道。README 新增“诊断日志”
run通道。--debug去复制环境、凭据、完整命令行或构建正文;也不把 Gradle User Home、daemon 状态或输出文件迁进日志目录。验证
plugin_operations映射表与相关 macOS 回归)。node scripts/package.mjs,交给 CI。预期的 CI 状态与合并顺序
preview之后再合并,避免 README 描述的行为先于宿主出现。限制
配套 PR: