Repository navigation
feat(plugins): Go 与 PHP Support 迁移为 Lithe Store 社区插件 - #1357
Merged
Merged
Conversation
Go Support and PHP Support leave the official plugin set and continue as community plugins io.github.lithe-idea.go-support and io.github.lithe-idea.php-support in their own repositories, listed in Lithe Store from 0.1.0. - OfficialPluginCatalog keeps the retired dev.lithe IDs with their publisherPackage signature requirement and records the community replacement; publishedEntries hides them from official entry points. - The marketplace gives retired IDs no official source, listing or update, even from a stale cached official index; uninstall stays available. - Plugin Management shows a "moved to the community" notice naming the replacement ID and asks the user to uninstall first. - The official index and release config are empty; the release flow is kept and tested with a synthetic plugin. - Remove the Intelephense download/assembly script and its worktree resource; the community PHP plugin uses the user's own Intelephense because its licence forbids redistribution. - Retired manifests move to test fixtures; docs, contracts, feature matrix and Agent Notes updated.
xiaoyumuxi
marked this pull request as ready for review
October 20, 2026 02:06
Lithe Review结论: ❓ 信息不足 Scope Check
Suggestions
Summary当前材料只足以确认 PR 的报告范围、摘要和所提供的验证结果,无法审查实现细节。因此结论为信息不足,不据此判断通过或提出代码缺陷。 Verification
|
xiaoyumuxi
commented
Oct 20, 2026
xiaoyumuxi
left a comment
Collaborator
Author
There was a problem hiding this comment.
整体迁移方向合理:保留旧官方 ID 的 publisher 签名约束,并通过新社区 ID 进行显式迁移,避免了信任模型的静默降级。
不过当前迁移路径还存在启用状态继承和卸载时序两个问题,建议合并前修复(详见行内 P1/P2 评论)。此外:
- [P3]
MacRuntimeToolDiscovery.swift的 PHP 语言服务器恢复提示仍提到插件内置 Intelephense / 重新安装插件;社区版已经改为用户自行安装intelephense,建议更新为npm install -g intelephense等正确操作。 - 建议补一条真实迁移链路的回归测试:旧官方 Go/PHP 已启用 → 卸载并重启 → 安装社区版并重启 → 检查模块启用状态及 LSP / Run / Test 是否可用。当前的 marketplace 测试主要验证索引过滤与来源/更新状态,还没有覆盖这个生命周期。
本 Review 为源码静态检查,未运行真机迁移测试。
- Uninstalling an enabled plugin no longer persists its modules as disabled, so the community replacement installs enabled; explicit "off" is kept. - Marketplace blocks installing the community Go/PHP package while the retired official package is still on disk and explains the order. - Add an IDEA-style "Restart Lithe" button (management banner, detail, marketplace, LSP control center) that quits through the normal confirmations and relaunches via a bounded detached helper. - LSP control center guides migrated languages to Lithe Store again. - Intelephense missing-tool guidance explains npm install and the licence. - Drop the stale LitheGoSupportModuleTests skip from macOS CI.
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.
概要
macOS 的 Go Support 和 PHP Support 不再是官方插件,改为 Lithe Store 社区插件:
dev.lithe.plugin.go-supportio.github.lithe-idea.go-support0.1.0dev.lithe.plugin.php-supportio.github.lithe-idea.php-support0.1.0收录到商店的 PR:Lithe-IDEA/Lithe-store#14 。Windows 的
Plugins/win/Official/PhpSupport是另一种 Worker 包格式,这次没有改动。功能点
宿主(macOS)
OfficialPluginCatalog(BuiltInModuleCatalog.swift):新增Distribution.migratedToCommunity(PluginID)和Entry.communityReplacementID。Go/PHP 条目仍保留publisherPackage签名要求,所以已安装的旧包照样要验签,第三方也不能用旧 ID 发布未签名的包冒充。新增publishedEntries,把已迁移的条目过滤掉。LSPControlCenterView:官方插件入口和提示改用publishedEntries,不再引导用户安装旧的 Go/PHP 包。PluginMarketplace:已迁移的 ID 没有官方来源(installedSourceID返回 nil),也不显示更新;rebuildListings跳过这些 ID,客户端缓存里还留着旧官方索引时也不会列出。卸载照常可用。PluginManagementView:已安装旧包时显示“已迁移到社区插件”提示(图标arrow.triangle.branch),写明新的社区 ID,引导用户先卸载再从插件市场安装社区版。新旧包声明同一种语言,同时安装时社区包会因语言冲突被拒绝,所以必须先卸载旧包。Go/PHP 的官方简介改为“已退役,见 Lithe Store”。zh-Hans本地化:新增迁移提示和新简介的翻译,删除旧简介的 key。官方插件发布与构建
Plugins/marketplace/official-plugins.json、index.json改为空列表。发布流程本身保留,留给以后的官方插件。scripts/official-plugin-releases.mjs:抽出readPackageManifest,plan/check支持注入 manifest 读取函数;测试改用合成的dev.lithe.plugin.sample-support,并断言当前仓库配置为空。scripts/prepare-php-language-server.sh,以及build-official-plugins.sh里的language-server.json钩子;Plugins/mac/Official/PhpSupport/language-server.json一并删除。verify-official-plugins.sh:必需插件只剩 Java,删掉 Intelephense 相关检查。verify-macos-package.sh仍然检查应用包里不含旧的 Go/PHP ID,只更新了注释。worktree-resources.json:删除php-language-server-downloads,更新official-plugin-packages的路径和身份说明;test-reuse-worktree-resources.mjs同步修改。PHP 不再打包 Intelephense:Intelephense 许可证第 5(c) 条禁止再分发,所以社区版改为通过
systemCommand启动用户自己安装的intelephense --stdio,并保留runtimeDependencies: node。测试
plugin.json移到macos/Tests/LitheTests/Fixtures/RetiredOfficialPlugins/;DeclarativePluginTestSupport.officialPackageURL把它们映射到这个目录。officialPluginMovedToTheCommunityHasNoOfficialSource:缓存的官方索引里还有旧 PHP 条目时,市场列表不显示它,没有官方来源、没有更新,可以卸载。PluginManagerTests:断言publishedEntries == [java]、替代 ID,以及 Go/PHP 仍是publisherPackage。declarative_plugins.rs:删除对已移走的官方 Go/PHP manifest 的include_str!。共享契约 fixture(dev.lithe.fixture.*)不变。文档 / 契约 / 矩阵 / Agent Notes
Plugins/mac/README.md、docs/ci-builds.md、shared/contracts/application-boundary.md更新为社区插件的说法。go-support-plugin、php-optional-plugin、php-run-test、plugin-marketplace:证据路径指向迁移后的文件,验证步骤改为“从 Lithe Store 安装社区版,旧包显示迁移提示”。2026-10-20-go-php-community-plugins.md(迁移决策、备选方案、代价);PHP 归属、LSP 插件构建、声明式插件、插件市场四篇 Note 同步更新,并修正其中失效的路径。本地验证
test-stability-macos.sh -- --filter 'PluginMarketplace|PluginManager|PluginManagementPresentation|PluginPackageStore|MacPluginPackageDownloader|LanguageToolEnvironment|PluginLanguageServerLaunchResolver|LanguageExtensionProcessLifecycle|PluginDiskInstallation|ModuleRuntime':153 个测试全部通过cargo test --lib -- declarative_plugins marketplace_plugins plugins:52 个通过node --test scripts/official-plugin-releases.test.mjs(6/6)、node scripts/test-reuse-worktree-resources.mjs(18/18)、node scripts/test-official-plugin-distribution.mjs./scripts/verify-shared-contracts.sh、./scripts/verify-agent-notes.sh、./scripts/verify-platform-feature-matrix.sh、./scripts/verify-platform-feature-matrix-change.sh origin/preview HEAD./scripts/verify-runtime-bundle-immutability.sh评审后修复(633d4c108)
enabled=false写进存储,导致之后安装社区版时继承到禁用状态。现在卸载只保留用户明确关闭过的模块状态,其余模块的启用记录会被清除,社区版装好后默认启用。新增测试uninstallingAnEnabledPluginLetsItsReplacementStartEnabled和uninstallKeepsAnExplicitlyDisabledModuleOff。blockedByRetiredPlugin)。/bin/sh辅助进程等待旧进程结束(最多 30 秒),再用open打开同一个 bundle,不会多开实例。相关代码在MacApplicationRelauncher和ApplicationRestartAction。npm install -g intelephense安装,并解释不随插件分发是因为许可证限制。LitheGoSupportModuleTests。上一轮 Plugin CI 失败是冷缓存下 “Build Swift tests” 超过 20 分钟时限(编译进度 1414/1416),不是测试失败。go-support-plugin、php-optional-plugin、plugin-marketplace)已同步更新验证步骤和证据文件。