[PR #185] [MERGED] Resolve relative preparation roots before running Java exporters #2387

Closed
opened 2026-11-02 15:55:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/prepare-relative-root


📝 Commits (2)

  • 6c4ad9d Resolve preparation root before changing exporter directories
  • f465e1b Avoid verbatim preparation paths on Windows

📊 Changes

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

View changed files

📝 crates/horizon-prepare/src/lib.rs (+2 -1)

📄 Description

Preparing with a relative --root failed in Java's data generator: it changes its working directory and then cannot resolve the relative server-jar path. Make the root absolute once at preparation entry so exporter paths remain valid across working-directory changes. Use std::path::absolute, preserving symlinks and avoiding the Windows verbatim path prefix introduced by filesystem canonicalization.

Found while testing #178 with a fresh sibling checkout. Its import reuse and metadata generation succeeded; the later data-generator stage exposed this existing path bug. #178 merged before this follow-up was ready.

Validation: all 20 preparer tests, formatting and whitespace checks passed after the review change. The earlier revision also passed warning-denied preparer all-target Clippy and public-tree checks, and the exact relative-root reproduction completed full preparation using real pinned imports, including Java data generation and final resource exports. That full preparation and Windows Java execution were not repeated for this standard-library path change. No game window launched.


🔄 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/185 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/prepare-relative-root` --- ### 📝 Commits (2) - [`6c4ad9d`](https://github.com/horizon-rust/horizon/commit/6c4ad9d825f26b30520a98bc4ec7874787135682) Resolve preparation root before changing exporter directories - [`f465e1b`](https://github.com/horizon-rust/horizon/commit/f465e1b6ae70c2a3bbd4c51de5913e19d8cdc694) Avoid verbatim preparation paths on Windows ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-prepare/src/lib.rs` (+2 -1) </details> ### 📄 Description Preparing with a relative `--root` failed in Java's data generator: it changes its working directory and then cannot resolve the relative server-jar path. Make the root absolute once at preparation entry so exporter paths remain valid across working-directory changes. Use `std::path::absolute`, preserving symlinks and avoiding the Windows verbatim path prefix introduced by filesystem canonicalization. Found while testing #178 with a fresh sibling checkout. Its import reuse and metadata generation succeeded; the later data-generator stage exposed this existing path bug. #178 merged before this follow-up was ready. Validation: all 20 preparer tests, formatting and whitespace checks passed after the review change. The earlier revision also passed warning-denied preparer all-target Clippy and public-tree checks, and the exact relative-root reproduction completed full preparation using real pinned imports, including Java data generation and final resource exports. That full preparation and Windows Java execution were not repeated for this standard-library path change. No game window launched. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:33 +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#2387
No description provided.