Repository navigation
fix(desktop): 没有运行配置时说明原因,“编辑运行配置…”不再无反应 - #2102
Merged
Merged
Conversation
…lent Edit Configuration (#2028) Edit Configuration… opened the Run window and an editor only when the title bar had a configuration, so on a project without one the press showed nothing. Once the configurations are read and none is listed it now posts a notice saying that build plugins generate them and none declared a runnable entry for the project. Saved configurations that no build plugin starts (user entries of another provider, and overrides Core reports as orphanedOverride, such as the java.main entries an earlier version generated) were dropped without a trace. The list counts them; the menu and the notice say how many are hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd its notice (#2028) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…preparation Dependency and test requests to a build provider carry the build executable the host resolves (tool.executable), but run and debug preparation did not, so a provider that builds before launching could not use the user's Maven wrapper or configured executable. Both now add the hint; when nothing resolves the request goes without it and the reason is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 tasks done
Owner
Author
|
Maven 插件侧的配套改动:Lithe-IDEA/lithe-plugin-maven#28(导出可运行的 target、声明 provider |
This was referenced Nov 17, 2026
…and preparation output
Found by running a real Spring Boot project through a build plugin whose
provider process only prepares runs:
- Dependencies follow the dependency declaration's source, not whether the
system declares a provider. A provider system's command that writes its
tree to a file got no output file, which Core refused ("pass outputFile").
- The settings source editor loads the model through the same buildModel
helper as the Build window, by the model's source; it asked the provider
process, which serves no model.
- A run without a name is named after its target, as the contract's
run.name says; the host defaulted the name to the run ID, so every
configuration read "spring-boot ShopApplication".
- Run preparation forwards the provider's progress to the run's console and
status, through the loop provider tasks already used; a compile error the
provider printed before failing never reached the user.
Refs #2074
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 17, 2026 12:52
1lck
added a commit
to Lithe-IDEA/lithe-plugin-maven
that referenced
this pull request
Nov 17, 2026
…ost that supports it - TestOfficialMavenPluginRunsASpringBootApplication installs the Maven and Java Support archives, saves JVM/program arguments and an environment variable in the run configuration editor, runs ShopApplication, checks /hello and the console, then stops it. - The archive helper wires the tool resolvers like the app and can install several plugins into one service; run console output is read from the operation's session. - lithe-host.json pins 75edb9674 (1lck/Lithe-IDEA#2102) and requires LITHE_TEST_JAVA_PLUGIN_ARCHIVE. - README and feature matrix: debugging waits for host support (1lck/Lithe-IDEA#2107). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
added a commit
to Lithe-IDEA/lithe-plugin-maven
that referenced
this pull request
Nov 17, 2026
* feat(extension): export runnable applications and run classpaths The model now lists Spring Boot applications (@SpringBootApplication classes, or spring-boot-maven-plugin) and applications whose main class exec-maven-plugin or the jar manifest names as targets tagged spring-boot / java-application with a mainClass property. Reading stays compile-free: only source heads and POM configuration are read, within fixed bounds. With -Dlithe.runOutput and -Dlithe.runProject the extension writes, after the build, the project's runtime classpath (output folder plus compile, runtime and system dependencies, reactor siblings from their output folders) and the compiled classes with a main method, marking the @SpringBootApplication ones. A failed build writes nothing. Refs 1lck/Lithe-IDEA#2074 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(maven): run and debug applications through a build provider plugin.json declares a build provider process (lib/lithe-maven-provider.jar, built with the vendored Java SDK for Java 8) and two provider runs: spring-boot (service, debuggable through a registry java adapter) and application. prepareRun compiles the project with -pl -am process-classes using the Maven Lithe resolved (or mvnw, MAVEN_HOME, PATH), reads the run document the extension wrote and returns java -cp <classpath> <main class> on the project's JDK. Long classpaths go into a manifest-only jar under target/lithe-run/. A debug request adds a suspending JDWP agent on the host's port. Refs 1lck/Lithe-IDEA#2074 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: prepare, launch and debug runs of the fixture reactor; document runs The fixture gains a Spring Boot service module (a local stand-in for the annotation, no download) and a jar-manifest main class in app. The integration lane checks the targets, then starts the packaged provider, prepares runs and launches the returned commands, and checks the reactor classpath, main class discovery, debug arguments and a failed build. README and the feature matrix describe the new maven-run-applications capability. Refs 1lck/Lithe-IDEA#2074 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(e2e): run a real Spring Boot reactor through the host; pin the host that supports it - TestOfficialMavenPluginRunsASpringBootApplication installs the Maven and Java Support archives, saves JVM/program arguments and an environment variable in the run configuration editor, runs ShopApplication, checks /hello and the console, then stops it. - The archive helper wires the tool resolvers like the app and can install several plugins into one service; run console output is read from the operation's session. - lithe-host.json pins 75edb9674 (1lck/Lithe-IDEA#2102) and requires LITHE_TEST_JAVA_PLUGIN_ARCHIVE. - README and feature matrix: debugging waits for host support (1lck/Lithe-IDEA#2107). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(provider): find a bare Maven command on PATH, with PATHEXT on Windows Java starts a command without a directory through the operating system, which on Windows finds only .exe files, so `mvn` (mvn.cmd there) failed to start and the preparation ended as "The plugin backend failed unexpectedly". The provider now resolves such a name on the PATH of the build environment, trying each PATHEXT extension on Windows, and reports maven.run.noMaven when nothing matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
22 of 28 tasks
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 / Linked issue
run,由 Maven 插件仓库跟进,见“不在本 PR 范围内”)PR 类型 / Type
改动说明 / What changes
背景 / Why
项目没有运行配置时(例如 Maven 插件还没有声明运行项的 Spring Boot 项目),点标题栏下拉底部的“编辑运行配置…”没有任何可见反应。另外,旧版保存在
.lithe/run/local.json的java.main、spring-boot.maven等配置被直接过滤,界面上看不出有配置被隐藏,也看不出原因。改动 / Changes
desktop/internal/workbench/title_run.goeditRunConfigurations:配置已经读完、列表为空、读取也没有失败时,不再打开空的运行窗口,改为发一条提示:运行配置由构建插件根据项目模型生成,当前启用的构建插件没有为这个项目声明可运行的入口。有被隐藏的已保存配置时,提示里写明条数。构建模型读取失败时提示失败原因。列表不为空、正在读取或读取失败时,行为和以前一样。noRunConfigurationsNotice、hiddenRunConfigurations。desktop/internal/workbench/runconfig.go:runConfigState新增hidden,统计没有进入列表的已保存配置,两类:extensions.build)的配置,例如user:开头、provider 是spring-boot.maven的条目;orphanedOverride的条目,例如旧版生成的java.main:…覆盖项。现在的 Core 已不再生成这些配置,它们在解析阶段就被丢掉了。desktop/internal/workbench/title_run_view.go:下拉显示“没有运行配置”时,如果hidden > 0,下面再显示一行不可点的“已隐藏 N 条无法运行的已保存配置”。desktop.title.nothingToEdit、desktop.title.nothingToEditHidden、desktop.title.hiddenRunConfigurations三条中英词条,并提交生成结果。desktop/internal/workbench/build.go:运行和调试构建插件提供的目标时,宿主现在把已经解析出的构建工具路径作为tool.executable发给提供者的lithe/build/prepareRun/prepareDebug。这条提示是契约里的可选字段,以前没有发送,提供者只能自己再查找一遍 Maven(会绕过用户在设置里指定的 Maven executable)。新增addBuildToolHint,运行和调试两条路径都调用;解析失败时记一条build_run_tool后台失败日志,不带提示继续,由提供者自己查找,不会因此挡住运行。顺带把resolveBuildExecutable被插开的文档注释放回原位。viva-title-run-debug:能力描述和验证动作补上空列表的提示和隐藏条数。title_run_test.go新增三个用例;build_command_record_test.go新增TestBuildRunPreparationCarriesTheResolvedTool:PATH 上有构建工具时请求带上它的路径,没有时不带提示;新增无头截图用例title_run_empty_visual_test.go(vivahead 标签)。docs/assets/run-config-empty/。用真实 Maven 插件实测后补的 4 个宿主缺陷(提交 8f690d0)
用 Maven 插件 PR(Lithe-IDEA/lithe-plugin-maven#28)的发行包加上 Java Support 4.0.1 发行包,在真实 Spring Boot 双模块工程上跑端到端测试,发现宿主有 4 处跟契约不一致,都已修复:
pluginservice/builds.go、workbench/build_dependencies.go):声明了provider进程、但依赖树用command读取的构建系统,宿主以前按“有没有 provider”决定走哪条路,走了提供者路径,Core 报This command writes to a file; pass outputFile.。现在解析清单里的dependencies.source,由它决定路径;BuildDependenciesDeclaration新增Source。提供者路径拿到命令计划时返回明确错误。workbench/build.go、settings_plugin_sources.go):设置页的构建源编辑器对command模型也去问提供者。新增buildModel统一按ModelSource分派,loadBuildModelWith和设置页共用。pluginservice/builds.go、runconfig.go、build_tree.go、build_menus.go):契约规定run.name缺省时条目以目标命名,宿主以前把缺省名填成 run ID,界面显示成spring-boot ShopApplication。现在不再填默认值,新增EntryName/ActionName。workbench/build.go):lithe/build/prepareRun期间提供者推送的编译输出和进度以前被丢掉,编译失败时控制台是空的。新增awaitProviderOperation,转发输出和状态后再等待结果,runProviderOperation和运行准备共用。另外合并了最新
main(Core 固定版本随之升到cf2f26095bb352f69d248f840dd7d6126747482e),没有冲突。不在本 PR 范围内 / Out of scope
run并实现lithe/build/prepareRun。本 PR 修好了宿主这一侧,两边合在一起已经端到端实测通过(见“验证”)。launchOptions.debug,但 Viva 宿主的 provider 运行还没有接上,已建 [Feature] 构建提供者的服务运行支持按配置类型连接调试(Spring Boot 运行配置可直接点调试) #2107 跟进。extensions.build所需的项目、目标等字段,没法无损转成构建插件的运行配置,所以本 PR 只把它们显示出来,不改写用户文件。类型专属:fix
复现与根因
run的项目(测试里用合成构建实例,System.Runs = nil),等配置读完,点标题栏下拉的“编辑运行配置…”。实际结果:只调用openToolWindow(itemRun);运行窗口在列表为空时什么也不画,titleConfiguration()为 nil,所以也不打开编辑器,看起来就是没有反应。期望结果:说明为什么没有可编辑的配置。editRunConfigurations在 42d6fb9(feat(desktop): #1794 标题栏运行/调试接入,调试工具窗口按 IntelliJ IDEA 布局重做 #1837,标题栏运行/调试接入)引入,没有处理“列表为空”的情况;finishRunConfigurations过滤非构建插件配置时只删除、不计数;旧版生成的覆盖项又在 Core resolve 中作为orphanedOverride诊断返回,桌面端没有读取。检查项
desktop/internal/workbench/title_run_test.go的TestEditRunConfigurationsWithoutAnyExplainsWhy和TestEditRunConfigurationsCountsTheConfigurationsNoBuildPluginStarts。临时去掉新加的提示分支后,两个用例都失败,输出notice = "", want "这个项目没有可编辑的运行配置。…";恢复后通过。TestEditRunConfigurationsOpensTheChosenOnesEditor确认有配置时仍然打开运行窗口和编辑器。editRunConfigurations只有标题栏菜单一个调用方;BuildPlanRequest.Tool已经存在、Core 原样转发给提供者,只是宿主以前不填;runConfigState新增字段,不改已有字段;orphanedOverride只读取 Core 已有的诊断,不改契约TestWSLScriptStartsTheLoginShellInTheStartFolder/bash偶发超时,单独跑 3/3 通过)TestBuildProviderSystemReadsItsTreeWithAFileCommand(修复前报pass outputFile)、TestProviderRunPreparationShowsItsBuildOutput(修复前控制台为空)、TestBuildProviderSystemReadsItsModelWithItsCommand、TestParseBuildSystemsKeepsDependencySourceAndUnnamedRuns.agents/notes/implemented/bug-fix/记录:只补了空状态提示,没有改变行为约束范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/viva-title-run-debug.json,两端验证状态仍为pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(validated 197 platform capabilities)和verify-platform-feature-matrix-change.sh origin/main HEAD(passed).artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空dev.example.engine,local.json里写的java.main、spring-boot.maven只是 provider 字符串,用来模拟旧版保存的数据,没有读取任何插件shared/i18n/UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=<dir> scripts/desktop/desktop-go.sh test -tags vivahead ./internal/workbench/ -run TestVisualTitleRunWithoutConfigurations -count=1,提交904e1d9160f4dadf595ffcbb95c29dbeef99cdeb,1280×800,scale 1;场景:亮色/中文、暗色/英文,各截下拉菜单和点击“编辑运行配置…”之后的画面统一日志系统 / Structured logging
p.build.failed,失败日志由原处理边界记录。awaitProviderOperation),失败仍由原处理边界记录,没有新增日志事件。addBuildToolHint用backgroundFailedIn(ctx, "build_run_tool", err)记一条后台失败日志(沿用运行请求的上下文和插件字段),然后不带提示继续。界面文案 / i18n
generate-i18n.mjs并提交生成结果node scripts/i18n/verify-app-language-localization.mjs(passed)和node scripts/i18n/generate-i18n.mjs --check(passed)逻辑归属 / Logic placement
extensions.build,以及orphanedOverride诊断),平台层只计数并呈现性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或定时器;计数只在配置读完时遍历一次已有列表。
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
N/A:没有改契约、能力版本或宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源。
无用代码与重构 / Dead code and refactoring
refactor标签的 Issue:本次没有发现验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/workbench/ ./internal/i18n/ -count=1scripts/desktop/desktop-go.sh test ./internal/workbench/ -run 'TestBuildRunPreparationCarriesTheResolvedTool|TestEditRunConfigurations|BuildCommand|PrepareRun|Debug.*Provider' -count=1(工具提示提交之后重跑)scripts/desktop/desktop-go.sh vet ./internal/workbench/、gofmt -lplugin.json(pluginhost.Validate+Declared(),临时测试,未提交)scripts/desktop/desktop-go.sh test -tags vivahead ./internal/workbench/ -run TestVisualTitleRunWithoutConfigurationsnode scripts/i18n/generate-i18n.mjs --check、verify-app-language-localization.mjsscripts/desktop/desktop-go.sh test ./...(8f690d04a)test ./internal/workbench/ ./internal/pluginservice/ ./internal/i18n/ ./internal/core/ ./internal/buildprovider/TestOfficialMavenPluginBuildsAReactor、TestOfficialMavenPluginRunsASpringBootApplication(真实 mvn、Spring Boot 3.5.13 双模块工程、Java Support 4.0.1 发行包)ShopApplication;编辑器保存的 JVM 参数、程序参数、环境变量都进入了进程,/hello返回Hello, Lithe from eu-west;控制台有反应堆编译和 Tomcat 启动输出;停止后端口释放;插件包未被改写;测试结束后没有 java / Lithe 进程残留。测试文件只是临时复制进来,跑完已删除未能执行的检查和原因: 没有在 Windows 虚拟机和 macOS 原生窗口里交互验收;改动在共用的 Viva 代码里,不涉及平台适配,功能矩阵验证状态保持 pending。
提交前确认 / Final checks
main创建;目标分支main🤖 Generated with Claude Code