[Feature] 将 Go 侧插件清单贡献段投影与排序迁入 Rust Core,替换 pluginservice 与 installedPluginFacts 的重复解码
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by running rg -n 'InstalledSnapshot|describeManifest|installedPluginFacts' desktop/internal/pluginservice desktop/internal/workbench to see every Go consumer that decodes plugin.json itself, then read the existing manifest validation/model in Lithe-IDEA/Lithe-core-rust before designing the new read-only catalog DTOs. Check how desktop/internal/core binds Core types and where PINNED_CORE_REVISION is bumped, since contract version, schema and fixtures must move together. Done means the listed methods in builds.go, toolwindows.go, vcs.go, activation.go and workbench/plugins.go consume Core output and the Go-side projection/sort structs are removed. This spans two repositories and is design-heavy, so it is not a starter task.
由索引模型根据 Issue 内容生成。
描述
Problem to solve / 要解决的问题
desktop/internal/pluginservice 中的各贡献段消费者及工作台设置汇总仍直接在平台 Go 层 json.Unmarshal plugin.json 并执行字段投影、默认值填充、过滤与排序(涉及 Go 共用的 macOS/Windows 桌面端;核心契约在 Core)。具体位置(由 rg -n 'InstalledSnapshot|describeManifest|installedPluginFacts' desktop/internal/pluginservice desktop/internal/workbench 核实):
desktop/internal/pluginservice/builds.go:(snapshot InstalledSnapshot) BuildPlugins()desktop/internal/pluginservice/debug.go:(snapshot InstalledSnapshot) DebugPlugins()desktop/internal/pluginservice/generators.go:(snapshot InstalledSnapshot) GeneratorPlugins()desktop/internal/pluginservice/languages.go:(s *Service) LoadLanguagesFromSnapshot(...)desktop/internal/pluginservice/outputlinks.go:(snapshot InstalledSnapshot) OutputLinkSources()desktop/internal/pluginservice/search_languages.go:(snapshot InstalledSnapshot) SearchLanguageSources()desktop/internal/pluginservice/toolchains.go:(snapshot InstalledSnapshot) ToolchainPlugins()desktop/internal/pluginservice/toolcommands.go:(snapshot InstalledSnapshot) ToolCommands()desktop/internal/pluginservice/toolwindows.go:(snapshot InstalledSnapshot) ToolWindows()desktop/internal/pluginservice/vcs.go:(snapshot InstalledSnapshot) VcsPlugins()desktop/internal/pluginservice/activation.go:syncFunctionRelay/activateWorkspacedesktop/internal/workbench/plugins.go:installedPluginFacts/describeManifest
保留它的代价:
- Go 平台层与
lithe-core各自维护一套插件清单贡献字段结构与投影/排序逻辑,新增或调整清单字段时两端容易漂移; - 每个消费者各自反序列化同一份
manifest.json字节并做结构验证/排序,违背“可共享的解析、校验、排序与投影逻辑归属 Rust Core”。
Proposed solution / 建议方案
- 在 Rust Core(
Lithe-IDEA/Lithe-core-rust)复用已有清单校验与模型,提供统一的只读插件贡献/呈现目录查询接口,直接输出结构化的语言、工具窗口、命令、构建系统、VCS、调试器、工具链、输出链接、生成器与插件摘要 DTO。 - 桌面端
desktop/internal/core增加类型化绑定后,让pluginservice上述方法和workbench/plugins.go::installedPluginFacts直接消费 Core 返回的结构化目录,移除 Go 侧重复 JSON 解码结构体与排序规则。 - 风险:需先补齐 Core 契约版本、schema/fixture 和桌面端
PINNED_CORE_REVISION协同升级,因此按 #2058 第 4 项评估结论在独立任务分阶段推进。
Target platform / 目标平台
Cross-platform / 跨平台
Area / 模块
Extensions / 扩展
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
Alternatives considered / 已考虑的替代方案
仅通过 pluginservice.InstalledSnapshot 在 Go 侧共享同一批版本选择和有界读盘结果(已在 #2058 / PR #2339 实现),可以消除重读 I/O 与读取期不一致,但未能消除 Go 侧对清单贡献段的重复结构体解码与投影。
Additional context / 补充信息
源自 Issue #2058 第 4 项“顺带评估清单的贡献段解析是否应由 Core 返回”的评估及 PR #2339 交付后遗留的架构跟进;现有 Core 尚无统一返回这些呈现目录的接口,故单独建单跟踪迁入 Core。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 151
- 平均合并
- 3 小时 48 分钟
- 30 天内合并 PR
- 571
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
1lck/Lithe-IDEA 的其他 Issue
-
review: medium
难度 2/5 1-3 小时 新手友好度 78/100
1lck/Lithe-IDEA#2432 ·
维护者通常 1 天内回复
-
review: medium
难度 1/5 1 小时以内 新手友好度 82/100
1lck/Lithe-IDEA#2431 ·
维护者通常 1 天内回复
-
refactor review: high
难度 2/5 1-3 小时 新手友好度 72/100
1lck/Lithe-IDEA#2376 ·
维护者通常 1 天内回复
-
area:ui enhancement P2 platform:cross-platform refactor review: high
难度 1/5 1 小时以内 新手友好度 84/100
1lck/Lithe-IDEA#2365 ·
维护者通常 1 天内回复
-
review: medium
难度 3/5 1-2 天 新手友好度 57/100
1lck/Lithe-IDEA#2434 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
posit-dev/positron-sas-extension#196 ·
维护者通常 1 天内回复
-
bug composer
难度 2/5 1-3 小时 新手友好度 82/100
inmanta/web-console#8037 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
bug: v5 dist/types/components.d.ts imports @stencil/core/runtime instead of ./stencil-public-runtime未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复