[PR #5478] [MERGED] Launcher: a mod installed from GitHub keeps its crates' data and README files #6314

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5478
Author: @levzzz5154
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: fix/pack-crate-data


📝 Commits (1)

  • 2da7f0f Launcher: packing a GitHub mod keeps its crates' data and text files

📊 Changes

3 files changed (+21 additions, -5 deletions)

View changed files

📝 crates/horizon-mods/src/index/native.rs (+7 -1)
📝 launcher/src/github_mods.rs (+2 -2)
📝 launcher/src/github_mods/tests.rs (+12 -2)

📄 Description

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

Installing a native mod from a GitHub commit (#3964) packs its folder into a .hnmod. pack kept only .rs, .toml and a top-level data/, while the registry's Bundle::read also accepts a crate's own data/ (mixins/<id>/<crate>/data/…) and the crate text files (README*, LICENSE*…). A mod with a crate that reads its data, or does #![doc = include_str!("../README.md")], packed without them and failed to build.

Fix: the registry's rule is now horizon_mods::index::native::allowed, and both Bundle::read and pack use it, so they cannot drift again.

Test: a_mod_folder_packs_into_a_bundle_the_registry_checks_accept now checks that a crate's data, its LICENSE and the README ship, and that a png beside them stays behind. Launcher github_mods and horizon-mods native tests, clippy and fmt pass.

🤖 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/5478 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/pack-crate-data` --- ### 📝 Commits (1) - [`2da7f0f`](https://github.com/horizon-rust/horizon/commit/2da7f0f751f0193eaa71d719dce2065134fcc039) Launcher: packing a GitHub mod keeps its crates' data and text files ### 📊 Changes **3 files changed** (+21 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-mods/src/index/native.rs` (+7 -1) 📝 `launcher/src/github_mods.rs` (+2 -2) 📝 `launcher/src/github_mods/tests.rs` (+12 -2) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Opus 5.5), not by levzzz5154 personally. Installing a native mod from a GitHub commit (#3964) packs its folder into a `.hnmod`. `pack` kept only `.rs`, `.toml` and a top-level `data/`, while the registry's `Bundle::read` also accepts a crate's own `data/` (`mixins/<id>/<crate>/data/…`) and the crate text files (`README*`, `LICENSE*`…). A mod with a crate that reads its data, or does `#![doc = include_str!("../README.md")]`, packed without them and failed to build. **Fix:** the registry's rule is now `horizon_mods::index::native::allowed`, and both `Bundle::read` and `pack` use it, so they cannot drift again. **Test:** `a_mod_folder_packs_into_a_bundle_the_registry_checks_accept` now checks that a crate's data, its LICENSE and the README ship, and that a png beside them stays behind. Launcher `github_mods` and horizon-mods `native` tests, clippy and fmt pass. 🤖 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:18: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#6314
No description provided.