[PR #3580] [MERGED] horizon-prepare: name the game files one by one (#3545) #5071

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

📋 Pull Request Information

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

Base: main ← Head: feat/launch-api-prepare-inputs


📝 Commits (10+)

  • da7aa1f horizon-prepare: --output and --check (#3545)
  • 8dfd374 horizon-prepare: name check's extras type for clippy
  • 82cf891 horizon-prepare: --complete and --progress json (#3545)
  • 7f8c190 horizon-prepare: name the game files one by one (#3545)
  • 6f0f282 horizon-prepare: lock a folder while preparing, unstamp before writing (#3545)
  • 83fadad Merge branch 'feat/launch-api-prepare' into feat/launch-api-prepare-complete
  • 8dbde81 Merge branch 'feat/launch-api-client' into feat/launch-api-prepare-complete
  • a91acdd Launch API: document horizon-prepare's output and --progress json (#3545)
  • 8311857 docs: put --complete and --progress json back in native-client.md
  • 78db89b horizon-prepare: --java-home, log the jar read, document named inputs (#3545)

📊 Changes

15 files changed (+930 additions, -134 deletions)

View changed files

📝 crates/horizon-prepare/src/artifacts.rs (+131 -10)
➕ crates/horizon-prepare/src/check.rs (+227 -0)
📝 crates/horizon-prepare/src/exporters.rs (+1 -1)
📝 crates/horizon-prepare/src/java.rs (+8 -1)
📝 crates/horizon-prepare/src/lib.rs (+157 -9)
📝 crates/horizon-prepare/src/main.rs (+194 -24)
📝 crates/horizon-prepare/src/sounds.rs (+105 -32)
📝 crates/horizon-prepare/src/worker.rs (+2 -0)
📝 docs/api/README.md (+1 -1)
📝 docs/api/launch.md (+47 -6)
📝 docs/api/stability.md (+2 -2)
📝 docs/native-client.md (+31 -0)
📝 launcher/src/backend.rs (+15 -45)
📝 tests/test_prepare_output.py (+2 -0)
📝 tools/prepare_output.py (+7 -3)

📄 Description

🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly.

What and why

The fourth part of #3545. Builds on #3574 (which builds on #3567): until those are merged this diff shows their commits too; the change of its own is the last commit (6 files, +188 −22).

Launchers lay out Minecraft's files their own way (instance folders, shared libraries and assets), and today they would first have to rebuild the official launcher's layout for --minecraft-dir. Now they can name each file:

  • --version-json PATH: the pinned version's JSON.
  • --client-jar PATH: the pinned client jar.
  • --libraries-dir PATH: the client's libraries (Maven layout, as launcher_library reads it, Prism's native names included).
  • --assets-dir PATH: the asset store, with indexes/ and objects/ (sounds, panorama, fonts, packs, languages).

Each replaces only what it names; the rest still comes from --minecraft-dir (or the folders looked in by default). Every file is still checked against research-lock.json's pins, so nothing about trust changes.

  • artifacts::Inputs (Default), GameFiles::with(&Inputs), and GameFiles gains libraries and assets; launcher_library keeps its signature (the launcher's tests call it).
  • Options gains inputs (Default::default() in the launcher, so it behaves as before); import and add_assets take &Inputs, while sounds(), panorama()… keep their signatures.
  • The missing-files hint names the four options; help text and docs/native-client.md describe them.
  • Test named_inputs_prepare_without_a_minecraft_folder: a version JSON, client jar and libraries in a layout of their own import from an empty --minecraft-dir with the same pins, fail without the inputs, and fail on a jar that isn't the pinned one.

Tested on Windows on real files: fonts --minecraft-dir <empty> --version-json <launcher's 26.3.json> --assets-dir <launcher's assets> --output O copies the Unifont glyphs (exit 0); without the two inputs it fails naming the folder looked in. A full --prepare with the inputs was not run here (it needs Java 25; this machine has 21).

Suggested label: feature.

Vanilla reference

None: Horizon-only tooling (the preparer's command line).

Self-check

Run on Linux (WSL2), against #3574's branch, so it covers this change alone.

pr_ready (tools/pr_ready.py --quick --base origin/feat/launch-api-prepare-complete on GIGABAIT, against origin/feat/launch-api-prepare-complete at 82cf8916e, 51 s)

Check Result
Scope ✅ 6 files, +188 −22
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (27 s)
rustfmt ✅ (6 s)
clippy ✅ (1 s)
tests: horizon-prepare ✅ 46 passed (2 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅
launcher clippy ✅ (4 s)
launcher tests ✅ 249 passed (11 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/3580 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launch-api-prepare-inputs` --- ### 📝 Commits (10+) - [`da7aa1f`](https://github.com/horizon-rust/horizon/commit/da7aa1f73b129b2f41c86e4b1f1a000c9f744616) horizon-prepare: --output and --check (#3545) - [`8dfd374`](https://github.com/horizon-rust/horizon/commit/8dfd37428a22fa110e5fd0c99adf08ae6c699b3e) horizon-prepare: name check's extras type for clippy - [`82cf891`](https://github.com/horizon-rust/horizon/commit/82cf8916e2aafda2c9af4b73045b68f24d930ce3) horizon-prepare: --complete and --progress json (#3545) - [`7f8c190`](https://github.com/horizon-rust/horizon/commit/7f8c190b29079e91bdacaaa8a4f64609c448ed6a) horizon-prepare: name the game files one by one (#3545) - [`6f0f282`](https://github.com/horizon-rust/horizon/commit/6f0f282cf1023ed15b64296bdcc521fe9660f2f7) horizon-prepare: lock a folder while preparing, unstamp before writing (#3545) - [`83fadad`](https://github.com/horizon-rust/horizon/commit/83fadad7bfd74d2f94e25ec4d313d37d8d219b29) Merge branch 'feat/launch-api-prepare' into feat/launch-api-prepare-complete - [`8dbde81`](https://github.com/horizon-rust/horizon/commit/8dbde815baccbd00e3bda55922f022796de0b9b9) Merge branch 'feat/launch-api-client' into feat/launch-api-prepare-complete - [`a91acdd`](https://github.com/horizon-rust/horizon/commit/a91acdd348bdbc8fd05adff998087fa915f7f8ec) Launch API: document horizon-prepare's output and --progress json (#3545) - [`8311857`](https://github.com/horizon-rust/horizon/commit/8311857928f5c10287b812af8448b7e3601d64a8) docs: put --complete and --progress json back in native-client.md - [`78db89b`](https://github.com/horizon-rust/horizon/commit/78db89ba162b2d4dd8a480a5a34a97a038ef8e61) horizon-prepare: --java-home, log the jar read, document named inputs (#3545) ### 📊 Changes **15 files changed** (+930 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-prepare/src/artifacts.rs` (+131 -10) ➕ `crates/horizon-prepare/src/check.rs` (+227 -0) 📝 `crates/horizon-prepare/src/exporters.rs` (+1 -1) 📝 `crates/horizon-prepare/src/java.rs` (+8 -1) 📝 `crates/horizon-prepare/src/lib.rs` (+157 -9) 📝 `crates/horizon-prepare/src/main.rs` (+194 -24) 📝 `crates/horizon-prepare/src/sounds.rs` (+105 -32) 📝 `crates/horizon-prepare/src/worker.rs` (+2 -0) 📝 `docs/api/README.md` (+1 -1) 📝 `docs/api/launch.md` (+47 -6) 📝 `docs/api/stability.md` (+2 -2) 📝 `docs/native-client.md` (+31 -0) 📝 `launcher/src/backend.rs` (+15 -45) 📝 `tests/test_prepare_output.py` (+2 -0) 📝 `tools/prepare_output.py` (+7 -3) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What and why The fourth part of #3545. **Builds on #3574** (which builds on #3567): until those are merged this diff shows their commits too; the change of its own is the last commit (6 files, +188 −22). Launchers lay out Minecraft's files their own way (instance folders, shared libraries and assets), and today they would first have to rebuild the official launcher's layout for `--minecraft-dir`. Now they can name each file: - `--version-json PATH`: the pinned version's JSON. - `--client-jar PATH`: the pinned client jar. - `--libraries-dir PATH`: the client's libraries (Maven layout, as `launcher_library` reads it, Prism's native names included). - `--assets-dir PATH`: the asset store, with `indexes/` and `objects/` (sounds, panorama, fonts, packs, languages). Each replaces only what it names; the rest still comes from `--minecraft-dir` (or the folders looked in by default). Every file is still checked against `research-lock.json`'s pins, so nothing about trust changes. - `artifacts::Inputs` (Default), `GameFiles::with(&Inputs)`, and `GameFiles` gains `libraries` and `assets`; `launcher_library` keeps its signature (the launcher's tests call it). - `Options` gains `inputs` (`Default::default()` in the launcher, so it behaves as before); `import` and `add_assets` take `&Inputs`, while `sounds()`, `panorama()`… keep their signatures. - The missing-files hint names the four options; help text and `docs/native-client.md` describe them. - Test `named_inputs_prepare_without_a_minecraft_folder`: a version JSON, client jar and libraries in a layout of their own import from an empty `--minecraft-dir` with the same pins, fail without the inputs, and fail on a jar that isn't the pinned one. Tested on Windows on real files: `fonts --minecraft-dir <empty> --version-json <launcher's 26.3.json> --assets-dir <launcher's assets> --output O` copies the Unifont glyphs (exit 0); without the two inputs it fails naming the folder looked in. A full `--prepare` with the inputs was not run here (it needs Java 25; this machine has 21). Suggested label: `feature`. ## Vanilla reference None: Horizon-only tooling (the preparer's command line). ## Self-check Run on Linux (WSL2), against #3574's branch, so it covers this change alone. **pr_ready** (`tools/pr_ready.py --quick --base origin/feat/launch-api-prepare-complete` on GIGABAIT, against origin/feat/launch-api-prepare-complete at 82cf8916e, 51 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +188 −22 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (27 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 s) | | tests: horizon-prepare | ✅ 46 passed (2 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ | | launcher clippy | ✅ (4 s) | | launcher tests | ✅ 249 passed (11 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:02 +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#5071
No description provided.