{"record":{"id":"d2e6ebc9e5d1833d","repo":"slint-ui/slint","slug":"slint-inlining-has-incorrect-value-must-be-either","errorCode":null,"errorMessage":"SLINT_INLINING has incorrect value. Must be either unset, 'true' or 'false'","messagePattern":"SLINT_INLINING has incorrect value\\. Must be either unset, 'true' or 'false'","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/lib.rs","lineNumber":265,"sourceCode":"            let var = var.parse::<bool>().unwrap_or_else(|_|{\n                panic!(\"SLINT_EMBED_RESOURCES has incorrect value. Must be either unset, 'true' or 'false'\")\n            });\n            match var {\n                true => EmbedResourcesKind::EmbedAllResources,\n                false => EmbedResourcesKind::OnlyBuiltinResources,\n            }\n        } else {\n            match output_format {\n                #[cfg(feature = \"rust\")]\n                OutputFormat::Rust => EmbedResourcesKind::EmbedAllResources,\n                OutputFormat::Interpreter => EmbedResourcesKind::Nothing,\n                _ => EmbedResourcesKind::OnlyBuiltinResources,\n            }\n        };\n\n        let inline_all_elements = match std::env::var(\"SLINT_INLINING\") {\n            Ok(var) => var.parse::<bool>().unwrap_or_else(|_| {\n                panic!(\n                    \"SLINT_INLINING has incorrect value. Must be either unset, 'true' or 'false'\"\n                )\n            }),\n            // Currently, the interpreter needs the inlining to be on.\n            Err(_) => output_format == OutputFormat::Interpreter,\n        };\n\n        // The Slint SC generator flattens the exported component's element\n        // tree, so user-defined components must be inlined away. This\n        // overrides a SLINT_INLINING=false env override.\n        #[cfg(feature = \"slint-sc\")]\n        let inline_all_elements =\n            inline_all_elements || matches!(output_format, OutputFormat::SlintSc);\n\n        let const_scale_factor = std::env::var(\"SLINT_SCALE_FACTOR\")\n            .ok()\n            .and_then(|x| x.parse::<f32>().ok())\n            .filter(|f| *f > 0.);","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/compiler/lib.rs#L247-L283","documentation":"CompilerConfiguration::new parses the SLINT_INLINING environment variable as a boolean; any value other than 'true' or 'false' causes parse::<bool>() to fail and panic. The variable forces element inlining on/off during compilation; when unset, inlining defaults to on for the Interpreter output format.","triggerScenarios":"Setting SLINT_INLINING to a non-boolean value (e.g. '1', 'yes', 'True') in the environment before constructing a CompilerConfiguration.","commonSituations":"Shell scripts exporting SLINT_INLINING=1 assuming numeric booleans; misconfigured CI environments shared with SLINT_EMBED_RESOURCES.","solutions":["Set SLINT_INLINING to exactly `true` or `false` (lowercase)","Unset SLINT_INLINING to use the default (enabled for Interpreter output format, disabled otherwise)","Check build scripts/CI env exports for stray boolean formatting"],"exampleFix":"// before\nexport SLINT_INLINING=yes\n// after\nexport SLINT_INLINING=false","handlingStrategy":"validation","validationCode":"if let Some(v) = std::env::var(\"SLINT_INLINING\").ok() {\n    assert!(matches!(v.as_str(), \"true\" | \"false\"), \"SLINT_INLINING must be 'true' or 'false', got {v:?}\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use lowercase 'true'/'false' when exporting SLINT_INLINING","Audit shared env setup scripts that export multiple SLINT_* variables","Unset instead of setting falsy non-boolean values"],"tags":["env-var","configuration","parsing"],"backgroundTag":"invalid-env-var-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"}