Skip to content

Improve error output in case nodejs or npm is not installed for rustdoc-gui test suite #140556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #138134.

It now looks like this:

Screenshot From 2025-05-01 17-41-12

cc @kpreid

@rustbot
Copy link
Collaborator

rustbot commented May 1, 2025

r? @clubby789

rustbot has assigned @clubby789.
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

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 1, 2025
@clubby789
Copy link
Contributor

Thanks! r=me when green

@Noratrieb
Copy link
Member

Noratrieb commented May 1, 2025

wouldn't it make more sense for the caller of this binary to emit the error message? instead of what seems like conditionally passing the flag

@GuillaumeGomez
Copy link
Member Author

I thought about it but didn't know which was preferred. We need to make the check in any case so I thought: "why not improving it in the tool that can be called without bootstrap".

Can be revisited later on if needed depending on what people prefer.

@bors r=clubby789 rollup

@bors
Copy link
Collaborator

bors commented May 1, 2025

📌 Commit bc68d3a has been approved by clubby789

It is now in the queue for this repository.

@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 May 1, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 1, 2025
…-tool-error-output, r=clubby789

Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

Fixes rust-lang#138134.

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc `@kpreid`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 1, 2025
…llaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#138703 (chore: remove redundant words in comment)
 - rust-lang#139186 (Refactor `diy_float`)
 - rust-lang#139343 (Change signature of File::try_lock and File::try_lock_shared)
 - rust-lang#139780 (docs: Add example to `Iterator::take` with `by_ref`)
 - rust-lang#139802 (Fix some grammar errors and hyperlinks in doc for `trait Allocator`)
 - rust-lang#140034 (simd_select_bitmask: the 'padding' bits in the mask are just ignored)
 - rust-lang#140062 (std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into)
 - rust-lang#140420 (rustdoc: Fix doctest heuristic for main fn wrapping)
 - rust-lang#140460 (Fix handling of LoongArch target features not supported by LLVM 19)
 - rust-lang#140538 (rustc-dev-guide subtree update)
 - rust-lang#140552 (allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`)
 - rust-lang#140556 (Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2025
…llaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#138703 (chore: remove redundant words in comment)
 - rust-lang#139186 (Refactor `diy_float`)
 - rust-lang#139780 (docs: Add example to `Iterator::take` with `by_ref`)
 - rust-lang#139802 (Fix some grammar errors and hyperlinks in doc for `trait Allocator`)
 - rust-lang#140034 (simd_select_bitmask: the 'padding' bits in the mask are just ignored)
 - rust-lang#140062 (std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into)
 - rust-lang#140420 (rustdoc: Fix doctest heuristic for main fn wrapping)
 - rust-lang#140460 (Fix handling of LoongArch target features not supported by LLVM 19)
 - rust-lang#140538 (rustc-dev-guide subtree update)
 - rust-lang#140544 (Clean up "const" situation in format_args!(). )
 - rust-lang#140552 (allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`)
 - rust-lang#140556 (Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite)

r? `@ghost`
`@rustbot` modify labels: rollup
VlaDexa added a commit to VlaDexa/rust that referenced this pull request May 2, 2025
…-tool-error-output, r=clubby789

Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

Fixes rust-lang#138134.

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc `@kpreid`
VlaDexa added a commit to VlaDexa/rust that referenced this pull request May 2, 2025
…uillaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#138703 (chore: remove redundant words in comment)
 - rust-lang#139186 (Refactor `diy_float`)
 - rust-lang#139780 (docs: Add example to `Iterator::take` with `by_ref`)
 - rust-lang#139802 (Fix some grammar errors and hyperlinks in doc for `trait Allocator`)
 - rust-lang#140034 (simd_select_bitmask: the 'padding' bits in the mask are just ignored)
 - rust-lang#140062 (std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into)
 - rust-lang#140420 (rustdoc: Fix doctest heuristic for main fn wrapping)
 - rust-lang#140460 (Fix handling of LoongArch target features not supported by LLVM 19)
 - rust-lang#140538 (rustc-dev-guide subtree update)
 - rust-lang#140544 (Clean up "const" situation in format_args!(). )
 - rust-lang#140552 (allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`)
 - rust-lang#140556 (Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d42e3ac into rust-lang:master May 2, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2025
Rollup merge of rust-lang#140556 - GuillaumeGomez:improve-rustdoc-gui-tool-error-output, r=clubby789

Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

Fixes rust-lang#138134.

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc ``@kpreid``
@rustbot rustbot added this to the 1.88.0 milestone May 2, 2025
@GuillaumeGomez GuillaumeGomez deleted the improve-rustdoc-gui-tool-error-output branch May 2, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

Rustdoc UI test suite should more helpfully explain its run-time dependencies in errors, especially npm
5 participants