Camkes Next: Silently ignores string attribute
Opened this issue · 2 comments
Previously in Camkes you could specify an attribute as a string:
dispatch_periodic_inst.timer_attributes = "10";
In Camkes Next, this declaration is ignored and the attribute is treated as 0. I understand I should instead use
dispatch_periodic_inst.timer_attributes = 10;
But it would be much nicer if Camkes Next would give an error message about the first version instead of silently ignoring it.
See:
https://github.com/seL4/camkes-tool/blob/next/camkes/templates/rpc-connector-common-from.c#L43
https://github.com/seL4/camkes-tool/blob/next/camkes/templates/rpc-connector-common-from.c#L67
I'm modifying the rpc-connector-common template fragment to sanity check this attribute. Addressing the greater issue of attributes not being type-checked will be more complicated, as it's up to the templates to use attributes however they wish. We could possibly force template code to specify type rules when accessing attribute values.