{"record":{"id":"d9aa519ac14e682f","repo":"slint-ui/slint","slug":"missing-license-symlink","errorCode":null,"errorMessage":"Missing LICENSE symlink {:?} -> {:?}","messagePattern":"Missing LICENSE symlink (.+?) -> (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/src/license_headers_check.rs","lineNumber":1147,"sourceCode":"                        target,\n                        expected_target\n                    ));\n                }\n            }\n\n            if self.fix_it {\n                eprintln!(\n                    \"Fixing up {:?} as instructed. Creating symlink -> {:?}.\",\n                    symlink_path, expected_target\n                );\n                #[cfg(unix)]\n                std::os::unix::fs::symlink(&expected_target, &symlink_path)\n                    .context(\"Failed to create LICENSE symlink\")?;\n                #[cfg(windows)]\n                std::os::windows::fs::symlink_file(&expected_target, &symlink_path)\n                    .context(\"Failed to create LICENSE symlink\")?;\n            } else {\n                return Err(anyhow!(\n                    \"Missing LICENSE symlink {:?} -> {:?}\",\n                    symlink_path,\n                    expected_target\n                ));\n            }\n        }\n\n        Ok(())\n    }\n\n    fn check_dependencies(&self, doc: &CargoToml, expected_version: &str) -> Result<()> {\n        let expected_version = format!(\"={expected_version}\");\n\n        for (dep_name, dep) in doc\n            .dependencies(\"dependencies\")\n            .iter()\n            .chain(doc.dependencies(\"build-dependencies\").iter())\n        {","sourceCodeStart":1129,"sourceCodeEnd":1165,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/xtask/src/license_headers_check.rs#L1129-L1165","documentation":"The license-header check expects every crate directory to contain a LICENSE symlink pointing at the repository's shared LICENSE file. When the symlink (or the checked symlink target) is absent and the check is not running in fix-up mode, it errors instead of silently creating files. This guarantees every published crate ships the correct license text.","triggerScenarios":"Adding a new crate directory without creating the LICENSE symlink; accidentally deleting the symlink; running the check on a checkout where symlinks were not materialized (e.g. git `core.symlinks=false` on Windows).","commonSituations":"Bootstrapping a new crate and forgetting the link; Windows checkouts without symlink support or developer mode enabled; CI containers checking out the repo with symlinks disabled; a `git clean -fd` that removed links.","solutions":["Create the missing symlink with the expected relative target: `ln -s ../../LICENSE <crate-dir>/LICENSE`.","Run the xtask task in fix-up mode so it creates the symlink automatically (`std::os::unix::fs::symlink` path above).","On Windows, enable Developer Mode / git `core.symlinks=true` and re-checkout so symlinks materialize, then re-run the check."],"exampleFix":"// before\ncrates/foo/   # no LICENSE\n// after\n$ ln -s ../../LICENSE crates/foo/LICENSE","handlingStrategy":"validation","validationCode":"if (!fs.lstatSync('crates/foo/LICENSE', { throwIfNoEntry: false })?.isSymbolicLink()) {\n  throw new Error('LICENSE symlink missing');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding a new crate, always add the LICENSE symlink in the same commit.","Enable symlink support (git core.symlinks=true, Windows Developer Mode).","Verify CI checkout preserves symlinks before running the check."],"tags":["licensing","symlink","ci","missing-file"],"backgroundTag":"file-not-found","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"}