Commit graph

4688 commits

Author SHA1 Message Date
Steven R. Loomis
01fed4b2ab feat(developer): test local imports in kmc-ldml
- also improve callback visibility when XML fails to load

Fixes: #10649
2024-11-29 14:11:29 -06:00
Steven R. Loomis
e99f6ac46a feat(developer): support local imports in kmc
- basic changes to support local imports

Fixes: #10649
2024-11-29 13:56:41 -06:00
Steven R. Loomis
01a47c3ea9 feat(developer): support local imports
- added a new reader callback option, localImportsPaths
- due to the CLDR issue #12749 use base=""
- add tests
- some bugfixes in import messages
- add an ImportStatus section to determine if something is a local import

Fixes: #10649
2024-11-29 13:48:21 -06:00
Steven R. Loomis
add502e1a9 feat(common,developer): tests and warning on denormalized content
- common: shift the 'strs' processing slightly, because otherwise we normalize to NFD before even tracking the strings
- if any string is neither NFC nor NFD, give a warning
- add tests for the same

Fixes: #7394
2024-11-29 12:16:11 -06:00
Eberhard Beilharz
b8c120dd5c
Merge pull request #12721 from keymanapp/chore/core/cherry-pick/load-from-blob-api
feat(core,linux,developer,windows): implement loading KMX from blob 🍒
2024-11-29 12:40:51 +01:00
Sabine
d3bfdc275e feat(developer): kmc-convert: box Layout, keyMapSelect, Terminators-when 2024-11-29 07:11:58 +01:00
Sabine
3188e57ecf feat(developer): kmc-convert: use callback for writing file 2024-11-28 15:51:01 +01:00
Eberhard Beilharz
66404f9503
chore(developer): rename test files
This change rename the test files for Developer according to the
discussion at the Keyman conference in November 2024.
2024-11-28 14:32:09 +01:00
Eberhard Beilharz
badb23a6ab
Merge pull request #12710 from keymanapp/refactor/developer/tc_tests
refactor(developer): output number of tests when running on TC
2024-11-28 19:40:52 +07:00
Marc Durdin
70a32f00d7 refactor(developer): unify test action 2024-11-28 15:16:25 +07:00
Marc Durdin
d71cb56ca7 fix(core): rename assert() to test_assert() in unit tests
Had a real yak shave this morning with disabling assertions in release
builds in our C/C++ code. It turns out that our unit tests use
`assert()` which we intended to use from `test_assert.h`, but in some
cases `cassert` or `assert.h` had been #included after `test_assert.h`,
overriding our special `assert()` macro. The chain of includes is
somewhat hard to puzzle out -- it's often buried several levels deep.
This meant that a release build would drop all test assertions, meaning
most tests passed, unsurprisingly, as there were no assertions left to
fail ... but some tests failed with crashes because we optimized out
important lines such as `assert(some_important_function())`.

I was quite unhappy with this fragility, so I have opted to rename
`assert()` to `test_assert()` in all of our home-grown C/C++ unit tests,
which further highlighted unit tests which were only using the C/C++
`assert()` and not ours, so then had to figure out which unit test
executables needed to have `test_assert` added, and then ... then ...
discovered a bug in `test_color.h`, where we were #including
`io.h`/`unistd.h` inside a `namespace console_color {}` block, which
just happened to be the first ref to those beautiful headers, and thus
(because `#pragma once`) meant that useful little functions like
`access()` were no longer accessible to us in the global namespace.

I have also audited Every Single Call to `assert()` to verify that we do
not do Important Work inside the parentheses, and, apart from those
offending unit tests, now resolved with `test_assert()`, it looks like
all is good.

I would like to present one very well-shaved yak in this commit.

Fixes: #12619
2024-11-28 09:46:01 +07:00
Marc Durdin
249428db7b
refactor(developer): km_core_keyboard_load_from_blob in debugger
Replaces `km_core_keyboard_load` with `km_core_keyboard_load_from_blob`.

