Commit graph

3336 commits

Author SHA1 Message Date
Marc Durdin
21c3a630bf chore(windows): upgrade VC++ projects to v143 (VS2022)
Test-bot: skip
Build-bot: skip release:developer,windows
2025-10-31 13:33:30 +01:00
Marc Durdin
f2d4dff1f7
Merge pull request #14993 from keymanapp/feat/developer/add-targetversion-parameter
feat(developer): add targetVersion support to kmc and kmc-kmn 🔱
2025-10-29 11:04:12 +01:00
Marc Durdin
268b87ac9e
Merge pull request #14992 from keymanapp/feat/core/add-kmx-plus-version-header
refactor(core): add support for header.version to Core LDML 🔱
2025-10-29 11:04:02 +01:00
Marc Durdin
b08f18e029
Merge pull request #14991 from keymanapp/feat/developer/add-kmx-plus-version-header
feat(common): add version header to KMX+ Typescript modules 🔱
2025-10-28 14:27:44 +01:00
Marc Durdin
e6a3a31ce9
Merge pull request #14990 from keymanapp/refactor/common/consolidate-kmx-plus-header-struct
refactor(common): consolidate header struct to kmx-plus-file.ts 🔱
2025-10-28 14:27:35 +01:00
Keyman Server
87420e15c1
Merge branch 'epic/embed-osk-in-kmx' into chore/A19S14-merge-master-into-embed-osk-in-kmx 2025-10-24 11:14:03 +02:00
Marc Durdin
da364f978d
Merge pull request #14038 from cvosoft/test-warn-previousmap
test(developer): add test to kmc-analyze for Warn_PreviousMapFileCouldNotBeLoaded
2025-10-24 11:07:22 +02:00
Marc Durdin
a7a8cb0b72
Merge pull request #15002 from keymanapp/fix/developer/14411-handle-missing-begin-unicode
fix(developer): handle missing `begin Unicode` in KMW compiler
2025-10-24 09:19:10 +02:00
Christoph Völker
15ea1f321e test(developer): use unitTestEndPoints for loadPreviousMap and clean up test 2025-10-24 08:09:14 +02:00
Christoph Völker
d57274b26d test(developer): add unit test for Warn_PreviousMapFileCouldNotBeLoaded and raise coverage threshold to 75% 2025-10-23 21:03:52 +02:00
Marc Durdin
c6a96fc457 fix(developer): handle missing begin Unicode in KMW compiler
This probably arose with the move to kmcmplib in WASM, and as it was
never unit tested, we missed it. A simple signed vs unsigned issue.

Fixes: #14411
Test-bot: skip
2025-10-23 15:08:12 +02:00
Marc Durdin
a6f476e557 fix(developer): do not treat backslash as a string escape in syntax highlighting
Adjust two incorrect rules that caused backslash to be treated as an
escape in strings in syntax highlighting in .kmn language.

Fixes: #14988
Test-bot: skip
Build-bot: skip
2025-10-23 11:55:17 +02:00
Marc Durdin
e3fbe510e7
Merge branch 'feat/core/add-kmx-plus-version-header' into feat/developer/add-targetversion-parameter 2025-10-22 15:08:38 +02:00
Marc Durdin
648cd2b6af
Merge branch 'feat/developer/add-kmx-plus-version-header' into feat/core/add-kmx-plus-version-header 2025-10-22 15:08:29 +02:00
Marc Durdin
0227b277f0
Merge branch 'refactor/common/consolidate-kmx-plus-header-struct' into feat/developer/add-kmx-plus-version-header 2025-10-22 15:08:22 +02:00
Marc Durdin
95a5bcc362
Merge branch 'epic/embed-osk-in-kmx' into refactor/common/consolidate-kmx-plus-header-struct 2025-10-22 15:08:07 +02:00
Marc Durdin
d987f3f000 chore(developer): clean up variable names and filenames
Build-bot: skip
2025-10-22 14:37:12 +02:00
Marc Durdin
d068ba4777 test(developer): fix tests for versioning 2025-10-22 13:58:52 +02:00
Marc Durdin
8d74d2c8a6 feat(developer): add targetVersion support to kmc and kmc-kmn
Make the target version parameter for kmc-ldml into a generic build
parameter, so we can use it for any compiler. Add support and tests
to kmc-kmn, kmcmplib, kmc-ldml, kmc.

Support not yet in place for lexical models, or packages. However,
packages will be picking up the min version from the embedded keyboards.
Lexical models need work on minimum version support before this can be
implemented there.
2025-10-22 05:48:24 +02:00
Marc Durdin
57e0e6941d refactor(core): add support for header.version to Core LDML
This substantial refactor reorganizes the header data for sections in
the Core LDML processor. The change was substantial because of
assumptions made about the binary layout of sections. In order to make
the code easier to maintain, safer, and more resilient to future
changes, I opted to make a consistent helper for each section, and copy
header data so that it could be transparently reused.

The principal changes are:

1. Support the version field in the COMP_KMXPLUS_HEADER struct, and
   split it into COMP_KMXPLUS_HEADER_17 and COMP_KMXPLUS_HEADER_19
   versions.
