Skip to content

Commit

Permalink
errors: improve error messages for cxx_file_stem and multiple dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahayzen-kdab committed Sep 5, 2024
1 parent 9fe8898 commit 64bc715
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/cxx-qt-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,11 @@ impl CxxQtBuilder {
})
.collect::<HashSet<String>>();
if dirs.len() > 1 {
panic!("Only one directory is support per QmlModule for rust_files");
panic!(
"Only one directory is supported per QmlModule for rust_files.\n\
This is due to Qt bug https://bugreports.qt.io/browse/QTBUG-93443\n\
Found directories: {dirs:?}"
);
}

for files in generate_cxxqt_cpp_files(
Expand Down
2 changes: 1 addition & 1 deletion crates/cxx-qt-gen/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Parser {
} else if name_value.path.is_ident("cxx_file_stem") {
return Err(Error::new(
meta.span(),
"cxx_file_stem is unsupported: TODO new system message",
"cxx_file_stem is unsupported, instead the input file name will be used",
));
}
}
Expand Down

0 comments on commit 64bc715

Please sign in to comment.