fix(derive): keep components incremental

Let #[slhx::component] preserve inline modules when generated symbols are absent, while still enforcing handler completeness when slhx.syms exists.

req: component/005

req: test/002
This commit is contained in:
slhx agent
2026-05-25 22:33:56 +02:00
parent d223a1d215
commit 102e3247bc
2 changed files with 13 additions and 15 deletions
+11 -1
View File
@@ -1,4 +1,9 @@
use slhx_derive::surface;
use slhx_derive::{component, surface};
#[component]
mod local_component {
pub const EXISTING: u8 = 1;
}
#[surface]
mod ui {
@@ -9,3 +14,8 @@ mod ui {
fn surface_macro_preserves_inline_module_with_generated_file() {
assert_eq!(ui::EXISTING, 1);
}
#[test]
fn component_macro_preserves_inline_module_without_generated_symbols() {
assert_eq!(local_component::EXISTING, 1);
}