Conversation
.Build 决定的是**插件作者编译时看到的那份契约**,所以它属于契约仓库。在这里它用 ProjectReference 引契约,与契约同版本、同一次发布 ——「.Build 引用的是哪一版 SDK」 这个跨仓库旋钮,连同它漂移的可能,一并消失。 一并新增 src/VelaShell.PluginSdk.Packer:.vpx 打包器,IsPackable=false,只以构建产物的 形式随 .Build 包的 tools/ 分发。它没有绕道 velashell-plugin-cli —— .vpx 的定义 (VpxContainer)与清单规则(PluginManifestReader)本来就在 VelaShell.PluginSdk 里, vela-plugin 只是它的另一个调用方。于是"打包器与契约同版本"是构建出来的事实,不是约定。 刻意做成独立进程而不是 MSBuild 任务:VS 的 MSBuild 跑在 .NET Framework 上,而本仓库是 net11.0,<UsingTask> 会让插件作者在 VS 里每次生成都失败(清单校验是 AfterTargets="Build")。 - Avalonia 版本锁核对改读同仓库的 $(VelaAvaloniaVersion),少一跳;宿主那一侧照旧走包里的 buildTransitive props,不受影响 - CI / release 的 pack 列表加上 .Build,各加一步端到端冒烟 - scripts/Invoke-Smoke.ps1 与 tests/smoke/ 随之搬来。冒烟用的打包器从**刚打出的包**里取, 顺带核对"打包器真的进了包" 验证:dotnet test 50 通过;端到端冒烟通过;.Build 包依赖只剩同版本 VelaShell.PluginSdk 与 Avalonia [12.1.2];pack --key 签出的包 vela-plugin verify 读得回来(两套实现格式互通); 故意让 VelaAvaloniaVersion 漂移,VELA1006 如期报错。⚠️ 发版前须在 nuget.org 为 VelaShell.PluginSdk.Build 重建一条可信发布策略 —— 现有那条 指向 velashell-plugin-cli,不重建的话推到第三个包时会被拒,而前两个已经推上去了。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GuPc3rAEeVHYfnicxv4p7y
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.
VelaShell.PluginSdk.Build决定的是插件作者编译时看到的那份契约,所以它属于契约仓库 —— 它应该和 SDK 一起发版。这个 PR 把它(以及.vpx打包器)搬了过来。配套 PR:VelaShellLabs/velashell-plugin-cli#17(那边删掉
.Build,只留vela-plugin单独发版)。搬来了什么
src/VelaShell.PluginSdk.Build/PackageReference换成ProjectReferencesrc/VelaShell.PluginSdk.Packer/.vpx打包器,IsPackable=false—— 只以构建产物的形式随.Build包的tools/分发scripts/Invoke-Smoke.ps1+tests/smoke/.vpx→ 读回容器本仓库现在一次发布产出三个同版本的包:
VelaShell.PluginSdk/.Testing/.Build。两个设计决定
.Build用ProjectReference引契约。 于是它发给插件工程的那份契约,就是本仓库这一版 ——「.Build引用的是哪一版 SDK」这个旋钮,连同它漂移的可能,一并消失。打出来的 nuspec 依赖是VelaShell.PluginSdk <同版本>,include资产元数据与搬迁前逐字一致。打包器做进本仓库,而不是继续引用
vela-plugin。 中途试过后者(.Build引用 CLI 的已发布包,只取tools/下的载荷),能跑,但换来一个要人盯着的跨仓库版本旋钮。而.vpx的定义 ——VpxContainer与PluginManifestReader—— 本来就在VelaShell.PluginSdk里,vela-plugin也只是它的另一个调用方。现在"打包器与契约同版本"是构建出来的事实,不是版本号约定,两个仓库之间没有任何依赖。打包器刻意是独立进程而不是 MSBuild 任务:VS 的 MSBuild 跑在 .NET Framework 上,而本仓库是 net11.0,
<UsingTask>会让插件作者在 VS 里每次生成都失败(清单校验是AfterTargets="Build"的)。dotnet exec与调用方的 MSBuild 是哪种运行时无关。其它
$(VelaAvaloniaVersion),少一跳。宿主那一侧照旧走包里的buildTransitiveprops,不受影响.Build,各加一步端到端冒烟。冒烟用的打包器从刚打出的包里取,顺带核对"打包器真的进了包"验证
dotnet test-t:PackVpx→ 读回容器 → 查共享程序集泄漏).Build包内容tools/net11.0/是新打包器;依赖只剩VelaShell.PluginSdk(同版本)+Avalonia [12.1.2]pack -k key.pem签出的包交给vela-plugin verifyVelaAvaloniaVersion漂移VELA1006如期报错在 nuget.org 为
VelaShell.PluginSdk.Build重建一条可信发布策略(Repository 填velashell-plugin-sdk,Workflow 填release.yml)。现有那条指向velashell-plugin-cli—— 不重建的话,发版推到第三个包时会被拒,而前两个已经推上去了。另:
.Build在 nuget.org 上最新是 2.0.2,而VelaShell.PluginSdk已发到 2.0.4,所以下一次发版(≥2.0.5)会让.Build的版本号跳一段。单调递增,没问题,只是发布记录上会有个缺口。velashell-docs 还没动 —— 按 AGENTS.md 的约定那是单独一个 PR,
zh|en各 7 篇会说错话。🤖 Generated with Claude Code
https://claude.ai/code/session_01GuPc3rAEeVHYfnicxv4p7y