[PR #3402] [MERGED] Launcher tests: Mojang runtime fixture with Windows' java.exe #4956

Closed
opened 2026-11-03 05:09:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3402
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/launcher-java-test-windows


📝 Commits (1)

  • 75b8a17 Launcher tests: Mojang runtime fixture with Windows' java.exe

📊 Changes

2 files changed (+11 additions, -4 deletions)

View changed files

📝 launcher/src/java/tests.rs (+10 -3)
📝 launcher/src/mojang.rs (+1 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes main's Windows launcher build after #3386. java::tests::mojangs_runtimes_are_found_in_their_layout failed there (run 40770078157, job 123105671406) with left [].

Cause: on Windows, the test's fake Java homes had only bin/javaw.exe. Mojang's runtime search (horizon_prepare::java::minecraft_runtimes) walks every platform folder, not only this system's, and keeps a home only when it has bin/java.exe, so it found none. The other Java tests passed because they go through Runtime::java(), which checks javaw.exe.

Fix (test only):

  • A fake Windows home now has both java.exe and javaw.exe, as Mojang's Windows runtimes do.
  • The fixture's platform folder comes from mojang::java_platform() (now pub(crate)), the name the download lays out, instead of a hard-coded mac-os-arm64.

Tested: the 8 java:: tests and the_launcher_reference_is_up_to_date pass on macOS; CI's Windows build job is the check for Windows.

skip-release: players see no change.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3402 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-java-test-windows` --- ### 📝 Commits (1) - [`75b8a17`](https://github.com/horizon-rust/horizon/commit/75b8a176d42fd38d19a59e4794a31a1743434f38) Launcher tests: Mojang runtime fixture with Windows' java.exe ### 📊 Changes **2 files changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/java/tests.rs` (+10 -3) 📝 `launcher/src/mojang.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes main's Windows launcher build after #3386. `java::tests::mojangs_runtimes_are_found_in_their_layout` failed there (run 40770078157, job 123105671406) with left `[]`. **Cause:** on Windows, the test's fake Java homes had only `bin/javaw.exe`. Mojang's runtime search (`horizon_prepare::java::minecraft_runtimes`) walks every platform folder, not only this system's, and keeps a home only when it has `bin/java.exe`, so it found none. The other Java tests passed because they go through `Runtime::java()`, which checks `javaw.exe`. **Fix (test only):** - A fake Windows home now has both `java.exe` and `javaw.exe`, as Mojang's Windows runtimes do. - The fixture's platform folder comes from `mojang::java_platform()` (now `pub(crate)`), the name the download lays out, instead of a hard-coded `mac-os-arm64`. **Tested:** the 8 `java::` tests and `the_launcher_reference_is_up_to_date` pass on macOS; CI's Windows build job is the check for Windows. `skip-release`: players see no change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4956
No description provided.