Repository navigation
feat(build-providers): buildProviders 1 按源文件找运行入口(当前文件运行) - #89
Merged
Merged
Conversation
Refs 1lck/Lithe-IDEA#2104 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 18, 2026 03:11
This was referenced Nov 18, 2026
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.
关联 Issue
类型
feat:
buildProviders1 新增入口运行和lithe/build/runEntrypoints,litheBuild升到 1;新增宿主命令build.runEntrypointsPlan/build.decodeRunEntrypoints改动
插件声明
entrypoints: true的运行后,宿主可以把一个源文件交给插件,插件回答文件里能启动的入口(例如带 main 方法的类),宿主把入口存成运行配置并运行。宿主和 Core 不按语言判断入口。manifest/run.rs:RunDeclaration.entrypoints。入口运行必须source=provider、execution=application,不能有fromTargets、fromTasks、参数、扩展或调试。plugin-manifest/validation.rs:声明入口运行要求requires.buildProviders >= 1。plugin-model/capabilities.rs:buildProviders支持[0, 1]。plugin-manifest.schema.json:entrypoints属性及约束。run_entrypoints.rs、commands.rs、command.rs、dispatcher/build.rs)build.runEntrypointsPlan:请求带file(工作区相对路径,必须在实例根目录内),不接受project/outputFile;规划lithe/build/runEntrypoints,解码器litheRunEntrypoints。build.decodeRunEntrypoints:校验{format:"litheRunEntrypoints", version:0, entrypoints:[{run,name,entrypoint,project}]},最多 64 项;运行必须是入口运行,名称 1–256 字节无控制字符,入口 1–4096 字节无 NUL,项目在根目录内;按插件顺序去重,答案不合法时整份拒绝。run_preparation.rs):prepareRunPlan的target改为可选。入口运行必须不带目标、带launchOptions.entrypoint;目标运行仍要求目标和标签匹配。execution/configuration)BuildProviderRunReference.targetID可为空(入口运行),projectID仍必填。runConfig.createUserConfiguration接受entrypoint,写进extensions.build-run.entrypoint,入口参与身份判断:同一入口复用,不同入口各一条。lsp-client/build_provider.rs):litheBuild提供[0, 1];lithe/build/runEntrypoints属于构建方法。Protocol.BUILD_RUN_ENTRYPOINTS、Backend.onRunEntrypoints、格式litheRunEntrypoints,按宿主提供的版本协商最新的一个(BUILD_VERSION = 1)。protocol.mjs、backend.mjs、index.d.ts同步。buildProviders1)” 一节;rust-core-api.md命令表与详细说明;capabilities-and-versions.md、domains/build-providers.md、protocol-changelog.md(buildProviders1、litheBuild1);fixturebuild-provider-run-entrypoints.plugin.json、build-run-entrypoints.json。旧宿主只声明
buildProviders 0,不会安装声明入口运行的插件版本;旧插件不受影响。验证
cargo test -p lithe-core provider_run_entrypoints_are_found_by_file_and_start_without_a_target(规划、解码拒绝、无目标准备运行)cargo test -p lithe-core entrypoint_runs_are_saved_per_entrypoint_without_a_target(按入口保存、复用、启动选项)cargo test --workspace(含 lsp-engine 协商litheBuild [0, 1]的测试更新)cargo clippy --workspace --all-targets -- -D warnings、cargo fmt --checknode shared/plugins/scripts/verify-docs.mjs、node shared/plugins/scripts/sdk-e2e.mjsnpm test、Java SDKmvn testTestRunOnCurrentFileStartsTheEntrypointAndSavesItsConfiguration;Maven 插件用本分支的 Java SDK 跑通真实 Maven 的入口查找和入口运行检查。🤖 Generated with Claude Code