Skip to content

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

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

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.

@oli-obk

oli-obk commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

We generally do not fix ICEs in internal feature gates or forever-unstable command line flags. It's usually something only used by ppl digging around in compiler internals anyway, so they also know how to debug it

@oli-obk oli-obk closed this Aug 19, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2026
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 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.

4 participants