gtk4-rs icon indicating copy to clipboard operation
gtk4-rs copied to clipboard

Check errors with derive macro attributes

Open piegamesde opened this issue 3 years ago • 2 comments

Bug description

The CompositeTemplate macro (and probably others too) currently do not sufficiently check the validity of present attributes. So instead of getting a compile error, things will silently fail.

#[derive(CompositeTemplate, Default)]
#[template(file = "../../res/window.ui")]
pub struct CustomWidget {
	#[template]
    header: adw::HeaderBar,
}

piegamesde avatar Apr 03 '22 14:04 piegamesde

CC @jf2048

sdroege avatar Apr 04 '22 06:04 sdroege

I am currently working on another library for parsing these attributes that does a lot more validations, would like to switch everything over to that eventually so we can get rid of attribute_parser

jf2048 avatar Dec 13 '22 01:12 jf2048