slint-ui/slint · error

Encountered one or multiple errors. See above for details.

Error message

Encountered one or multiple errors. See above for details.

What it means

check_license_headers aggregates per-file results and prints each individual error as it goes; at the end, if any file failed, it throws this generic summary error so the process exits non-zero. The real diagnostics are printed above this line in the output.

Solutions

  1. Scroll up in the output for the specific per-file errors printed above this message
  2. Fix each reported issue (or run `cargo xtask check --fix` for auto-fixable ones)
  3. Re-run `cargo xtask check` until it prints "All files are ok."

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

null

Try / catch

// run the check and surface the detailed output, not just the summary
match check_license_headers(...) {
    Ok(()) => println!("ok"),
    Err(e) => {
        eprintln!("license check failed: {e}; see detailed errors above");
        std::process::exit(1);
    }
}

Prevention

When it happens

Trigger: Running `cargo xtask check` where any file failed any check: missing/wrong license header, missing tag, bad Cargo.toml metadata, or bad LICENSES symlinks — each individual error is printed first, then this error.

Common situations: CI failure on a PR where developers must scroll up to find the actual failing file(s); running the check locally after adding new files.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-09-16). Data as JSON: /api/errors/0bd84c534e94c1e0. Report an issue: GitHub.

Appendix: source

Thrown at xtask/src/license_headers_check.rs:964

impl LicenseHeaderCheck {
    pub fn check_license_headers(&self) -> Result<(), Box<dyn std::error::Error>> {
        let mut seen_errors = false;
        for path in &collect_files()? {
            let result = self
                .check_file(path.as_path())
                .with_context(|| format!("checking {}", path.to_string_lossy()));

            if result.is_err() {
                seen_errors = true;
                if self.show_all {
                    eprintln!("Error: {result:?}");
                } else {
                    return result.map_err(|e| e.into());
                }
            }
        }
        if seen_errors {
            Err(anyhow!("Encountered one or multiple errors. See above for details.").into())
        } else {
            println!("All files are ok.");
            Ok(())
        }
    }

    fn check_file_tags(&self, path: &Path, style: &LicenseTagStyle, license: &str) -> Result<()> {
        let source = &std::fs::read_to_string(path).context("Error reading file")?;

        let source = SourceFileWithTags::new(source, style);

        if !source.has_tag() {
            if self.fix_it {
                eprintln!("Fixing up {path:?} as instructed. It's missing a license header.");
                let source = source.replace_tag(&EXPECTED_HEADER, license);
                std::fs::write(path, source).context("Error writing source")
            } else {
                Err(anyhow!("Missing tag"))

View on GitHub (pinned to 3a7e700487)