Commit graph

2740 commits

Author SHA1 Message Date
Marc Durdin
090170ce8d
Merge pull request #8740 from keymanapp/feat/developer/package-validation-in-kmc-package
feat(developer): add package validation
2023-05-12 12:25:26 +10:00
Marc Durdin
7982bd955c
Merge pull request #8729 from keymanapp/chore/developer/move-package-formats-to-common-types
chore(developer): move package formats to common/web/types
2023-05-12 12:25:19 +10:00
Marc Durdin
d3e4762b52 chore(developer): Info_KeyboardFileHasNoKeyboardVersion
Downgrades `Warn_KeyboardFileHasNoKeyboardVersion` to
`Info_KeyboardFileHasNoKeyboardVersion`, because this is not an error,
or even something wrong necessarily; it's just something it's good to be
aware of. Updates unit test for kmc to cater for the extra message.
2023-05-12 09:07:46 +07:00
Marc Durdin
53c51b79e6 feat(developer): add tests for keyboard and package version matching
Adds `WARN_KeyboardVersionsDoNotMatch` and
`WARN_KeyboardVersionsDoNotMatchPackageVersion`.

Adds unit tests. Several other 'invalid' packages needed corrections
after adding this validation. Note that one unit test was deleted
because it could never be satisfied after adding this validation step.
2023-05-12 08:26:54 +07:00
Steven R. Loomis
e37e4d0cd3 feat(developer): vars: binary builder 🙀
- no, not basic.txt yet…

For: #7377
2023-05-11 19:54:45 -05:00
Marc Durdin
3c3a363478 feat(developer): verify keyboard versions in kmc-package
Refactor the `extractKeyboardVersionFromKmx` function into a new class
and add extra version checking. This caused a bit of a cascade of test
failures due to some of the 'invalid' fixtures actually being invalid
in multiple ways, so the fixtures have been corrected to only be wrong
in a single way -- the way they are supposed to be broken. This means
additional fixture files in the 'invalid' folder.

Now updates keyboard version metadata for all keyboards in the package.

Upgrades `WARN_FollowKeyboardVersionButNoKeyboards` to
`ERROR_FollowKeyboardVersionButNoKeyboards`, as this leads to invalid
package metadata on build.

Renames `ERROR_KeyboardFileNotFound` to
`ERROR_KeyboardContentFileNotFound` to better reflect that no `<File>`
in the package is found to match a given `<Keyboard>` entry.

Adds `ERROR_KeyboardFileNotFound` when a referenced .kmx does not exist.

Adds and updates corresponding unit tests.
2023-05-12 07:19:33 +07:00
Steven R. Loomis
cc09973874 feat(developer): vars: set validation 🙀
For: #7377
2023-05-11 18:47:48 -05:00
Steven R. Loomis
c06726ce0d feat(developer): vars: uset validation 🙀
For: #7377
2023-05-11 13:05:39 -05:00
Steven R. Loomis
7855cdc494 feat(common): add async init() to compiler sections 🙀
- lots of ripples through test and client code code
- passes all but basic.xml (some tests stubbed out still, though)
- update vars test

For: #7377
2023-05-11 10:42:20 -05:00
Steven R. Loomis
c4fe843655 feat(common,developer): remove ordr and finl, add vars 🙀
- vars tests, doesn't pass yet
- tran tests and compilers stubbed out for now

For: #7377
2023-05-11 10:41:37 -05:00
Steven R. Loomis
53d4f22d13 feat(common): initial work on ldml variables 🙀
For: #7377
2023-05-11 10:41:37 -05:00
Steven R. Loomis
6317583528 feat(developer): kmc-kmn: wasm and error message updates 🙀
developer:
- update wasm machinery in kmc-kmn to be more self contained
- improve exception situation in wasm functions

common:
- compilerErrorFormatCode() for formatting the raw code such as for tests
- compilerExceptionToString() for formatting exceptions in messages

for: #7234
2023-05-11 10:37:46 -05:00
Marc Durdin
70279914a8 feat(developer): validate package name in compiler 2023-05-11 15:03:53 +07:00
Marc Durdin
b2be12c258 feat(developer): validate content file names in packages 2023-05-11 14:42:26 +07:00
Marc Durdin
88b31ba49e feat(developer): add validation of package filenames
Adds `WARN_PackageNameDoesNotFollowKeyboardConventions` and
`WARN_PackageNameDoesNotFollowLexicalModelConventions`, refactoring as
required to test filenames, and adds unit tests for same.
2023-05-11 13:23:33 +07:00
Marc Durdin
a77aa8b54c chore(developer): refactor checkForModelsAndKeyboardsInSamePackage into separate func 2023-05-11 12:44:45 +07:00
Ross
1f3e8f768d chore(windows): remove RefreshPreservedKeys pt2 2023-05-11 14:57:01 +10:00
Steven R. Loomis
3d8e3e2500 Merge remote-tracking branch 'upstream/master' into feat/developer-234-uset-wasm-epic-ldml 2023-05-10 08:34:59 -05:00
Marc Durdin
97b4e35ec6
Merge pull request #8742 from keymanapp/feat/common/builder-run-action
feat(common): add `builder_run_action` shorthand function
2023-05-10 18:58:22 +10:00
Marc Durdin
7cf891b7c0 chore(developer): add validation to kmlmi 2023-05-10 12:56:26 +07:00
Marc Durdin
97837d2021 feat(common): add builder_run_action shorthand function 2023-05-10 12:50:39 +07:00
Marc Durdin
6c17f4851a feat(developer): add validation for keyboards in package
Adds validation for WARN_PackageShouldNotRepeatLanguages for keyboards
plus unit test.
2023-05-10 11:57:40 +07:00
Marc Durdin
dbc64bcbb0 feat(developer): add package validation
Adds a package-validation.ts module, plus adds a call to the validation
step in the compilers.

