Commit graph

19996 commits

Author SHA1 Message Date
Marc Durdin
c3ecae4e98 refactor(developer): rearrange kmcmplib interface source
Fixes #8889.

No code changes, just moves WASM interfaces into
CompilerInterfacesWasm.cpp, and CompileKeyboardHandle is renamed to
CompileKeyboardBuffer and moved into its own source file.
2023-06-01 05:29:19 +07:00
Marc Durdin
9d351f4798 chore(developer): verify kvks files and report errors
Fixes #8886.

.kvks compiler now returns helpful errors for xml parse failures and
schema validation errors, and for invalid virtual key codes. Introduces
extra infrastructure for reporting and unit testing messages to kmc-kmn.

This also fixes unhandled xml load exceptions and simplifies the error
reporting coming out of the kvks loader, on the basis that only one type
of error was being reported anyway.
2023-06-01 05:02:26 +07:00
Marc Durdin
e2930fa080 chore(developer): fix npm pack for kmc-ldml 2023-06-01 05:02:25 +07:00
Marc Durdin
6f4f20acb8 chore(developer): Add TODO issue numbers to PR 2023-06-01 05:02:24 +07:00
Marc Durdin
47c8a95fb0 refactor(developer): complete fs move out of kmcmplib
* Moves filesystem access out of kmcmplib into kmc-kmn
* Adds filesystem access callback to kmcmplib unit tests
* Cleans up callback interface through wasm
* Adds unit tests for various file load scenarios
* Removes nodefs dependency from kmcmplib wasm build, and removes
  corresponding path mappings which were previously required for wasm
  builds; note that these are still present for the unit tests for
  kmcmplib.
2023-06-01 05:02:23 +07:00
Marc Durdin
980b893644 refactor(developer): move fs for kmn load to caller 2023-06-01 05:02:22 +07:00
Marc Durdin
bb675730a2 fix(common): tweak pack/publish support for npm 9.5.1 and node 18.16.0
The npm version command started failing when we updated to node 18.16.0,
and it looks like it is related to the version numbers. This makes the
pack file mangling idempotent and applies it to all package.json files
in the repository.
2023-05-31 15:59:56 +07:00
Eberhard Beilharz
f711eaea8c
Merge pull request #8864 from keymanapp/chore/linux/8712_build.sh
chore(linux): Move build steps to build.sh
2023-05-31 08:16:34 +02:00
Marc Durdin
8edd656edb
Merge pull request #8874 from keymanapp/chore/developer/move-kb-repo-fixtures
chore(developer): move keyboard repo fixtures
2023-05-31 13:28:42 +10:00
Marc Durdin
92278250d5
Merge pull request #8870 from keymanapp/chore/developer/refactor-kmcmplib-interfaces
chore(developer): refactor kmcmplib interfaces
2023-05-31 13:28:30 +10:00
Marc Durdin
8b89ddca5a
Merge pull request #8857 from keymanapp/chore/developer/replace-cwrap-with-bind
chore(developer): replace cwrap wasm bindings
2023-05-31 13:28:21 +10:00
Eberhard Beilharz
c6f4541c83
feat(linux): Fix unit tests 2023-05-30 17:51:25 +02:00
Eberhard Beilharz
ccba767e2e
chore(linux): Allow to run tests when package building with sbuild 2023-05-30 17:51:25 +02:00
Eberhard Beilharz
fd562019dd
chore(linux): Use build.sh for Debian packaging 2023-05-30 17:51:24 +02:00
Eberhard Beilharz
9b4ca1aebd
chore(linux): Move build steps to build.sh
Closes #8712.
2023-05-30 09:25:27 +02:00
Marc Durdin
f36a908d94 chore(developer): move keyboard repo fixtures
Relocates the keyboard-repo fixtures so we can add other local fixtures
for unit tests.
2023-05-30 13:08:53 +07:00
Marc Durdin
05fe88bb3a chore(developer): remove usekmcmplib flag from kmcomp 2023-05-30 10:57:57 +07:00
Marc Durdin
d763cf315a chore(developer): refactor kmcmplib interfaces
Relates to #8493.

