{"record":{"id":"ef8808aa8f2da67a","repo":"slint-ui/slint","slug":"missing-description-field","errorCode":null,"errorMessage":"Missing description field","messagePattern":"Missing description field","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/src/license_headers_check.rs","lineNumber":1028,"sourceCode":"            self.check_dependencies(&doc, &expected_version)?;\n\n            return Ok(());\n        }\n\n        doc.check_and_fix_package_string_field(self.fix_it, \"license\", license)?;\n\n        if !doc.published()? {\n            // Skip further tests for package that are not published\n            return doc.save_if_changed();\n        }\n\n        if doc.check_and_fix_package_string_field(false, \"homepage\", ALLOWED_HOMEPAGE).is_err() {\n            doc.check_and_fix_package_string_field(self.fix_it, \"homepage\", EXPECTED_HOMEPAGE)?;\n        }\n        doc.check_and_fix_package_string_field(self.fix_it, \"repository\", EXPECTED_REPOSITORY)?;\n\n        if doc.package()?[\"description\"].is_none() {\n            return Err(anyhow!(\"Missing description field\"));\n        }\n\n        // Check that version of slint- dependencies are matching this version\n        let expected_version = {\n            let wv = self.workspace_version.borrow().clone();\n            doc.package()?\n                .get(\"version\")\n                .and_then(|v| v.as_value())\n                .and_then(|v| v.as_str())\n                .unwrap_or(&wv)\n                .to_string()\n        };\n\n        self.check_dependencies(&doc, &expected_version)?;\n\n        // Check that a LICENSES directory exists with the right symlinks\n        let crate_dir = path.parent().unwrap();\n        self.check_licenses_dir(crate_dir, license)?;","sourceCodeStart":1010,"sourceCodeEnd":1046,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/xtask/src/license_headers_check.rs#L1010-L1046","documentation":"check_cargo_toml requires every crate's [package] to include a description field. It checks several fields via check_and_fix_package_string_field, then explicitly errors if package[\"description\"] is absent (this one is not auto-fixed).","triggerScenarios":"Running `cargo xtask check` on a crate whose Cargo.toml [package] table has no `description` key. Note this error fires even with --fix, since only existence is checked here.","commonSituations":"Newly scaffolded crates; crates copied from templates without description; fields deleted while cleaning up Cargo.toml.","solutions":["Add a `description = \"...\"` line to the [package] table of the offending Cargo.toml","Add `description.workspace = true` if a workspace-level description inheritance is used in this repo","Run `cargo xtask check` again to confirm"],"exampleFix":"// before\n[package]\nname = \"my-crate\"\n// after\n[package]\nname = \"my-crate\"\ndescription = \"Short description of the crate\"","handlingStrategy":"validation","validationCode":"let t: toml::Value = toml::from_str(&std::fs::read_to_string(\"Cargo.toml\")?)?;\nassert!(t[\"package\"].get(\"description\").is_some(), \"[package] missing description\");","typeGuard":"fn has_description(doc: &toml::Value) -> bool {\n    doc[\"package\"][\"description\"].is_str()\n}","tryCatchPattern":null,"preventionTips":["Include description in your new-crate checklist/template","Run `cargo publish --dry-run` which also warns on missing description","Inherit from workspace where the repo supports it","Review Cargo.toml diffs for deleted metadata fields"],"tags":["cargo","cargo-toml","missing-field","ci"],"backgroundTag":"missing-required-config-field","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}