{"record":{"id":"5a453a8c4a5447ec","repo":"slint-ui/slint","slug":"incorrect-workspace-found-expected-true-found-false","errorCode":null,"errorMessage":"Incorrect {}.workspace found: expected true, found false","messagePattern":"Incorrect (.+?)\\.workspace found: expected true, found false","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/src/license_headers_check.rs","lineNumber":875,"sourceCode":"            Some(field_value) => {\n                match field_value.get(\"workspace\").and_then(|v| v.as_bool()) {\n                    Some(true) if is_workspace => {\n                        return Err(anyhow!(\n                            \"Using workspace {}.workspace = true in workspace\",\n                            field\n                        ));\n                    }\n                    Some(true) => { /* nothing to do */ }\n                    Some(false) => {\n                        if fix_it {\n                            eprintln!(\n                                \"Fixing up {:?} as instructed. It has {field}.workspace = false\",\n                                self.path\n                            );\n                            self.doc[\"package\"][field][\"workspace\"] = toml_edit::value(true);\n                            self.edited = true;\n                        } else {\n                            return Err(anyhow!(\n                                \"Incorrect {}.workspace found: expected true, found false\",\n                                field,\n                            ));\n                        }\n                    }\n                    None => match field_value.as_str() {\n                        Some(text) => {\n                            if text != expected_str {\n                                if fix_it {\n                                    eprintln!(\n                                        \"Fixing up {:?} as instructed. It has unexpected data in {field}.\",\n                                        self.path\n                                    );\n                                    self.doc[\"package\"][field] = toml_edit::value(expected_str);\n                                    self.edited = true;\n                                } else {\n                                    return Err(anyhow!(\n                                        \"Incorrect {}. Found {} expected {}\",","sourceCodeStart":857,"sourceCodeEnd":893,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/xtask/src/license_headers_check.rs#L857-L893","documentation":"check_and_fix_package_string_field found a member crate manifest where `field.workspace = false`, but this repository requires every member to inherit that field from [workspace.package] (workspace = true). Unless --fix mode rewrites it to true, the check fails because the crate's field does not follow the workspace inheritance policy.","triggerScenarios":"A member (non-workspace) Cargo.toml declares field = { workspace = false } (or a boolean false) in its [package] section, and the check runs without fix_it set, so the `Incorrect {field}.workspace found: expected true, found false` error is returned.","commonSituations":"A crate was added with explicitly written version/license instead of inheriting; tooling or a merge downgraded `workspace = true` to false; a crate deliberately opted out of inheritance after the workspace standardized on inherited fields.","solutions":["Run the xtask check in fix mode (e.g. `cargo xtask license-header --fix` style invocation) so it rewrites field.workspace to true automatically.","Manually change the member's [package] field to `field = { workspace = true }` and confirm the inherited value from [workspace.package] is what you want.","Remove the explicit field table and rely on inheritance entirely if the crate should share the workspace value.","If the crate genuinely must not inherit, coordinate the exception in the check configuration instead of leaving workspace = false."],"exampleFix":"// before: member Cargo.toml\n[package]\nname = \"my-crate\"\nversion = { workspace = false }\n\n// after\n[package]\nname = \"my-crate\"\nversion = { workspace = true }\n# or simply delete the field so it inherits [workspace.package].version","handlingStrategy":"validation","validationCode":"fn member_inherits(doc: &toml_edit::DocumentMut, field: &str) -> bool {\n    doc.as_table().get(\"package\")\n        .and_then(|p| p.get(field))\n        .and_then(|f| f.get(\"workspace\")).and_then(|v| v.as_bool())\n        .unwrap_or(true) // absent flag with concrete string value is a different path\n}","typeGuard":null,"tryCatchPattern":"match cargo xtask-check --fix output {\n    // run fix mode first; only if it still reports 'Incorrect {field}.workspace found', inspect manually\n    _ => {}\n}","preventionTips":["New member crates should inherit version/license via field = { workspace = true } from day one.","Run the xtask check with --fix before committing so false flags are rewritten automatically.","Watch merges that flip workspace = true to false; treat such diffs as review blockers.","Keep a CI job running the check in non-fix mode to catch regressions."],"tags":["cargo","toml","workspace-inheritance","config","xtask"],"backgroundTag":"invalid-config-value","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"}