Fixes: #12690
Cherry-pick: #12711
2024-11-27 16:17:48 +01:00
Eberhard Beilharz
21736d8817
refactor(developer): output number of tests when running on TC
This change adds the mocha-teamcity-reporter which outputs the running
tests in a special format that TeamCity can interpret. This allows TC
to show which tests run as well as the number of tests run.

Also refactor some of the build scripts to use functions.

Note that we had to explicitly add `--check-coverage=false` (which is the
default) to get successful builds when we run on TC.
2024-11-27 11:41:06 +01:00
Sabine
0c0b3c1ab1 feat(developer): kmc-convert: exchange even more any-types 2024-11-27 07:57:26 +01:00
Sabine
83461d4810 feat(developer): kmc-convert: exchange more any-types 2024-11-27 07:37:26 +01:00
Marc Durdin
e388361e84
Merge pull request #12713 from keymanapp/refactor/common/LdmlKeyboardTypes
refactor(common): move remaining LDML keyboard types into `LdmlKeyboardTypes`
2024-11-27 07:21:06 +01:00
Marc Durdin
2dc703f74b
Merge pull request #12712 from keymanapp/refactor/common/12516-LexicalModelTypes
refactor(common): move all lexical model types into `LexicalModelTypes` container
2024-11-27 07:20:54 +01:00
Marc Durdin
b54b005830 refactor(common): move remaining LDML keyboard types into LdmlKeyboardTypes
Follows: #12712
2024-11-27 11:52:53 +07:00
Sabine
17ffb14d91 feat(developer): kmc-convert: exchange any-types read, write, convert, inArray,outArray 2024-11-27 04:23:33 +01:00
Marc Durdin
dc2b9b2ad9 refactor(developer): LexicalModelTypes tests 2024-11-27 10:13:09 +07:00
Sabine
ffc9bc62a5 feat(developer): kmc-convert: handle keyMapSets 2024-11-27 03:54:24 +01:00
Marc Durdin
b10634eb97 refactor(common): move all lexical model types into LexicalModelTypes container
Many of the types had very generic names (e.g. `Configuration`), and as
the types are now exported from `@keymanapp/common-types`, this was
unhelpful.

For units with many references, I used TypeScript's import-equals to
reduce the change impact. For units with only a few references, I added
the `LexicalModelTypes.` prefix to the references in source.

(Best reference I could find for import-equals: b722fa4e49)

Fixes: #12516
2024-11-27 09:46:09 +07:00
Dr Mark C. Sinclair
f641b3cc08 chore(developer): remove unnecessary assignment to sFlag block variable 2024-11-27 01:27:59 +00:00
Dr Mark C. Sinclair
c6ef37fdef chore(developer): remove ERROR_XXXInVirtualKeySection from kmn-compiler-messages.ts 2024-11-26 06:57:44 +00:00
Dr Mark C. Sinclair
5adb76b357 chore(developer): removed comments referencing ERROR_XXXInVirtualKeySection from gtest-compiler-test.cpp 2024-11-26 04:04:13 +00:00
Sabine
95c683a301 feat(developer): kmc-convert: remove unneccessary code 2024-11-26 05:01:03 +01:00
Dr Mark C. Sinclair
f9f16167c1 chore(developer): made case 11 a block and moved sFlag, finished and wsRequired inside it 2024-11-26 03:59:59 +00:00
Dr Mark C. Sinclair
f51bb9602b chore(developer): removed ERROR_XXXInVirtualKeySection from Compiler.cpp and kmn_compiler_errors.h 2024-11-26 03:46:58 +00:00
Dr Mark C. Sinclair
6dbd9cfab4 chore(developer): Merge branch 'master' into test/developer/kmcmplib-compiler-unit-tests-5 2024-11-26 03:19:16 +00:00
Sabine
c761490bf2 feat(developer): kmc-convert: use direct mapping Ukelele->VK 2024-11-26 03:59:35 +01:00
Sabine
a0032e88a0 feat(developer): kmc-convert: add LAYOUTS (ANSI JIS) and terminators 2024-11-25 09:43:08 +01:00
Dr Mark C. Sinclair
ab9b052def chore(developer): Merge branch 'master' into fix/developer/12307-correct-whitespace-handling-in-virtual-keys 2024-11-25 01:56:02 +00:00
Marc Durdin
c80a0aef0d
Merge pull request #12666 from keymanapp/fix/developer/package-compiler-box-info-fields
fix(developer): box package compiler info fields
2024-11-25 02:06:36 +01:00
Marc Durdin
2f401f52fb
Merge pull request #12665 from keymanapp/chore/developer/package-description-optional
chore(developer): make package subfile description fully optional
2024-11-25 02:06:17 +01:00
Sabine
2503d9c58a feat(developer): kmc-convert: data in object; read more data from .keylayout and more 2024-11-23 17:26:57 +01:00
dependabot[bot]
595fe46d0b
chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 12:48:10 +00:00
Marc Durdin
b0000ae870
Merge branch 'chore/developer/package-description-optional' into fix/developer/package-compiler-box-info-fields 2024-11-20 05:59:47 +01:00
Marc Durdin
138f3c247d
Merge branch 'master' into chore/developer/package-description-optional 2024-11-20 05:59:30 +01:00
Marc Durdin
4b2641fc29 chore(developer): cleanup fixtures for kmc-copy with optional attrs 2024-11-20 07:58:14 +07:00
Dr Mark C. Sinclair
38dc123f44 chore(developer): Merge branch 'master' into fix/developer/12307-correct-whitespace-handling-in-virtual-keys 2024-11-13 16:56:44 +00:00
Dr Mark C. Sinclair
a33037b4df fix(developer): add basic_kbdcherp and basic_kbdolch to list of excluded keyboards 2024-11-13 16:54:59 +00:00
Marc Durdin
18532724fc
Merge branch 'master' into fix/developer/12307-correct-whitespace-handling-in-virtual-keys-and-remove-partially-implemented-virtual-key-series 2024-11-13 04:25:02 +01:00
Marc Durdin
ddade8a76d
Merge branch 'master' into docs/developer/kmc-generate 2024-11-13 04:22:26 +01:00
Marc Durdin
aa1c19c416 docs: address review comments 2024-11-13 10:21:36 +07:00
Marc Durdin
ce7593bd2f fix(developer): box package compiler info fields
If a .kps file had an `<Info>` element without a URL attribute, it
would not map correctly in all circumstances. This change ensures that
the kps-file-reader is responsible for normalizing the layout of these
elements on read.
2024-11-13 10:11:44 +07:00
Marc Durdin
5a93bdf6c2 chore(developer): make package subfile description fully optional
The package subfile description field is never really used in the
end-user apps. As it is meaningless metadata, we'll make it fully
optional, and start to remove all references in the designers and
compilers.

TODO: For packages targeting Keyman 18.0+, we should consider removing
the description field altogether from the subfiles.
2024-11-13 10:03:26 +07:00
Marc Durdin
a4cf30d0c2
Merge pull request #12631 from keymanapp/fix/developer/12623-full-test-in-kmcmplib
fix(developer): reconnect `--full-test` in kmcmplib build and enable for CI
2024-11-13 03:43:54 +01:00
Marc Durdin
ecdcd410e6 chore: Merge remote-tracking branch 'origin/epic/kmc-convert' into chore/merge-master-into-kmc-convert 2024-11-08 11:34:36 +07:00
Marc Durdin
2a9f2a3958
Merge pull request #12586 from keymanapp/feat/developer/kmc-copy-github-and-cloud-support
feat(developer): add GitHub and Cloud support to kmc-copy
2024-11-08 05:14:14 +01:00
Marc Durdin
eefbdc413d
Merge pull request #12555 from keymanapp/feat/developer/kmc-copy
feat(developer): kmc-copy
2024-11-08 05:14:02 +01:00