Commit graph

2961 commits

Author SHA1 Message Date
Eberhard Beilharz
e069c3ad2a
chore(core): remove meson warnings for wasm builds
Replace deprecated function calls. Also add `strip` command to wasm
build defaults.
2024-12-12 19:48:13 +01:00
Marc Durdin
a77b20ffe9
Merge pull request #12807 from keymanapp/fix/developer/12795-displaymap-for-hints
fix(developer): support hint property in displaymap
2024-12-09 07:35:00 +01:00
Marc Durdin
4202f46550 fix(developer): support hint property in displaymap
Fixes: #12795
2024-12-09 12:20:53 +07:00
Marc Durdin
2576acc456 chore(developer): verify bundled node version when building installer
The node version must be an exact match at this time. Also updated
node.exe accordingly.

Fixes: #12075
2024-12-09 11:44:21 +07:00
Marc Durdin
f1a073b7d6
Merge pull request #12804 from keymanapp/test/developer/12597-add-tests-for-ERROR_DescriptionIsMissing
test(developer): add test for ERROR_DescriptionIsMissing to kmc-keyboard-info
2024-12-09 03:21:48 +01:00
Marc Durdin
889482ca53 test(developer): update fixture 2024-12-09 06:27:45 +07:00
Marc Durdin
2c97590904 test(developer): add test for ERROR_DescriptionIsMissing to kmc-keyboard-info
Originally reported in #12202. Check was added in #12204, backported to
17.0.329 in #12207, but #12597 reports this for 17.0.331. So added test
to verify that it is working as expected (it is).

Note that this only applies when using the `--for-publishing` build flag
in kmc, because it is checked in the kmc-keyboard-info stage. Guessing
this is where the confusion arose.

Consolidated tests which used a common pattern for kmc-keyboard-info
calls. The remaining tests do stubs or calls into internal functions, so
they cannot be easily deduped.

Fixes: #12597
2024-12-09 06:22:11 +07:00
Marc Durdin
09d14dae14 fix(developer): remove platforms from kmc-generate LM readme
Lexical models are not specific to a platform, so the readme should not
list supported platforms.

Fixes: #12592
2024-12-09 06:01:35 +07:00
Marc Durdin
ee46a6693d chore(developer): Merge branch 'master' into feat/developer/12012-improve-support-for-bcp47 2024-12-06 14:16:00 +07:00
Marc Durdin
7be5c62e3b
Merge pull request #12773 from keymanapp/chore/developer/12746-kmc-copy-full-gh-url-to-master
change(developer): use full github url in kmc copy parameters 🍒
2024-12-06 08:01:34 +01:00
Marc Durdin
72d0bac0ee
Merge pull request #12775 from keymanapp/chore/rename-test-callbacks
chore: rename TestCompilerCallbacks.ts
2024-12-05 23:51:40 +01:00
Marc Durdin
389ef7f001 chore: rename TestCompilerCallbacks.ts
There was confusion with two implementations of TestCompilerCallbacks.
Turns out one of them wasn't used.
2024-12-05 13:04:27 +07:00
Marc Durdin
170282bba7 chore: address review comments 2024-12-05 09:23:27 +07:00
Marc Durdin
33b4fa3e89 change(developer): use full github url in kmc copy parameters
Fixes: #12746
Cherry-pick-of: #12754
2024-12-05 09:23:08 +07:00
Steven R. Loomis
dcc4c2b570
Merge branch 'feat/developer/7394-verify-normalization-epic-ldml' into feat/developer/10649-local-imports 2024-12-04 13:52:32 -06:00
Steven R. Loomis
c38077459a Merge remote-tracking branch 'upstream/master' into feat/developer/7394-verify-normalization-epic-ldml 2024-12-04 13:51:14 -06:00
Steven R. Loomis
9a338abf91 chore(developer): update per code review
- support empty string as import base
2024-12-04 08:34:36 -06:00
Marc Durdin
148938eb1d fix(developer): honour provided script when checking for matching scripts
Fixes: #12765
2024-12-04 12:51:00 +07:00
Marc Durdin
c233208d32
Merge pull request #12753 from keymanapp/feat/developer/12752-hint-on-lang-script-mismatch
feat(developer): report on mismatching lang tag scripts when building keyboard-info
2024-12-03 08:29:15 +01:00
Steven R. Loomis
f4f0355109 feat(developer): local imports directory fixes
- use path.join instead of path.resolve
- rename importsPath to cldrImportsPath
- remove k_015_importlocal from core, as it duplicated tests in common and developer

Fixes: #10649
2024-12-02 15:40:54 -06:00
Steven R. Loomis
48da8fd613
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-12-02 11:55:13 -06:00
Steven R. Loomis
75d172a6cb
Merge branch 'feat/developer/7394-verify-normalization-epic-ldml' into feat/developer/10649-local-imports 2024-12-02 11:37:29 -06:00
Steven R. Loomis
17185d79a9
Merge branch 'master' into feat/developer/7394-verify-normalization-epic-ldml 2024-12-02 11:36:21 -06:00
Steven R. Loomis
6f2a6b2ebf feat(common,developer): tests and warning on denormalized content per review comments
- report a warning on each separate instance of a denormalized string (once per string).

Fixes: #7394
2024-12-02 11:35:06 -06:00
Marc Durdin
f3191b9297 feat(developer): report on mismatching lang tag scripts when building keyboard-info
This went into kmc-keyboard-info because we already do a lot of
processing there against langtags.json, whereas we do not currently have
langtags.json in kmc-package.

Adds an associated unit test.

Fixes: #12752
2024-12-02 12:20:26 +07:00
Marc Durdin
9a01ac166d chore(core): Merge branch 'master' into fix/core/12619-disable-assertions-vcwin-release-build 2024-12-01 16:17:21 +07:00
Marc Durdin
cd8825d504
Merge pull request #12736 from keymanapp/refactor/developer/unify_test_action
refactor(developer): unify test action
2024-12-01 00:14:11 +01:00
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
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
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
Marc Durdin
dc2b9b2ad9 refactor(developer): LexicalModelTypes tests 2024-11-27 10:13:09 +07: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
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
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