[PR #1693] [MERGED] Packs: an untouched vanilla directory is mirrored on Windows too #3693

Closed
opened 2026-11-03 04:11:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/pack-overlay-windows


📝 Commits (1)

  • 6d1f696 Packs: an untouched vanilla directory is mirrored on Windows too (#1688)

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/packs.rs (+5 -1)

📄 Description

🤖 Agent

On Windows the overlay that packs produce left out every vanilla directory a pack does not itself touch, so a pack that overrides a font or a panorama crashed the client.

link makes a symlink on unix, which works for a directory. The Windows version returns Ok(()) and does nothing for one. So mirror had to recurse into those directories itself, and its condition only did that when a pack had filters: a directory with no pack files and no filters fell through to the link branch and vanished from the overlay.

With Vanilla Experience+ applied the overlay had 12350 files, assets/minecraft/font/default.json was merged correctly, and assets/minecraft/textures/font was empty while the prepared root holds ascii.png, accented.png, nonlatin_european.png, ascii_sga.png and asciillager.png. The merged font then named sheets that were not there, and the client died before opening its control socket:

[03:29:52] [Render thread/WARN]: font sheet minecraft:font/ascii_sga.png could not be read
[03:29:52] [Render thread/WARN]: font sheet minecraft:font/asciillager.png could not be read
[03:29:52] [Render thread/WARN]: Horizon: title panorama unavailable (os error 3)
[03:29:54] [Render thread/ERROR]: Horizon: ... (os error 3)

The condition now recurses on Windows whether or not filters exist, and keeps the cheap symlink path on unix:

} else if touched.contains(&child)
    || (vanilla.join(&child).is_dir() && (cfg!(not(unix)) || !filters.is_empty()))

Verified on a debug build of this branch, with the pack in options.txt (resourcePacks:["vanilla","file/vanilla-exp.zip"]) so no clicking is involved: the client starts, the overlay is 642 MB with textures/font populated, the title screen draws readable text and the panorama, and the log has no font warnings. Before the change the same setup crashed on the same line.

The price is the overlay size on Windows: an untouched subtree is now copied instead of skipped, which is the 12350 to 642 MB jump. It is built once per pack selection and cached, but if that startup cost matters, hardlinking vanilla files into the overlay (like the unix symlink) would keep it cheap without the copy. Fixes #1688 for the crash and the tofu; the pack list not refreshing after a click is a separate half and is not touched here.


🔄 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/1693 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/pack-overlay-windows` --- ### 📝 Commits (1) - [`6d1f696`](https://github.com/horizon-rust/horizon/commit/6d1f6965d23ec297186704fcdc43df40ea17a4f0) Packs: an untouched vanilla directory is mirrored on Windows too (#1688) ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/packs.rs` (+5 -1) </details> ### 📄 Description 🤖 Agent On Windows the overlay that packs produce left out every vanilla directory a pack does not itself touch, so a pack that overrides a font or a panorama crashed the client. `link` makes a symlink on unix, which works for a directory. The Windows version returns `Ok(())` and does nothing for one. So `mirror` had to recurse into those directories itself, and its condition only did that when a pack had filters: a directory with no pack files and no filters fell through to the link branch and vanished from the overlay. With Vanilla Experience+ applied the overlay had 12350 files, `assets/minecraft/font/default.json` was merged correctly, and `assets/minecraft/textures/font` was empty while the prepared root holds `ascii.png`, `accented.png`, `nonlatin_european.png`, `ascii_sga.png` and `asciillager.png`. The merged font then named sheets that were not there, and the client died before opening its control socket: ``` [03:29:52] [Render thread/WARN]: font sheet minecraft:font/ascii_sga.png could not be read [03:29:52] [Render thread/WARN]: font sheet minecraft:font/asciillager.png could not be read [03:29:52] [Render thread/WARN]: Horizon: title panorama unavailable (os error 3) [03:29:54] [Render thread/ERROR]: Horizon: ... (os error 3) ``` The condition now recurses on Windows whether or not filters exist, and keeps the cheap symlink path on unix: ```rust } else if touched.contains(&child) || (vanilla.join(&child).is_dir() && (cfg!(not(unix)) || !filters.is_empty())) ``` Verified on a debug build of this branch, with the pack in `options.txt` (`resourcePacks:["vanilla","file/vanilla-exp.zip"]`) so no clicking is involved: the client starts, the overlay is 642 MB with `textures/font` populated, the title screen draws readable text and the panorama, and the log has no font warnings. Before the change the same setup crashed on the same line. The price is the overlay size on Windows: an untouched subtree is now copied instead of skipped, which is the 12350 to 642 MB jump. It is built once per pack selection and cached, but if that startup cost matters, hardlinking vanilla files into the overlay (like the unix symlink) would keep it cheap without the copy. Fixes #1688 for the crash and the tofu; the pack list not refreshing after a click is a separate half and is not touched here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:28 +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#3693
No description provided.