Skip to content

rustc_incremental: avoid ICE when dumping dep graph fails - #159507

Open
cuishuang wants to merge 1 commit into
rust-lang:mainfrom
cuishuang:fix-dump-dep-graph-io-error
Open

rustc_incremental: avoid ICE when dumping dep graph fails#159507
cuishuang wants to merge 1 commit into
rust-lang:mainfrom
cuishuang:fix-dump-dep-graph-io-error

Conversation

@cuishuang

Copy link
Copy Markdown
Contributor

-Zdump-dep-graph used unwrap() when creating or writing the dependency graph output files. As a result, setting RUST_DEP_GRAPH to a path whose parent directory does not exist, or to another unwritable location, caused rustc to ICE.

This changes dump_graph to propagate filesystem errors and emit the existing structured file-writing diagnostic at the caller.

The run-make test now covers an invalid output directory and verifies that rustc reports a normal error without ICEing.

Tests:

  • ./x test tests/run-make/dep-graph
  • ./x fmt --check
  • ./x test tidy

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 18, 2026
@rustbot

rustbot commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, incremental
  • compiler, incremental expanded to 74 candidates
  • Random selection from 19 candidates

@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #160102) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants