{"record":{"id":"60f95702f8323c89","repo":"slint-ui/slint","slug":"can-t-load-palette","errorCode":null,"errorMessage":"can't load palette","messagePattern":"can't load palette","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/passes.rs","lineNumber":106,"sourceCode":"        // Ignore import errors\n        let mut build_diags_to_ignore = crate::diagnostics::BuildDiagnostics::default();\n        // Import from style-base.slint instead of std-widgets.slint to avoid loading\n        // the entire widget library just to get Palette.\n        type_loader\n            .import_component(\"style-base.slint\", \"Palette\", &mut build_diags_to_ignore)\n            .await\n            .unwrap_or_else(|| panic!(\"can't load palette\"))\n    };\n\n    let global_type_registry = type_loader.global_type_registry.clone();\n    // The shared symbol-name counters, handed to the passes that generate names.\n    let symbol_counters = type_loader.symbol_counters.clone();\n\n    run_import_passes(doc, type_loader, diag);\n    check_public_api::check_public_api(doc, &type_loader.compiler_config, diag);\n\n    let raw_type_loader =\n        keep_raw.then(|| crate::typeloader::snapshot_with_extra_doc(type_loader, doc).unwrap());\n\n    let mut forwarded_references =\n        crate::object_tree::forward_inherited_expression::ForwardedReferenceCache::default();\n\n    // Inject debug hooks early — before any lowering or inlining — so source element identity\n    // is preserved and hooks can be attributed to the correct source location.\n    if let Some(random_state) = &type_loader.compiler_config.debug_hooks {\n        let root_components = doc.exported_roots().collect::<Vec<_>>();\n        inject_debug_hooks::inject_debug_hooks(\n            &root_components,\n            random_state,\n            &symbol_counters,\n            &mut forwarded_references,\n        );\n    }\n\n    collect_libraries::collect_libraries(doc);\n    collect_subcomponents::collect_subcomponents(doc);","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/compiler/passes.rs#L88-L124","documentation":"Error \"can't load palette\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/compiler/passes.rs:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the selected style's palette definition is present in the compiler resources.","Pick a supported style via the style option."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":"2026-08-19T23:23:16.610Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}