ramensoftware/windhawk · warning
Compiler warnings
Error message
Compiler warnings:
{warnings} What it means
Compiler diagnostics from building a mod during `mods install` are printed as a single 'Compiler warnings:\n<warnings>' warning. It is emitted via logger.warn, so `--quiet` still shows it; empty warnings print nothing. The same warnings ride on the result for `--json` consumers.
Solutions
- Read the warning text — installation still succeeded, these are non-fatal
- Report or fix the mod source if the warning indicates deprecated API usage
- Update the mod to a newer version that resolves the warnings
- Ignore if the warnings are benign; they do not block the install
Defensive patterns
Strategy: validation
Validate before calling
if !result.compile_warnings.is_empty() { eprintln!("install proceeded with warnings"); } Try / catch
match install(env, args).await {
Ok(r) if r.warnings.is_empty() => {},
Ok(r) => eprintln!("Compiler warnings:\n{}", r.warnings),
Err(e) => return Err(e),
} Prevention
- Treat warnings as non-fatal but review for deprecated API usage
- Prefer newer mod versions with clean compiles
- Check warnings.json-equivalent output when using --json
When it happens
Trigger: Installing a mod whose source compiles with warnings (deprecated APIs, unused variables, non-fatal type issues) — whether compiled locally or fetched precompiled-with-source.
Common situations: Installing community mods that target older Windhawk/compiler versions; mods using deprecated Metadata APIs; cross-compiling with the bundled toolchain flagging new lints.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Mod id must be specified in the source code
- Mod id specified in the source code doesn't match
- Failed to load metadata for mod
- {}: {}
- data import would (with --yes):
AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12).
Data as JSON: /api/errors/d9b76906b08949bd.
Report an issue: GitHub.
Appendix: source
Thrown at src/windhawk-core/cli/src/commands/mods/install.rs:295
/// the friendly label,
/// shared with the `[compile:<arch>]` failure diagnostics. Other event variants
/// (`Installing`, terminal) are not reachable here for a compile op.
fn report_compile_progress(logger: Logger, event: &OperationEvent) {
if let OperationEvent::Progress { payload } = event
&& let Some(triple) = payload.get("compileTarget").and_then(Value::as_str)
{
logger.info(&format!("Compiling for {}...", arch_label(triple)));
}
}
/// Surface a successful compile's clang warnings on stderr, each target's block
/// already tagged with its triple by the core. Emitted via `logger.warn`, so
/// `--quiet` keeps them (they ARE warnings). Empty - a clean compile or a
/// precompiled download - prints nothing. This is the text-mode channel; the
/// warnings also ride back on the result for `--json`.
fn report_compile_warnings(logger: Logger, warnings: &str) {
if !warnings.is_empty() {
logger.warn(&format!("Compiler warnings:\n{warnings}"));
}
}
pub(super) fn install(
env: &Environment,
args: ModInstallArgs,
) -> Result<Box<dyn CommandResult>, CliError> {
let file_mode = args.file.is_some();
if !file_mode && args.id.is_none() {
return Err(CliError::usage(
"mod install: provide <id> or --file <path>",
));
}
if file_mode && args.version.is_some() {
return Err(CliError::usage(
"mod install: [version] is not valid with --file",
));View on GitHub (pinned to 61d99ed8e1)