Commit graph

2121 commits

Author SHA1 Message Date
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
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
Steven R. Loomis
8c2cd8916a fix(developer): fix breakage from emscripten 3.1.44
- use wasmExports.malloc if available otherwise asm.malloc
2023-07-31 11:16:49 -05:00
Marc Durdin
ab4e12426a chore(developer): rename projectReader to projectRunner 2023-07-31 15:59:26 +07:00
Marc Durdin
246c02ea31 chore(developer): address review comments 2023-07-31 15:59:00 +07:00
Steven R. Loomis
1c9543557f feat(developer): marker - basic.xml update 🙀
- verified sentinel in the binary output

#9119
2023-07-29 17:56:10 -05:00
Steven R. Loomis
8c79f14156 feat(developer): marker - use marker in the sections 🙀
- bunch of rework to make 'vars' a dependent of lots of sections
- should be emitting marker ids in the output stream now.

#9119
2023-07-29 17:26:36 -05:00
Steven R. Loomis
99886623a5 feat(developer): marker accounting 🙀
- .. and the basic.txt to prove it

#9119
2023-07-29 14:48:08 -05:00
Steven R. Loomis
52e54395f9 feat(developer): marker accounting 🙀
- split out MarkerTracker, could give us more precise messages about marker use
- for now, we parse all markers twice.
- update builder for the markers list

#9119
2023-07-29 14:18:37 -05:00
Steven R. Loomis
4854cba4c9 feat(developer): fix marker validation test 🙀
- was using the wrong syntax, hyphen instead of underscore

#9119
2023-07-28 21:40:02 -05:00
Steven R. Loomis
ab4a0f36ab feat(developer): Marker tests 🙀
- wip , still not working

For: #9119
2023-07-26 18:06:22 -05:00
Steven R. Loomis
0c7ad2c1af feat(developer): Marker tests 🙀
- tests for marker validation
- TDD: it fails, hooray

For: #9119
2023-07-26 17:27:14 -05:00
Marc Durdin
4e5a359c84
Merge branch 'fix/developer/support-sourcePath-for-model-info' into refactor/developer/projectLoader-projectReader 2023-07-26 19:25:12 +10:00
Marc Durdin
5aa1c17297
Merge branch 'feat/developer/introduce-kmc-keyboard-info' into fix/developer/support-sourcePath-for-model-info 2023-07-26 19:24:54 +10:00
Marc Durdin
c9e1e82a76
Merge branch 'feature-kmc-kmw' into feat/developer/introduce-kmc-keyboard-info 2023-07-26 19:24:34 +10:00
Marc Durdin
52869e0d15
Merge pull request #9323 from keymanapp/chore/developer/move-keyman-targets-to-common
refactor(developer): move keyman-targets.ts to common/web/types 🗜
2023-07-26 17:37:41 +10:00