Caster icon indicating copy to clipboard operation
Caster copied to clipboard

Loading of top-level rules other than MappingRule from the user directory

Open ileben opened this issue 4 years ago • 2 comments

Caster currently complains and ignores a rule returned from the get_rule function, unless it is a subclass of MappingRule.

CompoundRule is really useful as a top-level rule when constructing nested rule references such as the following example. _spelling.txt

I would like to be able to have a top-level CompoundRule loaded from the user directory, to keep such custom rules neatly separated from the caster source code directory, while retaining the functionality such as hot-reloading, enabling/disabling via voice commands, etc.

ileben avatar Jul 12 '20 05:07 ileben

@LexiconCode Is there anything fundamental about caster that requires MappingRules to be the only type of dragonfly rule? Or could we just change the validation checkers?

kendonB avatar Nov 08 '20 04:11 kendonB

@LexiconCode Is there anything fundamental about caster that requires MappingRules to be the only type of dragonfly rule? Or could we just change the validation checkers?

I imagine it would take more than just simply bypass the validator's especially if CCR is involved. Being able to load dragonfly grammars like _spelling.py from the user directory would be an alternative method.

LexiconCode avatar Jun 04 '21 20:06 LexiconCode