Skip to content

internal: Improve panic message when FileSourceRootInput is missing#22528

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
Wilfred:missing_source_root_message
Jun 5, 2026
Merged

internal: Improve panic message when FileSourceRootInput is missing#22528
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
Wilfred:missing_source_root_message

Conversation

@Wilfred
Copy link
Copy Markdown
Contributor

@Wilfred Wilfred commented Jun 4, 2026

I'm seeing several occurrences of errors of the form:

Unable to get `FileSourceRootInput` with `vfs::FileId` (FileId(22452)); this is a bug

I suspect it occurs when the user has many projects open, but I can't reliably reproduce yet. In the meantime, include the actual file name to aid debugging.

AI disclosure: Partially written with Codex and GPT 5.5.

I'm seeing several occurrences of errors of the form:

```
Unable to get `FileSourceRootInput` with `vfs::FileId` (FileId(22452)); this is a bug
```

I suspect it occurs when the user has many projects open, but I can't
reliably reproduce yet. In the meantime, include the actual file name
to aid debugging.

AI disclosure: Partially written with Codex and GPT 5.5.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 4, 2026
Copy link
Copy Markdown
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be more reliable to get the path from the VFS (if there is a problem with sysroots, the path might not be there), but we don't have an access to it here and it's still an improvement.

View changes since this review

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jun 5, 2026
Merged via the queue into rust-lang:master with commit 04a49fb Jun 5, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants