Repository navigation
build: publish the packer as a dotnet tool - #17
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d7ce1369c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| EOF | ||
| dotnet tool install --tool-path "$out/bin" --configfile "$out/NuGet.config" \ | ||
| Hosihikari.Plugin.Pack --version 1.0.0 | ||
| "$out/bin/hosihikari-pack" --help |
There was a problem hiding this comment.
Use a smoke command that exits successfully
Even when packaging and installation succeed, this new step fails: tools/Pack/Program.cs has no special handling for --help, so the single argument enters if (args.Length < 3) and executes return 2 (lines 33–40). With set -euo pipefail enabled in this workflow step, that exit code fails the assertions job and skips the subsequent Testing and archive checks on every run. Add successful help handling or invoke a valid packaging operation for the smoke test.
Useful? React with 👍 / 👎.
ManifestReader 只认 hosihikari.json:缺文件时若同目录有旧信封就报 「旧包,跑 hosihikari-pack migrate」,扫描时按信封 type 判断是不是我们 的路由对象,父级自己的 mod 不吭声。apiVersion 与 schemaVersion 走新 字段,kind 取顶层。 打包器把作者清单原样进包,另外按清单生成最小信封 manifest.json (name/type/entry/version/hosihikari 依赖,有则带展示字段)。新增 migrate 子命令:读 manifest.json、写 hosihikari.json、删旧文件、列出 要人工补的 pack 与 carrier 字段。kind 为 carrier 时校验组件程序集与 类型存在且实现 ICarrierComponent。 Build 包的缺省 apiVersion 抬到 3,生成清单改新格式,包版本 1.2.0; smoke 的示例插件改新钩子签名与新清单,并断言 dist 清单的 apiVersion 是 3。夹具与宿主断言、Testing 的包辅助、三个回归用例一并换新格式, 新增旧包拒载、carrier 组校验与 migrate 三条断言。 普通包不再拿到 ILoaderContext(上下文按 kind 分型):加载失败时绕过 了钩子线程等待,OnLoad 超时被误记成 30 秒的问题随之消失。 Refs #17 #29 #28
信封里的 description 与 author 是从清单单向派生的展示副本:有则写、 无则省,作者不为它再手写一份(ADR-0058)。补一条断言把两个方向都 钉住。 verify.yml 的 ref 注释按 ADR-0059 写明合并顺序(契约 → 核心 → 加载器) 与钉同名分支的来历;DotNetCorePlugins 是外部 fork,不重复注释。 Refs #17
* feat!: 跟进契约 3,异步钩子、统一诊断与 ILoaderContext 最小编译修复,不做语言层适配(ADR-0059)。 - 四处钩子调用改 GetAwaiter().GetResult() 等待 ValueTask:装载、启用/停用、 卸载与回滚清理 - Validate 收 PluginDiagnostic 并取其 Message 进装载报告;ReportFault 同形状 - PluginContext 与 TestPluginContext 改实现 ILoaderContext,普通上下文没有 RegisterLoader 时调用方按接口取 - BaseSharedAssemblyFileNames 跟着契约的基地清单改名,DechareShared 不再追加静态清单 - PluginState 移入契约,删掉本仓那份;EventBus 按六档桶分发,Subscribe 带优先级 - csproj 的契约与模型引用改 3.0.0,夹具清单 api_version 抬到 3 * feat!: 清单换 hosihikari.json,打包器生成信封并提供 migrate ManifestReader 只认 hosihikari.json:缺文件时若同目录有旧信封就报 「旧包,跑 hosihikari-pack migrate」,扫描时按信封 type 判断是不是我们 的路由对象,父级自己的 mod 不吭声。apiVersion 与 schemaVersion 走新 字段,kind 取顶层。 打包器把作者清单原样进包,另外按清单生成最小信封 manifest.json (name/type/entry/version/hosihikari 依赖,有则带展示字段)。新增 migrate 子命令:读 manifest.json、写 hosihikari.json、删旧文件、列出 要人工补的 pack 与 carrier 字段。kind 为 carrier 时校验组件程序集与 类型存在且实现 ICarrierComponent。 Build 包的缺省 apiVersion 抬到 3,生成清单改新格式,包版本 1.2.0; smoke 的示例插件改新钩子签名与新清单,并断言 dist 清单的 apiVersion 是 3。夹具与宿主断言、Testing 的包辅助、三个回归用例一并换新格式, 新增旧包拒载、carrier 组校验与 migrate 三条断言。 普通包不再拿到 ILoaderContext(上下文按 kind 分型):加载失败时绕过 了钩子线程等待,OnLoad 超时被误记成 30 秒的问题随之消失。 Refs #17 #29 #28 * test: 钉住信封的展示字段派生与 CI 合并顺序注释 信封里的 description 与 author 是从清单单向派生的展示副本:有则写、 无则省,作者不为它再手写一份(ADR-0058)。补一条断言把两个方向都 钉住。 verify.yml 的 ref 注释按 ADR-0059 写明合并顺序(契约 → 核心 → 加载器) 与钉同名分支的来历;DotNetCorePlugins 是外部 fork,不重复注释。 Refs #17 * feat: 载体组件阶段与诊断全链结构化 载体组件按清单声明在事件分发开启前启动、停止前倒序停止,受独立的 组件停止超时约束;组件实现类拆到独立文件。ReportFault 全链携带 PluginDiagnostic,Manager_Fault 带错误码,Validate 结果按严重级别呈现。 RPC 回归里 A10 的偶发由钩子投线程引入,宿主断言改为轮询等待。 * feat: 打包器按载体包并入共享层 --carrier 指向已安装的载体包,读它的 carrier.sharedAssemblies 与基地 清单合并后再剔除副本;运行期同一份判定(ADR-0061)。宿主补 A63 钉住 合并与缺失目录的回落。 * feat: 补上 Reload,只在管理器拥有插件集时提供 ADR-0062 已定稿但方法一直没落地。新增 ReloadResult 与 OwnsPluginSet 选项:自持态依次 Disable→Unload→Load→Enable 并逐步回报,父级态返回 不支持并说明所有权在父级。宿主补 A64/A65。 * test: Reload 用专用夹具,A39 卸载对象改为 NativeProbe 重载验收需要一个没有依赖者的包;A39 原先卸载 Bar,而 Lua 依赖它, CI 上按依赖图拒绝卸载。两处都改成指向自己的目标。 * 移除调试日志写入 * MSBuild 冒烟改用本地契约包,去掉脚本 BOM * 去掉重复的超时赋值 * 按审查意见修死锁、上下文越权、组件线程与迁移丢字段 * 启动失败的组件也进回滚,记下同步阻塞的预算边界 * 回滚钩子里的故障也要取账 * 迁移时拆开 1.x 的逗号分隔包列表 * 重复打包不再嵌套输出,并列检出跟目标分支 * 拒绝停用时也取账,迟到故障出锁再卸 * 组件上下文透传载体服务,A10 改成等到达 * 只在输出嵌在源码下时才跳过输出目录 --------- Co-authored-by: 予纾 <[email protected]>
Summary
Hosihikari.Plugin.Packis now aPackAsToolpackage (commandhosihikari-pack, version 1.0.0); its dependencies, including the core, travel in the tool package.Verification
dotnet packproduces the tool package; localdotnet tool installandhosihikari-pack --helpsucceed.pack-plugin.