Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/install/PackageInstaller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2197,10 +2197,13 @@ impl<'a> PackageInstaller<'a> {
),
),
);
// Opt-in: ordinary failures; the dump would land in the install output.
#[cfg(bun_debug)]
{
let t = cause.debug_trace;
bun_crash_handler::dump_stack_trace(&t.trace(), Default::default());
if PackageInstaller.is_visible() {
bun_crash_handler::dump_stack_trace(
&cause.debug_trace.trace(),
Default::default(),
);
}
self.summary.fail += 1;
}
Expand Down
8 changes: 7 additions & 1 deletion test/cli/install/bun-link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,13 @@
env,
});
const err4 = await new Response(stderr4).text();
expect(err4).toContain(`FileNotFound: failed linking dependency/workspace to node_modules for package ${link_name}`);
// Debug builds used to follow this line with a stack trace (on stdout via
// llvm-symbolizer on Linux, on stderr elsewhere); neither stream may carry it
// unless BUN_DEBUG_PackageInstaller=1 is set.

Check warning on line 463 in test/cli/install/bun-link.test.ts

View check run for this annotation

Claude / Claude Code Review

Test comment narrates the change and exceeds one line

This 3-line comment opens with "Debug builds used to…" — past-tense change narration, which REVIEW.md's code-style section prohibits ("Only comment what the code cannot say. One line. Never narrate the change."). The comment-cop bot already flagged the Rust half of this PR for the same reason and it was trimmed to one line in b3dded3; this test-side comment was missed. The load-bearing content fits in one present-tense line, e.g. `// Exact match: the debug-only trace (stdout via llvm-symbolizer
Comment thread
robobun marked this conversation as resolved.
expect(err4.split(/\r?\n/)).toEqual([
`FileNotFound: failed linking dependency/workspace to node_modules for package ${link_name}`,
"",
]);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const out4 = await new Response(stdout4).text();
expect(out4.replace(/\[[0-9\.]+m?s\]/, "[]").split(/\r?\n/)).toEqual([
expect.stringContaining("bun install v1."),
Expand Down