Open rntz opened 1 year ago
more specific link to where it happened:
I'm on the fence about how much of a Talon bug this is. For "error 1", ctx matches in general are currently allowed to match whatever text you want. I may be able to add a warning for missing tags and modes. We don't know which tags are missing at context creation time, but we can probably check it each time we evaluate which contexts are active.
As for "error 2", that's a tricky situation. We can't warn immediately upon loading a context that the action isn't defined, because there's a pretty good chance the module hasn't been loaded yet. So right now we just warn if the action is ever made active.
undeclared.py
This produces no errors or warnings in the log. It should produce two:
tag: nonexistent_tag
inctx.matches
is a reference to an undeclared tag.def undeclared_action
inCtxActions
is a reference to an undeclared action.If you fix the first issue, eg. replacing
tag: nonexistent_tag
withos: linux
, then the warning message for the second appears.This occurred in the wild during a PR to knausj, https://github.com/knausj85/knausj_talon/pull/956.