-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
fix(developer): correct whitespace handling in virtual keys and remove partially implemented virtual key series in kmcmplib compiler #12604
fix(developer): correct whitespace handling in virtual keys and remove partially implemented virtual key series in kmcmplib compiler #12604
Conversation
…odifiers and modifier(s) and key
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Ready to review I have tried to keep to the original style, but I have tidied up the layout a bit. |
Note: we should run this change against the keyboards repository to see if any existing keyboards are impacted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice cleanup of some very tired code. Appreciate you treading carefully and matching existing style even though it must have hurt at times 😁
I ran it against Windows |
Yes, that should do the job I think -- so long as you saw many hundreds of keyboard names scrolling by then I think it should have worked. I haven't run that test for a while (need to add it into an overnight test suite at some point) |
…ect-whitespace-handling-in-virtual-keys
With the full_test option is defaulted to true (in kmcmplib/meson_options.txt), it is possible to run the full test without fix #12631 Line 24 of If a space is added at the appropriate points ( |
So for basic_kbdolch, we should open a PR on the keyboards repo which:
It's a good idea to reference this PR in the commit to keyboards repo ( |
However, although There is a file |
Ah yes, sorry. See #12634 for a chore to update to a later version of the keyboards. Delayed this until 19.0 because it requires careful inspection to ensure that we don't accidentally propagate broken keyboard tests. The original purpose of this test was to ensure that the new 17.0 kmcmplib compiler rewrite did not diverge from the legacy 16.0 kmcmpdll compiler, so it is comparing against fixtures compiled with the 16.0 kmcmpdll compiler. (So we'd need to rebuild all the fixtures with the legacy compiler, at least those that are not using 17.0 features, etc.) We may want to, at some point, consider another test for 'can we compile all current keyboards in master on keyboards repo', but that's not a really a reproducible test given it is a moving target. Given all that, I think we add basic_kbdcherp and basic_kbdolch to the list of keyboards to skip testing for at present, like we did in #12631 for anii, sil_kmhmu, fv_statimcets, and fv_nuucaanul. See get-test-source.sh change in https://github.com/keymanapp/keyman/pull/12631/files#diff-35a7922a6e67f3fe139e97df293d2b55d6bd00867c864c2cb6ab513126b2dea3R12 |
…dling-in-virtual-keys-and-remove-partially-implemented-virtual-key-series
#12631 is now merged; I have updated this branch to pull changes and rebuild. |
…ect-whitespace-handling-in-virtual-keys
…ect-whitespace-handling-in-virtual-keys
Re-review, as it is now three weeks since approval. Changes here are just exclusion of the two errored keyboards in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM also |
Changes in this pull request will be available for download in Keyman version 18.0.144-alpha |
Fix to the virtual key section of
GetXStringImpl()
inCompiler.cpp
ofkmcmplib
to correct the whitespace handling (whitespaces were not previously required between modifiers or between modifiers and virtual keys), as well as to remove the partially implemented virtual key series code (multiple keys).Additional test cases were added to
gtest-compiler-test.cpp
.Note: the following keyboards are excluded because the snapshot versions have issues that the compiler now flags:
basic_kbdcherp
: contains[NCAPS SHIFT_K_P]
, which should not compile (fixed in [basic_targets] Update basic keyboards to include true tablet layout #3056)basic_kbdolch
: contains[SHIFTK_K]
, which should not compile (fixed in Correct whitespace error in symbols_key store for basic_kbdolch #3212)See developer/src/kmcmplib/tests/get-test-source.sh
These keyboards could be included again if we update the snapshot to a later version -- but that requires a rebuild of the fixture expected keyboards with v16.0 compiler, so will necessarily exclude other keyboards which are now v17+.
Fixes: #12307
@keymanapp-test-bot skip