[Feature] 将 Go 侧插件清单贡献段投影与排序迁入 Rust Core,替换 pluginservice 与 installedPluginFacts 的重复解码
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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,确认没有重复建议。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 3h 48m
- Merged PRs (30d)
- 571
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
review: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
1lck/Lithe-IDEA#2432 ·
Maintainers usually reply within 1 day
-
review: medium
Difficulty 1/5 Under an hour Newbie friendliness 82/100
1lck/Lithe-IDEA#2431 ·
Maintainers usually reply within 1 day
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#2376 ·
Maintainers usually reply within 1 day
-
area:ui enhancement P2 platform:cross-platform refactor review: high
Difficulty 1/5 Under an hour Newbie friendliness 84/100
1lck/Lithe-IDEA#2365 ·
Maintainers usually reply within 1 day
-
review: medium
Difficulty 3/5 1-2 days Newbie friendliness 57/100
1lck/Lithe-IDEA#2434 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
rel: fix
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Deltares/fews-web-oc#2400 ·
Maintainers usually reply within 1 day
-
Command bar: Tab-to-search on claude.ai falls back to Google site: search instead of opening a prompt on ClaudePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ardia-browser/ardia#4426 ·
Maintainers usually reply within 1 day
-
Bug report: isValidISODateDashOnly accepts text before or after the date-timePossibly taken @bardrop claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
pnp/cli-microsoft365#7713 ·
Maintainers usually reply within 1 day
-
Diagram: Journey Type: Bug / Error
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mermaid-js/mermaid-v13#1293 ·
Maintainers usually reply within 1 day