You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While diagnosing #12985, which involves the sil_greek_polytonic keyboard, I noticed that certain rules weren't firing when expected. After digging down into things, it appears that Web does not currently handle rules of the following form correctly:
nul ______ + [ key ] > c anything
Rules that are of this form, however, are fine:
nul + [ key ] > c anything
Checking into our repo's history... this has likely been in place since 10.0 and is due to the following sections of code:
In both cases, should a context containing non-nul components have slots containing nul at their head... it just... chops it off, causing a misalignment for the method designed to match that context in a rule. I'm the original author of the block, to be sure... but at this point, I have no idea why it's there. To be safe, I ran our existing unit test suite against a version of Web with this block removed (no other changes)... and all the unit tests passed. Why is it there? Note that this approach was enough to allow for an easy repro of #12985 as well.
Not yet done - adding more unit tests to validate rules of the first form listed above; we want a clear "before and after" picture for this and any related changes.
The text was updated successfully, but these errors were encountered:
Yes, I have also reproduced this. It is exacerbated by the #12985 bug in the compiler, because that was producing incorrect indices, masking this issue somewhat in the sil_greek_polytonic keyboard.
Looking at the commit history, it underscores the need for detailed commit comments that explain rationale. Let's do better in the future!
While diagnosing #12985, which involves the
sil_greek_polytonic
keyboard, I noticed that certain rules weren't firing when expected. After digging down into things, it appears that Web does not currently handle rules of the following form correctly:Rules that are of this form, however, are fine:
Checking into our repo's history... this has likely been in place since 10.0 and is due to the following sections of code:
keyman/web/src/engine/js-processor/src/kbdInterface.ts
Lines 376 to 381 in b4e8912
keyman/web/source/kmwcallback.ts
Lines 389 to 394 in c5f120e
In both cases, should a context containing non-
nul
components have slots containingnul
at their head... it just... chops it off, causing a misalignment for the method designed to match that context in a rule. I'm the original author of the block, to be sure... but at this point, I have no idea why it's there. To be safe, I ran our existing unit test suite against a version of Web with this block removed (no other changes)... and all the unit tests passed. Why is it there? Note that this approach was enough to allow for an easy repro of #12985 as well.Not yet done - adding more unit tests to validate rules of the first form listed above; we want a clear "before and after" picture for this and any related changes.
The text was updated successfully, but these errors were encountered: