Skip to content

Conversation

GuillaumeGomez
Copy link
Member

The message before looks like this:

failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"

And with this change it looks like this:

failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8

r? @lolbinarycat

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 29, 2025
Comment on lines +763 to +765
msg.note(format!("failed to create or modify {e}"));
} else {
msg.note(format!("failed to create or modify file: {e}"));
Copy link
Contributor

@notriddle notriddle Aug 29, 2025

Choose a reason for hiding this comment

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

Suggested change
msg.note(format!("failed to create or modify {e}"));
} else {
msg.note(format!("failed to create or modify file: {e}"));
msg.note(format!("failed to create or modify \"{file}\": {e}"));
} else {
msg.note(format!("failed to create or modify file: {e}"));

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's included in the error message if it contains a path, hence why I make the check to prevent displaying it twice.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, sure. That makes sense.

@notriddle
Copy link
Contributor

@bors r+ rollup

r? @notriddle

@bors
Copy link
Collaborator

bors commented Aug 29, 2025

📌 Commit 638a52c has been approved by notriddle

It is now in the queue for this repository.

@rustbot rustbot assigned notriddle and unassigned lolbinarycat Aug 29, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 29, 2025
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? `@lolbinarycat`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 29, 2025
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ``@lolbinarycat``
bors added a commit that referenced this pull request Aug 29, 2025
Rollup of 6 pull requests

Successful merges:

 - #144964 (std: clarify `OpenOptions` error for create without write access)
 - #145242 (std: use a TAIT to define `SplitPaths` on UNIX)
 - #145467 (Stabilize `strict_provenance_atomic_ptr` feature)
 - #145990 (`AutoDeref::final_ty` is already resolved)
 - #145991 (std: haiku: fix `B_FIND_PATH_IMAGE_PATH`)
 - #146000 (Improve librustdoc error when a file creation/modification failed)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 29, 2025
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ```@lolbinarycat```
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 29, 2025
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ````@lolbinarycat````
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 30, 2025
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? `````@lolbinarycat`````
bors added a commit that referenced this pull request Aug 30, 2025
Rollup of 9 pull requests

Successful merges:

 - #145242 (std: use a TAIT to define `SplitPaths` on UNIX)
 - #145467 (Stabilize `strict_provenance_atomic_ptr` feature)
 - #145756 (str: Stabilize `round_char_boundary` feature)
 - #145967 (compiler: Include span of too huge enum with `-Cdebuginfo=2`)
 - #145990 (`AutoDeref::final_ty` is already resolved)
 - #145991 (std: haiku: fix `B_FIND_PATH_IMAGE_PATH`)
 - #146000 (Improve librustdoc error when a file creation/modification failed)
 - #146017 (Mark pipe2 supported in Android)
 - #146022 (compiler-builtins subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b722da9 into rust-lang:master Aug 30, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 30, 2025
rust-timer added a commit that referenced this pull request Aug 30, 2025
Rollup merge of #146000 - GuillaumeGomez:rustdoc-error-improvement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ``````@lolbinarycat``````
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 30, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#145242 (std: use a TAIT to define `SplitPaths` on UNIX)
 - rust-lang/rust#145467 (Stabilize `strict_provenance_atomic_ptr` feature)
 - rust-lang/rust#145756 (str: Stabilize `round_char_boundary` feature)
 - rust-lang/rust#145967 (compiler: Include span of too huge enum with `-Cdebuginfo=2`)
 - rust-lang/rust#145990 (`AutoDeref::final_ty` is already resolved)
 - rust-lang/rust#145991 (std: haiku: fix `B_FIND_PATH_IMAGE_PATH`)
 - rust-lang/rust#146000 (Improve librustdoc error when a file creation/modification failed)
 - rust-lang/rust#146017 (Mark pipe2 supported in Android)
 - rust-lang/rust#146022 (compiler-builtins subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez GuillaumeGomez deleted the rustdoc-error-improvement branch August 30, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants