-
Notifications
You must be signed in to change notification settings - Fork 13.4k
emit error when doc generation fails #55933
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Ping form triage @steveklabnik / @rust-lang/rustdoc: This PR requires your review. |
@QuietMisdreavus or @GuillaumeGomez should be r+'ing this, not me |
Looks nice! Please add a |
I'd like to, but I'm not sure how to simulate filesystem errors in a UI test. |
Ah that's a good point... @rust-lang/infra Does anyone knows how to simulate a full disk? |
what about write to a location which you have no permission? this will need to be changed to a run-make test though. |
Hard to write an all-OSes test... |
It may be enough to make it run on just Unix, though. The trick is just to make sure it outputs the right kind of error message when it encounters a filesystem error, even if the nature of that error doesn't matter much. Plus, plenty of other Otherwise, i quite like this PR. (I'm also not opposed to landing it as-is, since it's effectively just changing the way rustdoc prints certain kinds of errors.) |
@QuietMisdreavus pushed a run-make test that checks that it doesn't ICE. |
all: | ||
mkdir -p $(OUTPUT_DIR) | ||
chmod u-w $(OUTPUT_DIR) | ||
-$(shell $(RUSTDOC) -o $(OUTPUT_DIR) foo.rs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this save the exit status into $(.SHELLSTATUS)
for later? I'm not familiar with this syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for the link!
d4325f0
to
e2fa3c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks so much! r=me when travis is green.
@bors: r=QuietMisdreavus |
📌 Commit e2fa3c17ebf51aac41801a040ea0e7857e9da63f has been approved by |
@bors r- The test did not pass on Windows. See #56531 (comment)
|
The test was missing an else branch that runs an empty target. Fixed. |
r=me pending travis |
@bors r+ |
📌 Commit c359f98 has been approved by |
emit error when doc generation fails Fixes #41813. The diagnostic looks something like this: ``` error: couldn't generate documentation: No space left on device (os error 28) | = note: failed to create or modify "/path/to/crate/target/doc/src/lazycell" ```
☀️ Test successful - status-appveyor, status-travis |
I'm wondering why this caused a visible performance regression: cc @rust-lang/wg-compiler-performance |
@michaelwoerister That makes no sense, I'd suspect an issue with the perf setup. |
Fixes #41813.
The diagnostic looks something like this: