Expand description
Environment diagnostics.
doctor reports which analysis components are usable on the current
machine. It is a diagnostic, never a gate: it inspects the environment and
always succeeds.
Compiler helpers are separate programs, and this module does not know how to run one — it is handed what was found out about them. That keeps the crate that compares programs free of the crate that starts processes, and it is also what makes the absence of a helper testable: a lookup that finds nothing is a machine without helpers, which is the case worth being sure about.
An absent helper is reported as what is still available rather than as a problem. Fast and Structural analysis do not need one, so a report that read as a failure would be telling somebody to fix something that is not broken.
§Why being there is not the same as being usable
A helper that is installed can still be one this build cannot talk to: an older protocol, a program that dies on startup, a name that resolves to something else entirely. Reporting that as “available” sends somebody to debug a scan that was never going to work, and reporting it as “not found” sends them to install what is already installed. It is its own state, and what the helper said — or why it said nothing — is the part worth printing.
Structs§
- Component
Report - Outcome of inspecting one component.
- Greeting
- What a helper said about itself at the handshake.
- Helper
Component - An optional out-of-process helper, and what a machine without it loses.
- Helper
Facts - What one helper turned out to be, once somebody went and looked.
Enums§
- Component
Status - Availability of a diagnostic component.
- Helper
State - Whether a helper that is present can be used.
- Requirement
- Whether a component is required for core functionality.
Constants§
- CLANG_
HELPER - The helper that answers about C and C++.
- OPTIONAL_
HELPERS - The helpers a run can use, in a fixed order.
- RUST_
HELPER - The helper that answers about Rust.
Functions§
- diagnose
- Diagnose the environment without looking for any helper.
- diagnose_
with - Diagnose the environment, asking
findwhat each optional helper turned out to be. - render
- Render
reportsas an aligned plain-text table.