CI: fail on Slint warnings when building examples

This commit is contained in:
Olivier Goffart 2025-07-04 16:14:59 +02:00
parent 0506042f52
commit c527cc1461
2 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,7 @@ concurrency:
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
SLINT_COMPILER_DENY_WARNINGS: 1
jobs:
files-changed:

View file

@ -484,7 +484,9 @@ pub fn compile_with_output_path(
let (doc, diag, loader) =
spin_on::spin_on(i_slint_compiler::compile_syntax_node(syntax_node, diag, compiler_config));
if diag.has_errors() {
if diag.has_errors()
|| (!diag.is_empty() && std::env::var("SLINT_COMPILER_DENY_WARNINGS").is_ok())
{
let vec = diag.to_string_vec();
diag.print();
return Err(CompileError::CompileError(vec));