Commit graph

2135 commits

Author SHA1 Message Date
Steven R. Loomis
8200f84418 feat(developer): scancode and forms 🙀
- fix casing of k_oC1
- allow vkey 226 to be doubly defined
- drop LdmlVkeyNames table and test, not needed anymore (was for vkey #7135)

Fixes: #9403
2023-10-02 12:30:36 -05:00
Steven R. Loomis
17eba2d237 feat(developer): scancode and forms 🙀
- spec: 'hardware' is no longer an enum but a str.
Ripple effects here.
- custom scancodes and layouts are, interestingly, supported. But it's a warning.
- tests for bad scancodes.

Fixes: #9403
2023-09-30 22:06:39 -05:00
Steven R. Loomis
ffe00c06b5 feat(common): scancode - move vkey map generation into KeysCompiler 🙀
- also fix visual keyboard compiler to use same code

For: #9403
2023-09-30 18:54:37 -05:00
Steven R. Loomis
623d679274
Merge branch 'master' into feat/developer/9403-scancodes-epic-ldml 2023-09-28 13:41:53 -05:00
Steven R. Loomis
bdef1c48d3 fix(common): update keyman for removal of vkeys 🙀
dropped in upstream CLDR-17093

See #7135
2023-09-28 13:03:44 -05:00
Marc Durdin
d7f056c2a0
Merge pull request #9549 from keymanapp/fix/developer/9546-template-only-includes-mobile-layout
fix(developer): only include mobile touch platform in basic project
2023-09-28 11:17:07 +02:00
Marc Durdin
cc82a3cc63
Merge pull request #9536 from keymanapp/chore/npm-pack-bundling
chore: workaround npm/cli#3466 when bundling internal deps
2023-09-26 06:36:52 +02:00
Steven R. Loomis
87c18fdb42 feat(developer): scancode hint to warning 🙀
For: #9403

- fix a bad comment
- Warn_UnsupportedCustomForm (formerly hint)
2023-09-25 16:13:17 -05:00
Steven R. Loomis
f56e4ffa85 feat(common): ldml scancodes 🙀
For: #9403

- unit test the set and row count for codes
- fix errors!
2023-09-22 17:56:35 -05:00
Steven R. Loomis
44f061f293 feat(common): ldml scancodes 🙀
For: #9403

- improve how forms are read in the XML structure
- warnings when custom (non-default-import) scancodes are loaded
- error, as usual, when an unknown form is present
2023-09-22 17:33:20 -05:00
Steven R. Loomis
60295cef70 chore(core): ldml update keyboard -> keyboard3 🙀
For: #9604

- DOCTYPE fixes (typos) to make the red squiggles go away
2023-09-20 18:56:29 -05:00
Steven R. Loomis
8be00cb482 chore(resources): code changes for keyboard to keyboard3 🙀 2023-09-18 19:00:32 -05:00
Steven R. Loomis
27508571c9 fix(developer): ldml drop \u1234 🙀
- fix 1..6 char Unicode escapes with an unrolled loop

- for feat(core): ldml drop \u1234 format 🙀  #9515
2023-09-15 15:27:47 -04:00
Steven R. Loomis
213dd7d2ad fix(developer): ldml drop \u1234 🙀
- for now, convert \u{1234} to \u1234 before going into
UnicodeSet.

- for feat(core): ldml drop \u1234 format 🙀  #9515
2023-09-15 14:42:37 -04:00
Steven R. Loomis
28012d1f7d chore(developer): ldml fix for update 🙀
- hardware types isn't a fixed set anymore
- un-mothball the pertinent error type

Related to #9403, exposed during #9515 CLDR update
2023-09-15 14:42:03 -04:00
Marc Durdin
ae07e5174c fix(developer): only include mobile touch platform in basic project
Fixes #9546.

Previously, a new project would include both mobile and tablet platform
in the touch layout file. However, the majority of devs want to work
with just one, so this removes the tablet platform. Adding a new
platform is a single click within the editor, which duplicates the
current platform as a starting point.
2023-09-09 17:51:40 +02:00
Marc Durdin
d7f73f3078 chore: workaround npm/cli#3466 when bundling internal deps
Works around npm/cli#3466 when bundling internal dependencies using the
bundleDependencies package.json property.

This change works in tandem with the npm pack/publish process -- when we
run `developer/src/kmc/build.sh publish` (or `pack`), we end up with
`npm version` stomping on all our package.json files, so the repo is
dirty after this. We need a copy of the top-level package.json before
this stomping happens, in order to get a simple map of the location of
each of our internal dependencies, from the `dependencies` property (it
would be possible to figure this out with a lot more parsing of
our package.json files, but this is simpler).

This means, in future, we should avoid publishing our internal
dependencies such as those under common/ to npm, as they serve no
practical purpose there.
2023-09-01 20:30:43 +08:00
Steven R. Loomis
90800acb6d
Update developer/src/kmc-ldml/src/compiler/messages.ts
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2023-08-21 11:36:35 -05:00
Steven R. Loomis
b6855e121f feat(core): ldml: support <display id=...> in the 'disp' section 🙀
- "recent" addition to CLDR DTD

Fixes: #8717
2023-08-18 17:02:35 -05:00
Steven R. Loomis
f21bd8212d
Merge branch 'master' into feat/core/9119-marker-core-epic-ldml 2023-08-09 11:03:53 -05:00
Marc Durdin
add9a43f9e
Merge pull request #9441 from keymanapp/chore/developer/report-fatal-compiler-errors-to-sentry
chore(developer): improve kmc sentry reporting on fatal build errors
2023-08-09 18:35:53 +10:00
Marc Durdin
0692b8200a chore: address review comments 2023-08-09 15:35:33 +07:00
Marc Durdin
087c68f4ca
chore: Apply suggestions from code review 2023-08-09 18:32:20 +10:00
Marc Durdin
fa19eea873 chore(developer): improve kmc sentry reporting on fatal build errors
kmc already reported unhandled exceptions, but any handled fatal errors
were captured and only reported to the user. It is better to report
these to Sentry as these are still unexpected.

I have refactored all the fatal exception messages in various kmc
modules to use a common mechanism, keeping all the Sentry integration in
kmc, now passing exception data up in the `CompilerEvent.exceptionVar`
property.

* I took the opportunity to rename messages.ts to
  infrastructureMessages.ts

* @types/chai was missing which gave intellisense errors in vscode

* normal exit of kmc now provides an opportunity for error reports to
  Sentry to be finalized

* Added a unit test for fatal errors in kmc

* Added a manual test pathway with `SENTRY_CLIENT_TEST_BUILD_EXCEPTION`
  env var to trip the build fatal error mechanism and verify that it
  looks ok; the following shows test runs demonstrate how fatal build
  errors are reported:

```
mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)

    This error has been automatically reported to the Keyman team.
      Identifier:  6f0fca1a26694c22b03f02b2463d39c5
      Application: Keyman Developer
      Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/6f0fca1a26694c22b03f02b2463d39c5/

mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --no-error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)
```
2023-08-09 09:34:44 +07:00
Marc Durdin
c02f5ab419 feat(developer): add 'default' property for longpress keys
Fixes #9430.

Adds a 'default' property to subkeys, only used by longpress-type
subkeys:

* Added property to schema and readers/writers
* Added property to touch layout validator
* Added editor for property to layout builder
2023-08-08 14:20:52 +07:00
Steven R. Loomis
93b1771570
Merge branch 'master' into feat/core/9119-marker-core-epic-ldml 2023-08-07 16:40:07 -05:00
Marc Durdin
49d471ba17
Merge pull request #8954 from keymanapp/feature-kmc-kmw
epic: kmc-kmw KeymanWeb compiler in Typescript 🗜
2023-08-07 11:37:39 +10:00
Steven R. Loomis
d21fd6bbc4 Merge remote-tracking branch 'upstream/master' into feat/core/9119-marker-core-epic-ldml 2023-08-04 14:14:07 -05:00
Marc Durdin
cdf026c2ba chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s18 2023-08-04 12:54:10 +07:00
Steven R. Loomis
6632aafeec spec(core): update per code review 🙀
- keep 'deadkey' out of the ldml code
- other renames

For: #9119
2023-08-03 19:00:21 -05:00
Steven R. Loomis
539966f931 Merge remote-tracking branch 'remotes/upstream/feat/developer/9119-marker-update-spec-epic-ldml' into feat/core/9119-marker-core-epic-ldml 2023-08-03 18:54:29 -05:00
Steven R. Loomis
9598148a30 feat(developer): fix basic.txt for updated markers 🙀
#9119
2023-08-03 15:29:10 -05:00
Steven R. Loomis
3db0220f43 feat(core): steps in marker imp 🙀
- fix a logic err in vars - premature optimization was skipping when we had markers but no other vars
- update marker output in keys, including to and longpress.  TODO-LDML still do not handle markers in lists (longpress, multitap, or flicks). The tests are there but commented out.

For: #9119
2023-08-03 13:26:19 -05:00
Steven R. Loomis
af05f5155e chore(developer): test fix
For: #9119
2023-08-03 12:39:49 -05:00
Steven R. Loomis
c3813483d3 chore(developer): test fix
For: #9119
2023-08-03 12:38:05 -05:00
Steven R. Loomis
d543442c1b
Merge branch 'master' into feat/developer/9119-marker-update-spec-epic-ldml 2023-08-02 18:10:29 -05:00
Steven R. Loomis
2a818b1ede spec(core,developer): update marker spec 🙀
- use UC_SENTINEL CODE_DEADKEY …
- use U+FFFE for any marker
- add asserts between .ts and C++
- update generation

For: #9119
2023-08-02 18:04:48 -05:00
Marc Durdin
9a5d671801 chore(developer): add Error_NotAProjectFile 2023-08-02 12:12:58 +07:00
Marc Durdin
d8e03e0695 chore(developer): refactor KeymanDeveloperProjectFile
Turns KeymanDeveloperProjectFile into an interface, and removes
redundant data in filename and fileType fields, calculating these from
filePath instead. Maintains separate KeymanDeveloperProjectFile10 and
KeymanDeveloperProjectFile20 classes implementing the base interface for
now, although that may be a target for future consolidation (lowpri).
2023-08-02 12:05:48 +07:00
Marc Durdin
48c0f09872 chore(developer): use getFileType() instead of fileType
Ensures that we calculate the file type instead of using stored data,
which is a lot cleaner. Means we ignore the filetype field in the .kpj
xml, which is fine.

We should do the same with filename vs filepath.
2023-08-02 11:50:35 +07:00
Marc Durdin
41aac59a4a chore(developer): minor patches to fix compile issues
Fixes #9377.

1. ldml_transforms.cpp used emplace_back with char instead of dword
   values (#9377)
2. import was updated to src/ instead of ../ by vscode in build.ts
   (no related issue)
2023-08-01 13:27:31 +07:00
Marc Durdin
d045e18897
Merge pull request #9350 from keymanapp/refactor/developer/projectLoader-projectReader
refactor(developer): projectReader to depend on projectLoader 🗜
2023-08-01 13:45:16 +10:00
Marc Durdin
038db7b1dd
Merge pull request #9348 from keymanapp/fix/developer/support-sourcePath-for-model-info
fix(developer): support sourcePath in .model_info files 🗜
2023-08-01 13:45:09 +10:00
Marc Durdin
e247bb02dd chore(developer): address review comments 2023-08-01 10:44:21 +07:00
Steven R. Loomis
b6fade356f
Merge pull request #9365 from keymanapp/feat/developer/9119-marker-emit-epic-ldml
feat(common): marker processing🙀
2023-07-31 16:00:31 -05:00
Steven R. Loomis
f2fea17b66
Update developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-07-31 15:57:44 -05:00
Steven R. Loomis
1bb3ae548a fix(developer): more wasm uset fixes 🙀
- While i'm in the neighborhood..
- use 'free' besides just 'malloc' (sure enough..)
- move wasmExports into this
- add code coverage for failed sizes
- cleanup
2023-07-31 13:19:08 -05:00
Steven R. Loomis
51774b637b
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-07-31 22:23:37 -05:00
Steven R. Loomis
781351b121
Merge branch 'master' into fix/developer/wasm-epic-ldml 2023-07-31 22:10:21 -05:00
Steven R. Loomis
e1d5513952
Update developer/src/kmcmplib/src/meson.build
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-07-31 22:09:34 -05:00