Rearranges the kmc-package files to match other compilers better.

Removes `default` from exports.

And finally, adds ERROR_PackageCannotContainBothModelsAndKeyboards and
WARN_PackageShouldNotRepeatLanguages messages, plus tests.
2023-05-10 11:50:54 +07:00
Marc Durdin
7d8416dc9e chore(developer): fixup dependencies for kmc-model-info
Removes the ugly cross-dependency on kmc-package, as the metadata file
is now in common-types.
2023-05-10 09:07:23 +07:00
Steven R. Loomis
348e3281bd feat(developer): kmc-kmn: updates to uset api and Compiler 🙀
- use compiler messages
- add some TODOs around free

for: #7234
2023-05-09 18:41:02 -05:00
Steven R. Loomis
009e2a11ae feat(developer): kmc-kmn: updates to uset api and Compiler 🙀
for: #7234

Co-authored-by: Marc Durdin <marc@durdin.net>
2023-05-09 12:19:31 -05:00
Marc Durdin
53ccdbe241 chore(developer): move package formats to common/web/types
Package file interfaces were stored in developer/kmc-package but belong
better now in common/web/types.
2023-05-09 15:48:50 +07:00
Marc Durdin
46267e347f chore(developer): rename Compiler and related classes 2023-05-09 14:28:21 +07:00
Marc Durdin
2f65acf268 chore(developer): additional kmc-ldml ref 2023-05-09 14:24:59 +07:00
Marc Durdin
4838ba1ffe chore: rename kmc-keyboard to kmc-ldml
Part of #8719.
2023-05-09 14:08:45 +07:00
Marc Durdin
78083c4c9a feat(developer): kmc analyze osk-char-use
Relates to keymanapp/keyboards#2172.

Adds an analysis module to kmc which initially analyses one or more
.kvks or .keyman-touch-layout files, extracting the de-duped and sorted
set of key cap strings from those files and printing them, in text,
markdown, or json format.
2023-05-09 10:06:41 +07:00
Marc Durdin
c28dc78342 chore(developer): add kmc-kmw to kmc deps 2023-05-09 10:00:51 +07:00
Steven R. Loomis
c6380fbaf9 feat(developer): uset api from wasm! 🙀
For: #7234
2023-05-05 15:05:06 -05:00
Marc Durdin
f772a6e79d chore(developer): add kmc-kmw to npm workspace 2023-05-05 10:26:34 +07:00
Marc Durdin
5eb6c68400 feat(developer): 'working' kmw compiler 2023-05-05 09:25:05 +07:00
Marc Durdin
3a0d8799e9 feat: temp commit -- kmw compiler 2023-05-05 09:25:04 +07:00
Marc Durdin
323866c271 feat: kmc-kmw more conversions 2023-05-05 09:25:03 +07:00
Marc Durdin
80d29a6a9d chore: continue 2023-05-05 09:25:02 +07:00
Marc Durdin
bb97953cd7 feat: more work on compiler 2023-05-05 09:25:01 +07:00
Marc Durdin
baa80b93c9 chore: temp step 1 of ts kmw 2023-05-05 09:25:00 +07:00
Joshua A. Horton
797606d363 fix: model de-registration endpoint references 2023-05-05 09:19:32 +07:00
Steven R. Loomis
2374c94ceb
Merge pull request #8691 from keymanapp/feat/developer-7377-transform-format-epic-ldml2 2023-05-04 07:49:18 -05:00
Joshua A. Horton
fd21d267f3 fix(developer): right, gotta update keyman-version references from master 2023-05-03 08:45:48 +07:00
Joshua A. Horton
b39011be73 chore(web): Merge branch 'feature-esmodule-web-engine' into fix/web/webview-android-launch 2023-05-02 16:03:40 +07:00
Joshua A. Horton
e42fa70aa8 chore(web): Merge branch 'feature-esmodule-web-engine' into chore/web/update-feature-esmodule-a17s12-start 2023-05-02 12:59:35 +07:00
Steven R. Loomis
f2261c2243 fix(developer): partial Revert in test and json validator
This partially reverts commit 55405e5cf1.
2023-05-01 21:36:45 -05:00
Steven R. Loomis
a1fea150bf fix(developer): try again to unbreak windows kmcmplib 🙀
- use 'all objects' + icu for the test build
- this wasn't working in windows before

feat(developer): compiler updates for ldml transforms 🙀 #7377
2023-05-01 19:56:22 -05:00
Steven R. Loomis
9fdffdb7e3 fix(developer): try to unbreak windows kmcmplib 🙀
feat(developer): compiler updates for ldml transforms 🙀 #7377
2023-05-01 16:54:09 -05:00
Steven R. Loomis
6f568bbadf feat(developer): uset api in kmcmplib 🙀
- another windows fix

For: #7377
2023-04-28 19:10:22 -05:00
Steven R. Loomis
3996bd0046 feat(developer): fix for kmcmplib 🙀
- fix build issue on windows

For: #7377
2023-04-28 15:58:15 -05:00