* Removes kmcmplib calls from kmcmpdll (now that we have kmc)
* Removes old kmcmp_CompileKeyboardFile and
  kmcmp_CompileKeyboardFileToBuffer functions in preference for a much
  cleaner kmcmp_CompileKeyboard function
* Removes json validation helper from kmcmplib (we'll use js-native
  json schema validation instead)

This change means that we no longer need to keep compfile.h consistent
between kmcmplib and kmcmpdll. This will simplify upcoming refactoring
of kmcmplib.

kmcmplib no longer writes files, but it does still read them. The next
refactor will move file load responsibility into the caller.
2023-05-30 08:14:23 +07:00
Keyman Server
733363a69d
Merge pull request #8865 from keymanapp/auto/version-master-17.0.114
auto: increment master version to 17.0.114
2023-05-27 01:02:54 +07:00
Keyman Build Agent
0b5e47cd93 auto: increment master version to 17.0.114 2023-05-26 14:02:19 -04:00
Marc Durdin
62b41d385c
Merge pull request #8856 from keymanapp/chore/developer/remove-seterror
chore(developer): remove SetError macro
2023-05-26 18:43:33 +10:00
Marc Durdin
18c4ac5bb2
Merge pull request #8850 from keymanapp/refactor/developer/wasm-compiler-interface
refactor(developer): compiler interface part 1 for wasm
2023-05-26 18:43:24 +10:00
Eberhard Beilharz
aa93e97e39
Merge pull request #8859 from keymanapp/fix/android/build.sh
fix(android): Fix typo in build-utils.sh
2023-05-26 10:20:06 +02:00
Eberhard Beilharz
31d0ac5765
Merge pull request #8860 from keymanapp/docs/android/doc
docs(android): Update documentation for building Android on Linux
2023-05-26 10:19:35 +02:00
Eberhard Beilharz
654034791f
Update android/README.md
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-05-26 10:19:20 +02:00
Keyman Server
a413f389f8
Merge pull request #8862 from keymanapp/auto/version-master-17.0.113
auto: increment master version to 17.0.113
2023-05-26 01:02:32 +07:00
Keyman Build Agent
4f9f4fa146 auto: increment master version to 17.0.113 2023-05-25 14:01:53 -04:00
Eberhard Beilharz
b80fdf88ca
docs(android): Fix documentation for building Android on Linux 2023-05-25 12:45:22 +02:00
Eberhard Beilharz
c61535d56a
fix(android): Fix build-utils.sh 2023-05-25 12:44:03 +02:00
Marc Durdin
a92917f947 chore(developer): replace cwrap wasm bindings
This moves the remainder of the WASM interfaces in kmcmplib to using
emscripten bind. It is a little bit of a step backwards at present for
parseUnicodeSet, because I've changed the output buffer type to an int
for the purposes of simplifying the binding just now. But that can be
improved later, and at least we are consistent with the binding methods.

Next step is to move the filesystem access out of kmcmplib.
2023-05-25 12:54:27 +07:00
Marc Durdin
d0083e984d
Merge pull request #8796 from keymanapp/refactor/developer/kmcmplib-fs-agnostic
refactor(developer): move file write out of WriteCompiledKeyboard and CompileKeyboard merge
2023-05-25 14:06:51 +10:00
Marc Durdin
50186e986e chore(developer): remove SetError macro
The `SetError` macro emitted `return FALSE;` which was confusing for
reviewing code flow. Replaced with explicit `AddCompileMessage()` and
`return FALSE;`.
2023-05-25 09:03:22 +07:00
Marc Durdin
ef101d746c chore(developer): address review comments 2023-05-25 08:24:09 +07:00
Keyman Server
d604e49844
Merge pull request #8852 from keymanapp/auto/version-master-17.0.112
auto: increment master version to 17.0.112
2023-05-24 14:50:07 +07:00
Keyman Build Agent
bc91a96ea7 auto: increment master version to 17.0.112 2023-05-24 03:49:31 -04:00
Eberhard Beilharz
e41f4c9140
Merge pull request #8849 from keymanapp/chore/linux/gha
chore(linux): Add missing dependency to GHA
2023-05-24 09:08:56 +02:00
Marc Durdin
cdf5f7a7c4 chore(developer): consolidate 'extra' field for FILE_KEYBOARD
FILE_KEYBOARD is a structure used in multiple libraries and languages.
It is passed around between kmcmplib, kmcmpdll, and kmcomp, with three
separate definitions (kmcmplib/compfile.h, kmcmpdll/compfile.h, and
kmcomp/compile.pas). These duplicate definitions must be maintained for
now because of type issues between the legacy kmcmpdll and kmcmplib,
which means that the definitions must be kept in sync.