2. Establish a corresponding COMP_KMXPLUS_XXXX_Helper clas for each
   section.
3. Refactor the majority of rawData accesses into using helper
   functions, which reduces direct pointer manipulation and adds extra
   boundary checks.

A special-case exists for BKSP - it is identical to TRAN, except for
its section ident. In order to avoid a complicated pattern for handling
it, I have special-cased it in one place, adding an overloaded
`get_section_from_sect` function for COMP_KMXPLUS_BKSP.

An opportunity exists to refactor a bit further - reduce direct access
to the binary data (through the COMP_KMXPLUS_XXXX structs, and instead
promote use of the COMP_KMXPLUS_XXXX_Helper classes). This indirection
would  reduce duplication of data access and make it cleaner when we
start doing multi-version code.

Next commit will add unit tests for v19 format files.
2025-10-22 05:48:23 +02:00
Marc Durdin
693c741884 feat(common): add version header to KMX+ Typescript modules
Add support for header.version to KMX+ files, with differentiation
between v17 and v19 in the compiler, and associated tests. This does not
yet make the target version accessible to authors using `kmc`, but the
interfaces from `kmc-ldml` are available.

A v17 KMX+ file will have:
* comp_header.version = VERSION_17
* initial 'sect' section in KMX+ data
* no sect.header.version field in any section

A v19+ KMX+ file will have:
* comp_header.version = VERSION_19
* initial 'sec2' section in KMX+ data
* sect.header.version field for all sections
* each section 4 bytes larger to accommodate
* 'sec2' must have sect.header.version = KMXPlusVersion.Version19
* currently all other sections have sect.header.version = Version17
2025-10-17 11:23:09 +02:00
Marc Durdin
b4bb07ecc4 refactor(common): consolidate header struct to kmx-plus-file.ts
Consolidate the header structure in KMX+ to make it easier to add a
version value to the header for v19+ KMX+ files; also DRYs out the
header definitions a little.
2025-10-17 08:46:53 +02:00
Marc Durdin
db5aa518c0 change(developer): add unit test to verify special key cap definitions
Special key caps such as '*ZWNJ*' are defined in a number of places in
the source. In theory, we could DRY these definitions out, but that
would add a number of unhelpful dependencies or take considerable time
to implement. So, for now I opted to write a unit test to compare the
definitions as found in the following files, treating web's definition
as primary:

 *   web/src/engine/osk/src/specialCharacters.ts
 *   developer/src/tike/xml/layoutbuilder/constants.js
 *   developer/src/kmc-kmn/kmw-compiler/constants.ts
 *   developer/docs/help/reference/file-types/keyman-touch-layout.md
 *   core/include/ldml/keyman_core_ldml.ts

Note that the keyman_core_ldml.ts file changes are not included in this
commit, and hence the unit test for it is currently skipped. This will
be enabled in a subsequent commit along with other KMX+ changes to
support epic/embed-osk-in-kmx.

Test-bot: skip
2025-10-16 12:37:44 +02:00
Marc Durdin
3be434aa65 refactor(windows): consolidate legacy_kmx_file.h into kmx_file.h
These two files were largely the same, with legacy_kmx_file.h trailing
kmx_file.h in features. The primary difference was that
legacy_kmx_file.h still had Windows-specific types, but the types in
km_types.h made this a drop-in replacement.

Test-bot: skip
2025-09-30 14:13:11 +02:00
Marc Durdin
121fb80d92
Merge pull request #14746 from keymanapp/fix/developer/14604-disallow-space-in-group-name
fix(developer): restrict invalid characters in identifiers in kmcmplib
2025-09-15 14:49:03 +02:00
Marc Durdin
bd3d268bcc fix(developer): address review comments, adding comments and renaming variables 2025-09-12 17:01:21 +02:00
Marc Durdin
c14ca3f409 chore(developer): remove sil_yi from set of keyboard repo tests
sil_yi was impacted by the changes in #14746, as it had the group name
'Unicode Group', which is now illegal, so the compiler fails to build
the keyboard at the referenced commit. Easiest workaround currently is
to remove it from the set of compared keyboards.
2025-09-12 14:35:47 +02:00
Marc Durdin
5facfd9fcf chore(developer): rename constructor parameter to avoid shadow 2025-09-12 14:20:55 +02:00
Marc Durdin
08c36db05f fix(developer): add default destructor for CompilerMessage and Validation classes 2025-09-12 14:14:43 +02:00
Marc Durdin
7fcdfb8f65 fix(developer): restrict invalid characters in identifiers in kmcmplib
The compiler has always been very ambiguous on which characters were
accepted in group and store names, even to the point of accepting
things like comma in a store name, which would then make it impossible
to reference in an `index` statement!

This commit clarifies the allowable characters in an identifier. While
it would have been possible to use UAX#31 for this, that would have
extended the requirements for this change substantially, and may have
caused us more trouble with legacy keyboards. Given kmcmplib is
end-of-life (see epic/ng-compiler), I have chosen a lower friction
approach. There are certainly other characters that could be excluded,
but in general I have chosen to exclude only those that will definitely
be problematic.

