test(windows): cover Maven Run toolchain overrides and inheritance - #940
Conversation
…t-maven-configuration-in-settings # Conflicts: # windows/tauri/src/features/maven/components/maven-pane.tsx # windows/tauri/src/features/maven/stores/maven.store.test.ts # windows/tauri/src/features/maven/stores/maven.store.ts # windows/tauri/src/features/run/components/run-configuration-editor.tsx # windows/tauri/src/features/run/stores/run.store.ts # windows/tauri/src/features/settings/components/settings-dialog.tsx # windows/tauri/src/i18n/locale.ts
…t-maven-configuration-in-settings # Conflicts: # docs/development/platform-parity-matrix.md # windows/tauri/src-tauri/src/maven.rs # windows/tauri/src/features/maven/stores/maven.store.ts
…t-maven-configuration-in-settings
….com/JayF211/Lithe-IDEA into feat-maven-configuration-in-settings
….com/JayF211/Lithe-IDEA into feat-maven-configuration-in-settings # Conflicts: # docs/development/platform-parity-matrix.csv # docs/development/platform-parity-matrix.md # shared/platform-feature-matrix.json
…t-maven-configuration-in-settings # Conflicts: # docs/development/platform-parity-matrix.csv # docs/development/platform-parity-matrix.md # shared/platform-feature-matrix.json # windows/tauri/src/features/run/stores/run-maven-context.test.ts # windows/tauri/src/features/run/stores/run.store.ts
|
@xiaoyumuxi 刚刚你在另外一个pr提的问题修复了 |
哪个PR?还有就是你可以把这个PR的说明补详细一点么,我有点没有看懂 |
1lck
left a comment
There was a problem hiding this comment.
按 lithe-code-review 对当前 head 895180084203eeab145e8a818cb9ef83553ebcc2 完成代码审查,发现 1 个 P1 问题:Maven 路径来源的修改没有同步现有 Run 编辑器和共享契约,用户显式选择的工具链会被实际启动忽略,建议修复后合并。具体调用链和修改方向见行内意见。
验证:本地 diff、程序包只读、功能矩阵、Windows 边界和 Windows 测试稳定性静态检查通过;未本地运行完整测试或 Windows 原生流程。服务边界脚本受当前 Linux 缺少 PlistBuddy 限制,未完整执行。
| const configuredJavaHome = configuration.mavenJavaHomePath.trim(); | ||
| // Legacy run configuration Maven paths are retained in the document, but the | ||
| // workspace Maven Settings context is the only source for launch paths. | ||
| function mavenProcessPaths(mavenContext: MavenLaunchContext | null) { |
There was a problem hiding this comment.
[P1] 保持 Run 编辑器与实际启动的 Maven 工具链一致
这里不再接收 Run configuration,只返回项目 mavenContext 的 Maven/JDK 路径;主启动和前置 Maven 任务均已改走这一路径。但 run-configuration-editor.tsx:315–356 仍允许设置 draft.mavenExecutablePath、draft.mavenJavaHomePath,明确标为配置覆盖,并在工具链展示中保留这些值。
例如项目设置为 Maven B/JDK 17,某个 Run 配置明确选择 Maven A/JDK 21 并保存,启动时现在会实际使用 B/17。依赖 JDK 21 的构建因此可能失败,而设置界面仍显示已选择的覆盖值。shared/contracts/application-boundary.md:389–394 也明确规定 Run 的显式工具链路径优先、未设置时才继承项目设置。
这是本次删除 configuration 参数和覆盖优先级后引入的行为不一致。建议恢复显式覆盖优先、项目设置兜底,并补充编辑器保存到主任务/前置任务启动的一致性回归测试。如果产品决定取消覆盖功能,需要同步迁移编辑器、诊断和持久化语义,以及双平台契约和文档,再删除启动优先级。
证据来自当前 head 的代码调用链,未在本地 Windows 原生流程运行复现。
修正原分支将 Maven 设置作为唯一启动路径来源的问题:Run 编辑器仍允许显式选择 Maven/Maven JDK,共享契约要求这些选择优先。忽略覆盖值会导致界面显示的工具链与实际运行不同。
本 PR 已同步 preview,并恢复“运行配置显式覆盖优先,空字段分别继承项目 Maven 设置”的现有行为。相对 preview,最终改动仅为回归测试和功能矩阵,未新增设置界面或改变配置契约。
验证:
bun run typecheck、Windows 测试稳定性静态检查、Windows 边界、程序包只读、矩阵变更及一致性检查通过。