[PR #5648] [MERGED] Launcher: native mods needing newer hook points build on the installed game #6415

Closed
opened 2026-11-03 06:20:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5648
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/native-build-hooks-move-to-game


📝 Commits (1)

  • 5206ad3 Launcher: native mods needing newer hook points build on the installed game

📊 Changes

1 file changed (+69 additions, -8 deletions)

View changed files

📝 launcher/src/native_mods.rs (+69 -8)

📄 Description

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

Fixes #5352. Players on launcher 0.2.31 report that mods don't work on the latest builds: the Mods page refuses the native build with "Horizon 142388e doesn't have the native hook points these mods use: … Update Horizon or the mods.", with no Update button.

Cause

The build's revision is the mods' pin (eight registry mods pin 142388e, hook points v1), else the revision of the native build the instance already plays (a rebuild stays on its Horizon, #3870). When a mod needs newer hook points than that revision has (Recipes v2, X To Xray v7) and the hook-point mods were tested on different commits, with_hooks gave up, although the installed Nightly has all of them. --allow-version-mismatch (Build anyway) couldn't help: the refusal came first.

Reproduced in scratch homes with the released launcher 0.2.31 and Nightly d91cab6: Zoom + Minimap alone build and run (Options > Mods: both ON); adding Carry Block, X To Xray and Recipes gives exactly the error of the issue, with or without --allow-version-mismatch.

Fix

with_hooks tries one more revision before refusing: the one of the release or Nightly the build starts from. When it has the hook points, the build moves there; pinned mods made for another commit then go through the usual "Made for other Horizon versions … Build anyway" step. The refusal now names only the mods that don't fit.

A pinned mod isn't needed to hit it: a native build made on an older commit (its native-mods.json set to 142388e) with Zoom, Minimap, Recipes and X To Xray gives the same refusal on 0.2.31.

With this branch's launcher on the same scratch home:

  • Carry Block + the four: Made for other Horizon versions: carryblock → 142388e; the build uses d91cab6. Build anyway then compiles Carry Block's code against d91cab6 and fails (Dim::max_y, Slots::Native): that mod needs an update by its author, and the launcher says so.
  • The four alone, from the stale build: built on d91cab6 in 95 s; in the game, Options > Mods lists Minimap, Recipes, X To Xray and Zoom, all ON.

Test: mods_needing_newer_hook_points_move_the_build_to_the_installed_game (the #5352 set: a rebuild on A with v1, mods tested on three commits needing v1/v2/v7, the game B with v7; and a pinned mod plus a v2 mod).

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at bfc2a2798, 4 min 18 s)

Check Result
Scope ✅ 1 files, +69 −8
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 510 passed (2 min 14 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (1 min 57 s)
launcher tests ✅ 341 passed (5 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
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/5648 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/native-build-hooks-move-to-game` --- ### 📝 Commits (1) - [`5206ad3`](https://github.com/horizon-rust/horizon/commit/5206ad3fac4febd2833ede97c21b7f9f269b6174) Launcher: native mods needing newer hook points build on the installed game ### 📊 Changes **1 file changed** (+69 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/native_mods.rs` (+69 -8) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #5352. Players on launcher 0.2.31 report that mods don't work on the latest builds: the Mods page refuses the native build with *"Horizon 142388e doesn't have the native hook points these mods use: … Update Horizon or the mods."*, with no Update button. ## Cause The build's revision is the mods' pin (eight registry mods pin `142388e`, hook points v1), else the revision of the native build the instance already plays (a rebuild stays on its Horizon, #3870). When a mod needs newer hook points than that revision has (Recipes v2, X To Xray v7) and the hook-point mods were tested on different commits, `with_hooks` gave up, although the installed Nightly has all of them. `--allow-version-mismatch` (Build anyway) couldn't help: the refusal came first. Reproduced in scratch homes with the released launcher 0.2.31 and Nightly d91cab6: Zoom + Minimap alone build and run (Options > Mods: both ON); adding Carry Block, X To Xray and Recipes gives exactly the error of the issue, with or without `--allow-version-mismatch`. ## Fix `with_hooks` tries one more revision before refusing: the one of the release or Nightly the build starts from. When it has the hook points, the build moves there; pinned mods made for another commit then go through the usual "Made for other Horizon versions … Build anyway" step. The refusal now names only the mods that don't fit. A pinned mod isn't needed to hit it: a native build made on an older commit (its `native-mods.json` set to `142388e`) with Zoom, Minimap, Recipes and X To Xray gives the same refusal on 0.2.31. With this branch's launcher on the same scratch home: - Carry Block + the four: `Made for other Horizon versions: carryblock → 142388e; the build uses d91cab6`. Build anyway then compiles Carry Block's code against d91cab6 and fails (`Dim::max_y`, `Slots::Native`): that mod needs an update by its author, and the launcher says so. - The four alone, from the stale build: built on d91cab6 in 95 s; in the game, Options > Mods lists Minimap, Recipes, X To Xray and Zoom, all ON. Test: `mods_needing_newer_hook_points_move_the_build_to_the_installed_game` (the #5352 set: a rebuild on A with v1, mods tested on three commits needing v1/v2/v7, the game B with v7; and a pinned mod plus a v2 mod). **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at bfc2a2798, 4 min 18 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +69 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 510 passed (2 min 14 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (1 min 57 s) | | launcher tests | ✅ 341 passed (5 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | 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 06:20:13 +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#6415
No description provided.