The set of allowable characters for deadkeys has actually been expanded
in this release to match the store and group name rules.

It is expected that there may be some impacted keyboards, but addressing
this change will be relatively straightforward, so I consider this to be
an acceptable back-compatibility trade-off, see
https://github.com/keymanapp/keyman/wiki/Principles-of-Keyman-Code-Changes#4-source-backward-compatibility-keyboard-model-and-package-source-file-formats-should-be-backward-compatible

Fixes: #14604
Test-bot: skip
Build-bot: skip build:developer
2025-09-12 10:52:31 +02:00
Marc Durdin
2b4a22c1cd chore(developer): use icons.res to verify that configure is done
Build-bot: skip
Test-bot: skip
2025-09-11 13:58:30 +02:00
Marc Durdin
377b1056ec maint(resources): rename KEYMAN_VERSION_FOR_PR_FILENAME
Address review comment from #14703.

Test-bot: skip
Build-bot: skip
Relates-to: #14703
Relates-to: #10521
2025-09-10 11:17:41 +02:00
Marc Durdin
87cb03d740
Merge branch 'maint/windows/10521-use-versioned-filenames-for-pr-artifacts' into maint/android/10521-use-versioned-filenames-for-pr-artifacts 2025-09-08 15:02:03 +02:00
Marc Durdin
634fef64d4 maint(android): use versioned filenames for PR artifacts
Relates-to: #10521
Test-bot: skip
Build-bot: skip release:android,developer,windows
2025-09-08 12:31:11 +02:00
Marc Durdin
9ce0aed2ed maint(developer): use versioned filenames for PR artifacts
Relates-to: #10521
Test-bot: skip
Build-bot: skip release:developer
2025-09-08 11:22:37 +02:00
Marc Durdin
db90fa21a7 maint(developer): use versioned filenames for PR artifacts
Relates-to: #10521
Test-bot: skip
Build-bot: skip release:developer
2025-09-08 09:44:53 +02:00
Eberhard Beilharz
e615139348
Merge pull request #14669 from keymanapp/chore/windows/desktop 2025-09-03 11:53:46 +02:00
Marc Durdin
69a538b691
Merge pull request #14668 from keymanapp/docs/license
docs(common): update license date and owner
2025-09-03 06:37:04 +02:00
Marc Durdin
76ed9b55dd
Merge pull request #14659 from keymanapp/fix/developer/new-lm-project-validation-message
fix(developer): add clear messages about validation failures to New LM Project Parameters form
2025-09-03 04:39:36 +02:00
Marc Durdin
f420f15567 docs(common): update license date and owner
Fixes: #14665
Test-bot: skip
Build-bot: skip
2025-09-02 16:13:36 +02:00
Eberhard Beilharz
f166f11d14
docs(common): update docs Keyman Desktop → Keyman for Windows
Also change path to engine help pages. This requires a corresponding
change in help.keyman.com.

Test-bot: skip
2025-09-02 14:29:53 +02:00
Marc Durdin
c263a2bd2a
Merge pull request #14658 from keymanapp/fix/developer/new-ldml-keyboard-project-validation-message
fix(developer): add clear messages about validation failures to New LDML Project Parameters form
2025-09-02 11:29:39 +02:00
Marc Durdin
c557124006
Merge pull request #14657 from keymanapp/fix/developer/14169-new-keyboard-project-validation-message
fix(developer): add clear messages about validation failures to New Project Parameters form
2025-09-02 11:29:30 +02:00
Marc Durdin
8150f36b09
Merge pull request #14651 from keymanapp/fix/developer/13903-offset-compiler-error-line
fix(developer): remove incorrect offset for compiler error line
2025-09-02 11:29:12 +02:00
Marc Durdin
5df9e70a31 fix(developer): add clear messages about validation failures to New LM Project Parameters form
Apply new FormValidation to New Lexical Model Project Parameters form.

Follows: #14658
2025-09-01 17:07:36 +02:00
Marc Durdin
21cae0d7de fix(developer): add clear messages about validation failures to New LDML Project Parameters form
Apply new FormValidation to New LDML Project Parameters form.

Follows: #14657
2025-09-01 15:21:24 +02:00
Marc Durdin
9c656808bf chore(developer): tweak wordwrap on validation fields 2025-09-01 14:25:18 +02:00
Marc Durdin
d61bcf23da fix(developer): add clear messages about validation failures to New Project Parameters form
Add a new FormValidation class to help make a consistent declarative
field validation pattern for Keyman Developer forms, and apply that
initially to the New Keyboard Project Parameters dialog. This pattern
replaces the earlier EnableControls pattern; ideally we will replace
validation in other forms with similar validation requirements with this
over time.

Fixes: #14169
2025-09-01 13:40:40 +02:00
Marc Durdin
c36c3eb943 change(developer): update SIL logo
Fixes: #14116
Test-bot: skip
2025-09-01 08:13:43 +02:00
Marc Durdin
2ec7ad4dd4
Merge pull request #14650 from keymanapp/fix/developer/14348-handle-failure-to-create-dest-path-in-new-keyboard-project
fix(developer): handle failure to create destination path when generating new project
2025-08-31 06:37:03 +02:00