Because FILE_KEYBOARD_EXTRA has a C++ class in it, it will be
initialized in CompileKeyboardHandle rather than in the caller, so
FILE_KEYBOARD.extra is now a pointer rather than a struct.

When original kmcomp and kmcmpdll are eventually removed, these
duplications will disappear and some of the memory management and
lifecycle will become easier to manage.
2023-05-24 12:14:41 +07:00
Eberhard Beilharz
a7c3c54b2b
Merge pull request #8509 from keymanapp/feat/linux/4273-wayland-systemd
feat(linux): Add dbus system service
2023-05-23 16:26:31 +02:00
Eberhard Beilharz
1823e1febb
feat(linux): Address code review comments 2023-05-23 11:48:58 +02:00
Eberhard Beilharz
29a35f1b31
chore(linux): Add missing dependency to GHA
Since we reference `sourcepackage` in the upload-to-llso step it
should be listed in the `needs` list.
2023-05-23 10:27:40 +02:00
Marc Durdin
d1d6dc5d99 refactor(developer): compiler interface part 1 for wasm
This starts the refactor of the .kmn compiler interfaces for WASM,
moving more file writes into typescript and out of the compiler. Adds a
cleaner binding and structures for passing compile metadata back to
typescript for additional build steps (e.g. kvk, js builds).

Will rebase the Typescript-based KMW compiler onto this so it can start
to benefit from the refactoring.

* Fixes a minor issue with loading a .kvks file with an empty flags set.
* Adds a writeFileSync method to the compiler callback interfaces.
* Adds an e2e compiler test to verify that .kmx and .kvk are both
  correctly compiled.
2023-05-23 15:26:28 +07:00
Marc Durdin
375964b910
Merge pull request #8846 from keymanapp/refactor/developer/kmc-package-message-tests
chore(developer): add test for missing .js file to kmc-package
2023-05-23 15:23:56 +10:00
Marc Durdin
15142e9a4b chore(developer): cleanup 2023-05-23 11:52:37 +07:00
Marc Durdin
b6173fda37 fix(developer): 'no keyboard version' no longer emitted
The `Info_KeyboardFileHasNoKeyboardVersion` message is now only emitted
if the package uses `FollowKeyboardVersion`, which broke a unit test in
kmc.
2023-05-23 11:39:44 +07:00
Darcy Wong
9abea339dc
Merge pull request #8845 from keymanapp/fix/android/publish-gradlew
fix(android/app): Pathing for publish script
2023-05-23 09:41:33 +07:00
Marc Durdin
e293d7608c chore(developer): add test for missing .js file 2023-05-23 09:28:26 +07:00
Marc Durdin
3828a5c16b refactor(developer): move message tests into test-messages.ts 2023-05-23 08:31:29 +07:00
Darcy Wong
110514e9a6 fix(android/app): Pathing for publish script 2023-05-23 06:56:15 +07:00
Keyman Server
fafe498775
Merge pull request #8843 from keymanapp/auto/version-master-17.0.111
auto: increment master version to 17.0.111
2023-05-23 01:02:13 +07:00
Keyman Build Agent
e746ec1c0c auto: increment master version to 17.0.111 2023-05-22 14:01:39 -04:00