[PR #3600] [MERGED] Launcher: Java versions that inherit from another (loader profiles) #5087

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-java-inherits


📝 Commits (1)

  • abca441 Launcher: Java versions that inherit from another (loader profiles)

📊 Changes

2 files changed (+180 additions, -20 deletions)

View changed files

📝 launcher/src/java_launch.rs (+97 -20)
📝 launcher/src/java_launch/tests.rs (+83 -0)

📄 Description

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

Java instances (launcher), part 6a: versions that inherit from another, the shape mod loaders install (Fabric, Quilt, and the profiles NeoForge/Forge leave), read as the official launcher reads them. Nothing installs a loader yet: the next PR (Fabric and Quilt) does, so this one is skip-release.

java_launch::resolve(version, minecraft): a version file with inheritsFrom is merged into the version it names (recursively, read from versions/<id>/<id>.json):

  • its fields over the parent's (id, mainClass…), the parent's kept where it has none (assetIndex, logging, javaVersion…);
  • its libraries first, and a parent library it names again (same group:artifact[:classifier], another version) left out;
  • its arguments.jvm / arguments.game after the parent's;
  • the parent's client jar (jar), which classpath now puts last instead of versions/<id>/<id>.jar.

On a version from before 1.13 (minecraftArguments), a profile's own argument lists now join the old line (natives path, -cp) instead of replacing it. java_launch::read reads a version file.

Test: a_loader_profile_plays_on_its_game_version. A Fabric-shaped profile on a 1.21-shaped version gives: its main class; its loader library first, with its newer a:common replacing the game's; the game's other libraries; the game's jar last; its JVM argument after -cp and before the main class; --version its own id. The same profile on a 1.8.9-shaped version keeps -cp and the old game arguments. Expected paths are joined part by part (Windows, as #3419's fix).

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 77bfff8eb, 1 min 9 s)

Check Result
Scope ✅ 2 files, +180 −20
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed
launcher rustfmt ✅
launcher clippy ✅
launcher tests ✅ 252 passed
Parity ➖ lan_integration listed for CI (the launcher is not in the LAN suite)

🤖 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/3600 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-java-inherits` --- ### 📝 Commits (1) - [`abca441`](https://github.com/horizon-rust/horizon/commit/abca441ad4f822b93dad7ff5481f02f35dddc69a) Launcher: Java versions that inherit from another (loader profiles) ### 📊 Changes **2 files changed** (+180 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/java_launch.rs` (+97 -20) 📝 `launcher/src/java_launch/tests.rs` (+83 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Java instances (launcher), part 6a: **versions that inherit from another**, the shape mod loaders install (Fabric, Quilt, and the profiles NeoForge/Forge leave), read as the official launcher reads them. Nothing installs a loader yet: the next PR (Fabric and Quilt) does, so this one is `skip-release`. `java_launch::resolve(version, minecraft)`: a version file with `inheritsFrom` is merged into the version it names (recursively, read from `versions/<id>/<id>.json`): - its fields over the parent's (`id`, `mainClass`…), the parent's kept where it has none (`assetIndex`, `logging`, `javaVersion`…); - its libraries first, and a parent library it names again (same `group:artifact[:classifier]`, another version) left out; - its `arguments.jvm` / `arguments.game` after the parent's; - the parent's client jar (`jar`), which `classpath` now puts last instead of `versions/<id>/<id>.jar`. On a version from before 1.13 (`minecraftArguments`), a profile's own argument lists now join the old line (natives path, `-cp`) instead of replacing it. `java_launch::read` reads a version file. Test: `a_loader_profile_plays_on_its_game_version`. A Fabric-shaped profile on a 1.21-shaped version gives: its main class; its loader library first, with its newer `a:common` replacing the game's; the game's other libraries; the game's jar last; its JVM argument after `-cp` and before the main class; `--version` its own id. The same profile on a 1.8.9-shaped version keeps `-cp` and the old game arguments. Expected paths are joined part by part (Windows, as #3419's fix). **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 77bfff8eb, 1 min 9 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +180 −20 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed | | launcher rustfmt | ✅ | | launcher clippy | ✅ | | launcher tests | ✅ 252 passed | | Parity | ➖ lan_integration listed for CI (the launcher is not in the LAN suite) | 🤖 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:10:08 +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#5087
No description provided.