[PR #3087] [MERGED] Crash report: strip the workspace prefix on Windows too #4795

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

📋 Pull Request Information

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

Base: main ← Head: fix/crash-report-relative-paths


📝 Commits (1)

  • da9950c Crash report: strip the workspace prefix on Windows too

📊 Changes

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

View changed files

📝 crates/horizon-client/src/crash.rs (+5 -3)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

stack_lines shortens a frame with short_path(path, root), where root is
CARGO_MANIFEST_DIR minus crates/horizon-client. On Windows the manifest is
E:\Projects\horizon\crates\horizon-client, so strip_suffix never matched,
root stayed the crate directory, and every workspace frame in a crash report
was named /src/crash.rs:359:9 instead of
crates/horizon-client/src/crash.rs:359:9. Two files with the same name in
different crates became indistinguishable in a report.

The manifest and each frame's path are now made Posix before shortening, so
the workspace root is found on either host and frames keep their crate path.

Evidence, Windows 11:

  • before, on origin/main:
    cargo test -p horizon-client --lib crash::tests::stacks_start_at_the_panicking_frame →
    left: "horizon_client::crash::debug_crash_tick (/src/crash.rs:359:9)\n..."
    right: "... (crates/horizon-client/src/crash.rs:359:9)\n..."
    
    test result: FAILED;
  • after, on this commit: that test passes, and
    cargo test -p horizon-client --lib crash::tests -- --test-threads=1 →
    6 passed; 0 failed.

On Linux and macOS the normalisation is a no-op.


🔄 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/3087 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/crash-report-relative-paths` --- ### 📝 Commits (1) - [`da9950c`](https://github.com/horizon-rust/horizon/commit/da9950c75b839f9ce3e38552bc02e9e62a59b299) Crash report: strip the workspace prefix on Windows too ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/crash.rs` (+5 -3) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `stack_lines` shortens a frame with `short_path(path, root)`, where `root` is `CARGO_MANIFEST_DIR` minus `crates/horizon-client`. On Windows the manifest is `E:\Projects\horizon\crates\horizon-client`, so `strip_suffix` never matched, `root` stayed the crate directory, and every workspace frame in a crash report was named `/src/crash.rs:359:9` instead of `crates/horizon-client/src/crash.rs:359:9`. Two files with the same name in different crates became indistinguishable in a report. The manifest and each frame's path are now made Posix before shortening, so the workspace root is found on either host and frames keep their crate path. Evidence, Windows 11: - before, on `origin/main`: `cargo test -p horizon-client --lib crash::tests::stacks_start_at_the_panicking_frame` → ``` left: "horizon_client::crash::debug_crash_tick (/src/crash.rs:359:9)\n..." right: "... (crates/horizon-client/src/crash.rs:359:9)\n..." ``` `test result: FAILED`; - after, on this commit: that test passes, and `cargo test -p horizon-client --lib crash::tests -- --test-threads=1` → `6 passed; 0 failed`. On Linux and macOS the normalisation is a no-op. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:01 +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#4795
No description provided.