Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ileben opened this issue Jul 12, 2020 · 2 comments
Open
Labels
New Feature A new feature that is not currently implemented.

Comments

@ileben
Copy link

ileben commented Jul 12, 2020

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.

@LexiconCode LexiconCode added the New Feature A new feature that is not currently implemented. label Jul 13, 2020
@kendonB
Copy link
Collaborator

kendonB commented Nov 8, 2020

@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?

@LexiconCode
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature A new feature that is not currently implemented.
Projects
None yet
Development

No branches or pull requests

3 participants