Commit graph

390 commits

Author SHA1 Message Date
Steven R. Loomis
6d2ae221af chore(core,developer,resources): ldml update out of techpreview 🙀
- further fixes
2024-03-04 08:21:45 -06:00
Steven R. Loomis
17a653fa19 chore(core): ldml update out of techpreview 🙀
- updates to support techpreview -> 45
- test changes

Fixes: #10900
2024-03-02 22:40:39 -06:00
Steven R. Loomis
209717a24a chore(core,developer): rename unicodeSet to uset in xml
chore(developer): rename unicodeSet to uset 🙀  #10657
2024-02-27 18:11:18 -06:00
Steven R. Loomis
b1d74ce809 chore(core): describe what is being tested in each stage
Fixes: #10505
2024-02-22 16:19:21 -06:00
Steven R. Loomis
993f5252e9 chore(core): describe what is being tested in each stage
Fixes: #10505
2024-02-22 13:15:46 -06:00
Steven R. Loomis
9ef198ff19 chore(core): update sample ldml keyboard
Fixes: #10505
2024-02-20 12:47:25 -06:00
Steven R. Loomis
746af68afa chore(core): shuffle transform matcher. re-enable failing case
For #10736
2024-02-16 12:49:19 -06:00
Steven R. Loomis
503f196e42 chore(core): update test case with TODO for known issue
For #10734
2024-02-15 16:27:26 -06:00
Steven R. Loomis
e7b31113a3 chore(core): remove obsolete TODOs. Temporary change to test.
- TODO: 10734 There's a bug in the matching still. Come back and fix this, but the crasher is fixed.

For #10734
2024-02-15 16:21:53 -06:00
Steven R. Loomis
e099ffa3a1 chore(core): update ldml_test
- includes crasher from #10734

For #10505
2024-02-15 15:26:09 -06:00
Steven R. Loomis
5f01fca679 chore(core): create sample LDML keyboard that exercises effectively all functionality
- test keyboard was wrong

For #10505
2024-02-15 14:26:44 -06:00
Steven R. Loomis
e415f411e4 chore(core): create sample LDML keyboard that exercises effectively all functionality
- add some more functionality

For #10505
2024-02-15 14:26:44 -06:00
Steven R. Loomis
701291a7f7 chore(core): create sample LDML keyboard that exercises effectively all functionality
For #10505
2024-02-15 14:26:44 -06:00
Marc Durdin
64daa6182b
Merge pull request #10618 from keymanapp/fix/core/10615-10616-10617-core-surrogates-and-app-context-markers-and-memory-leak
fix(core): surrogate handling, markers in app context, and memory leak
2024-02-07 14:43:12 +11:00
Marc Durdin
bcc18bfe8d
Merge pull request #10607 from keymanapp/fix/core/10605-app-context-copy-strip-markers
fix(core): strip markers in `actions_update_app_context_nfu()`
2024-02-07 14:43:01 +11:00
Marc Durdin
6c4d5ff7fa
Merge pull request #10585 from keymanapp/fix/core/10582-km_core_state_get_actions-idempotency
fix(core): make `km_core_state_get_actions()` idempotent
2024-02-07 14:42:50 +11:00
Marc Durdin
0cc6901085
Merge branch 'fix/core/10605-app-context-copy-strip-markers' into fix/core/10615-10616-10617-core-surrogates-and-app-context-markers-and-memory-leak 2024-02-07 12:33:33 +11:00
Marc Durdin
c807415563
chore: Apply suggestions from code review
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2024-02-07 12:20:56 +11:00
Marc Durdin
fe8eba176c
Merge branch 'fix/core/10605-app-context-copy-strip-markers' into fix/core/10615-10616-10617-core-surrogates-and-app-context-markers-and-memory-leak 2024-02-05 13:45:03 +11:00
Marc Durdin
49eb6f42a9
Merge branch 'fix/core/10582-km_core_state_get_actions-idempotency' into fix/core/10605-app-context-copy-strip-markers 2024-02-05 13:44:56 +11:00
Marc Durdin
70ba1d1c1e
Merge branch 'chore/core/10520-hide-old-action-apis' into fix/core/10582-km_core_state_get_actions-idempotency 2024-02-05 13:44:47 +11:00
Marc Durdin
9ba919c2a9 fix(core): surrogate handling, markers in app context, and memory leak
Fixes #10615 (surrogate handling, km_core_state_context_set_if_needed).
Fixes #10616 (markers in app context, in unit tests)
Fixes #10617 (memory leak in replace_context).

The surrogate handling and markers in app context bugs were quite
tangled, so opted to fix those both together in one commit. The memory
leak was spotted while verifying the changes for surrogate handling.

Surrogates were not handled in is_context_unchanged, and opted to
refactor to work directly with km_core_context_item arrays rather than
continue with the string-based comparison, for simplicity.

While writing the corresponding unit tests, realised that the
app_context checks were incorrect in a number of existing tests, and so
fixed up the existing tests at the same time as writing up the new
tests. The only changes to core for this were to add assertions for the
app_context to ensure that markers are not inadvertently added.
2024-02-03 09:16:16 +07:00
Marc Durdin
9e50f50687 fix(core): strip markers in actions_update_app_context_nfu()
Fixes #10605.
2024-02-02 15:10:05 +07:00
Steven R. Loomis
3a538c103f feat(developer): support normalization=disabled 🙀
- test and code fixes

#10554
2024-02-01 18:40:02 -06:00
Steven R. Loomis
7572c9476e feat(developer): support normalization=disabled 🙀
- main core changes and test changes

#10554
2024-02-01 17:32:42 -06:00
Marc Durdin
aad7c0a42b chore(core): fixup typos 2024-02-01 15:05:24 +07:00
Steven R. Loomis
9120bb4c87 feat(core,developer): normalization=disabled 🙀
- failing tests and initial work

#10554
2024-01-31 22:38:06 -06:00
Marc Durdin
1b88ab99be fix(core): make km_core_state_get_actions() idempotent
Fixes #10582.

Returned struct from the `km_core_state_get_actions()` API is now owned
by the state object. This is a change in API contract. The corresponding
`km_core_actions_dispose()` API has been made private, because there is
never any need for API consumers to call it. As this change is happening
in alpha, we won't bump the ABI version.

`state->app_context` is now guaranteed to be in sync with
`state->context` after `km_core_process_event()`, with the actions
struct populated at that point.

The next and final step in this refactor is to remove the actions queue
altogether from the Core and make that a kmn-only concept, but that will
wait until 18.0. The only consumers of the actions queue are the
kmn-specific interactive debugger in Keyman Developer, and kmn-specific
Input Method eXtensions in Keyman Engine for Windows.
2024-02-01 11:28:08 +07:00
Steven R. Loomis
687e50557f feat(core): add some C++ side tests 🙀
- add more test cases from @jahorton

#10317
2024-01-31 18:14:01 -06:00
Steven R. Loomis
600fdcc2c8 feat(core): double markers once again 🙀
- C++ side passes

Fixes: #10516
2024-01-31 18:05:53 -06:00
Steven R. Loomis
2891d19d88 feat(core): double markers once again 🙀
- C++ side

Fixes: #10516
2024-01-31 18:05:53 -06:00
Steven R. Loomis
b429dc3383 feat(core): markers and reorder 🙀
- reorders don't interact with markers, but must transit them
- add updated tests
- simplify reorder_group::apply(): the 'common prefix' discussion
was out-of-date as std::mismatch is handled by the ldml_processor
and the core context.
- add_back_markers() promoted to SPI so it can be called from reordering.

Fixes: #10516
2024-01-31 17:44:21 -06:00
Marc Durdin
f546c44048
Merge pull request #10390 from keymanapp/epic/core/9999-normalization
epic: Keyman Core normalization 🌱
2024-01-31 10:45:51 +11:00
Marc Durdin
4c95fef55a
Merge pull request #10533 from keymanapp/feat/core/10530-actions-deleted-context
feat(core): add `deleted_context` to `km_core_actions` struct 🌱
2024-01-30 11:46:10 +11:00
Steven R. Loomis
5ce6490a1f feat(developer): dev side norm 🙀
- repertoire test needed normalization also

For: #10317
2024-01-29 09:31:48 -06:00
Eberhard Beilharz
2ebca107e0
chore(core): Fix build failures 2024-01-29 12:17:27 +01:00
Eberhard Beilharz
5404c02315
chore(core): Merge remote-tracking branch 'origin/epic/core/9999-normalization' into fix/core/10100-ContextNuances
# Conflicts:
#	core/tests/unit/kmnkbd/state_context_api.cpp
2024-01-29 12:05:17 +01:00
Marc Durdin
8501f2aa6d feat(core): add deleted_context to km_core_actions struct
Fixes #10530.

Adds the deleted_context member to the km_core_actions struct, and
associated unit tests. Simplifies integration by providing the consumer
with all the data they need in order to execute the transform,
specifically around number of delete operations required, without
needing to query the target application context again. The number of
delete operations will vary according to application compliance and
selected encoding; for example a UTF-16 string may require 2
delete-backs for surrogate pairs in the text buffer for a compliant app,
whereas there will be a single delete-back key event for a non-compliant
app.

The deleted_context member should also be used for debug assertions.
2024-01-29 13:21:25 +07:00
Steven R. Loomis
4108ecd298 feat(core): ldml marker normalization fix 🙀
- decomp the 'glued' char before storing in map

For: #10516
2024-01-25 17:45:59 -06:00
Marc Durdin
41cc2f4d1e feat(developer): make context_get and context_length public again
Rolls back the privatisation of the km_core_context_get and
km_core_context_length APIs because the debugger uses them.
2024-01-26 06:37:09 +07:00
Marc Durdin
c5e9a8ce35
Merge branch 'refactor/developer/10214-debugger-app-context' into feat/developer/10416-10458-ldml-debugger-markers 2024-01-26 09:50:06 +11:00
Marc Durdin
4906545e31
Merge branch 'epic/core/9999-normalization' into refactor/core/10431-remove-unused-core-context-apis 2024-01-24 12:14:11 +11:00
Marc Durdin
fa39ae0b22 chore(core): fixup types on unit test 2024-01-23 13:12:47 +07:00
Marc Durdin
39b64be67a refactor(developer): use km_core_state_get_actions for LDML keyboard debugger
Relates to #10416.

Moves from using action queue to action struct for the LDML keyboard
debugger. Does not do the same for the KMX keyboard debugger, because
that relies on action items to do single-step debugging.
2024-01-23 12:42:27 +07:00
Steven R. Loomis
aecf4e4552
Update core/tests/unit/kmnkbd/test_actions_normalize.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-01-22 16:47:28 -06:00
Steven R. Loomis
c3bae838ec feat(developer): ldml marker normalization in ts 🙀
- use Intl.Segmenter instead.

For: #10317
2024-01-19 18:32:08 -06:00
Steven R. Loomis
72371675dd
Merge branch 'master' into feat/developer/10317-dev-nfd-epic-ldml 2024-01-19 18:01:38 -06:00
Steven R. Loomis
2bb4747c2f feat(developer): ldml marker normalization in ts 🙀
- add nfd table from ICU

For: #10317
2024-01-19 16:26:01 -06:00
Steven R. Loomis
ac315661ed feat(core): ldml actions: include what you use 🌱
- missed an include

For: #10410
2024-01-19 13:45:12 -06:00
Steven R. Loomis
259471408a feat(core): ldml actions: reinstate divergence test 🌱
- compare context to test context, but SKIPPING markers.

For: #10410
2024-01-19 11:43:33 -06:00