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

feat(core,linux,developer,windows): implement loading KMX from blob 🍒 #12721

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

ermshiperete
Copy link
Contributor

@ermshiperete ermshiperete commented Nov 27, 2024

This is a cherry-pick from epic/web-core of the new Core API for loading a KMX keyboard from a blob so that it can be included in Keyman 18.

  • split keyboard loading into loading KMX file into blob and then
    loading the keyboard processor from the blob.
  • move file access next to deprecated method. This is now the only place
    that loads a file in Core; unit tests have some more places that
    load files.
  • introduce GTest and add unit tests for loading from blob
  • implement loading from blob on Linux and Developer

Cherry-picked from epic/web-core branch.

Cherry-Pick-Commit: 1deaa32
Cherry-Pick-Commit: 59019cc
Cherry-Pick-Commit: bc46458
Cherry-Pick-Commit: d06aa29
Cherry-Pick-Commit: 1c88166
Cherry-Pick-Commit: 069cd21
Cherry-Pick-Commit: 052ae2e
Cherry-Pick-Commit: 11a2a3b

Part-of: #11293
Part-of: #8093

Fixes: #12498
Cherry-pick: #12683

Fixes: #12690
Cherry-pick: #12711

Fixes: #12500
Cherry-pick: #12684

@keymanapp-test-bot skip

ermshiperete and others added 3 commits November 27, 2024 15:30
- split keyboard loading into loading KMX file into blob and then
  loading the keyboard processor from the blob.
- deprecate `km_core_keyboard_load`
- move file access next to deprecated method. This is now the only place
  that loads a file in Core; unit tests have some more places that
  load files.
- introduce GTest and add unit tests for loading from blob

Cherry-picked from `epic/web-core` branch.

Cherry-Pick-Commit: 1deaa32
Cherry-Pick-Commit: 59019cc
Cherry-Pick-Commit: bc46458
Cherry-Pick-Commit: d06aa29
Cherry-Pick-Commit: 1c88166
Cherry-Pick-Commit: 069cd21
Cherry-Pick-Commit: 052ae2e
Cherry-Pick-Commit: 11a2a3b

Part-of: #11293
Part-of: #8093
Replaces `km_core_keyboard_load` with `km_core_keyboard_load_from_blob`.

Fixes: #12690
Cherry-pick: #12711
@keymanapp-test-bot keymanapp-test-bot bot added the user-test-missing User tests have not yet been defined for the PR label Nov 27, 2024
@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S16 milestone Nov 27, 2024
@ermshiperete ermshiperete changed the title feat(core,linux,developer): implement loading KMX from blob feat(core,linux,developer): implement loading KMX from blob 🍒 Nov 27, 2024
@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-missing User tests have not yet been defined for the PR label Nov 27, 2024
@mcdurdin
Copy link
Member

Will you cherry-pick Windows as well? #12684 (7b96e29 f3e5c1b 5fd2b1a adf2313)

@mcdurdin mcdurdin self-assigned this Nov 28, 2024
@github-actions github-actions bot added windows/ windows/engine/ cherry-pick Change already merged into another (stable) branch labels Nov 28, 2024
@ermshiperete ermshiperete changed the title feat(core,linux,developer): implement loading KMX from blob 🍒 feat(core,linux,developer,windows): implement loading KMX from blob 🍒 Nov 28, 2024
@ermshiperete
Copy link
Contributor Author

Done

Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We'll need to do at least one more cherry-pick for mac engine when that is done.

Copy link
Contributor

@rc-swag rc-swag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ermshiperete ermshiperete merged commit b8c120d into master Nov 29, 2024
20 checks passed
@ermshiperete ermshiperete deleted the chore/core/cherry-pick/load-from-blob-api branch November 29, 2024 11:40
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.148-alpha

Comment on lines 37 to 39
static bool is_kmxplus_file(
path const & kb_path,
std::vector<uint8_t>& data
const std::vector<uint8_t> & data
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: the declaration here was left even though the implementation is gone - I'll fix it in #12644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants