Skip to content

test(windows): cover Maven Run toolchain overrides and inheritance - #940

Merged
1lck merged 22 commits into
1lck:previewfrom
JayF211:feat-maven-configuration-in-settings
Sep 28, 2026
Merged

1lck merged 22 commits into
1lck:previewfrom
JayF211:feat-maven-configuration-in-settings

Conversation

@JayF211

@JayF211 JayF211 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

修正原分支将 Maven 设置作为唯一启动路径来源的问题:Run 编辑器仍允许显式选择 Maven/Maven JDK,共享契约要求这些选择优先。忽略覆盖值会导致界面显示的工具链与实际运行不同。

本 PR 已同步 preview,并恢复“运行配置显式覆盖优先,空字段分别继承项目 Maven 设置”的现有行为。相对 preview,最终改动仅为回归测试和功能矩阵,未新增设置界面或改变配置契约。

  • 覆盖主任务与前置 Maven 任务:完整覆盖、上下文缺失、空值继承、仅覆盖 Maven、仅覆盖 Maven JDK、无配置时平台自动发现。
  • 同时断言解析请求与实际传给主任务/前置任务执行接口的可执行文件、JAVA_HOME 和参数。
  • 更新 Maven 设置能力的 Windows 证据、验收步骤及生成的 Markdown/CSV 矩阵,维持原有待实机验证状态。

验证:

  • Linux 上运行 Bun timing harness:Run 相关 192 项测试全部通过,新增六种场景单项 0–1 ms;生成 HTML/JUnit 计时报告。
  • 将原 PR 的启动实现临时放回后,四个覆盖场景按预期失败;验证后已恢复修正实现。
  • bun run typecheck、Windows 测试稳定性静态检查、Windows 边界、程序包只读、矩阵变更及一致性检查通过。
  • 未在本地 Windows 原生环境执行 PowerShell timing harness 或 UI 流程;Windows CI 结果以本次推送后的检查为准。

Jay and others added 19 commits September 21, 2026 00:07
…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
….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
@ghfind-review ghfind-review Bot added the review: low ghfind author score; see https://ghfind.com label Sep 27, 2026
Jay added 2 commits September 28, 2026 00:05
…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
@JayF211

JayF211 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@xiaoyumuxi 刚刚你在另外一个pr提的问题修复了

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

@xiaoyumuxi 刚刚你在另外一个pr提的问题修复了

哪个PR?还有就是你可以把这个PR的说明补详细一点么,我有点没有看懂

@1lck 1lck left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按 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) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 原生流程运行复现。

@1lck 1lck changed the title Feat maven configuration in settings test(windows): cover Maven Run toolchain overrides and inheritance Sep 28, 2026
@1lck
1lck merged commit 1f09fbc into 1lck:preview Sep 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: low ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants