Commit graph

2110 commits

Author SHA1 Message Date
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
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
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
9598148a30 feat(developer): fix basic.txt for updated markers 🙀
#9119
2023-08-03 15:29:10 -05:00
Steven R. Loomis
af05f5155e chore(developer): test fix
For: #9119
2023-08-03 12:39:49 -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
Marc Durdin
4bdb3cc9c8 refactor(developer): projectReader to depend on projectLoader
Fixes #9349.
2023-07-26 12:59:01 +07:00
Marc Durdin
eab760c890 fix(developer): support sourcePath in .model_info files 2023-07-26 12:26:20 +07:00
Marc Durdin
bda6ba1adc chore(developer): further kmc-keyboard-info infrastructure 2023-07-26 12:02:09 +07:00
Marc Durdin
9d6f417b8d chore(developer): fixup keyman-targets use
Also fixes git attributes for khmer_angkor.js test fixture
2023-07-26 11:49:48 +07:00
Marc Durdin
393951ce8e
Merge branch 'chore/developer/move-keyman-targets-to-common' into feat/developer/introduce-kmc-keyboard-info 2023-07-26 14:34:40 +10:00
Marc Durdin
a2d45c00c7 chore(common): address review comments 2023-07-26 11:32:38 +07:00
Marc Durdin
7f5e0756d2
Merge pull request #9306 from keymanapp/chore/developer/9305-use-kmc-messages-for-errors-in-kmc-model-info
chore(developer): use kmc messages for kmc-model-info 🗜
2023-07-26 09:48:17 +10:00
Marc Durdin
2465d99556 chore(developer): langtags.js not langtags.ts 2023-07-26 05:55:26 +07:00
Steven R. Loomis
7ee574b8ba chore(developer): make unknown vkey a hint, not error 🙀
- add a TODO mentioning #7135

Fixes: #9236
2023-07-25 17:53:58 -05:00
Steven R. Loomis
2f381279af chore(developer): make unknown vkey a hint, not error 🙀
Note that feat(core): ldml vkey support 🙀 #7135 is future,
in the future this may be an Error again.

- also, add an internal error to the visual-keyboard-compiler on missing keys
- also, update fr-t-k0-azerty to fix a missing key (simultaneous fix has been made in CLDR)
- also, reinstate CLDR's fr-t-k0-azerty - now all 'stock' keyboards build in keyman!
- keep the 'internal' azerty as k_020 - it has some additional transform goodies

Fixes: #9236
2023-07-25 17:52:19 -05:00
Marc Durdin
54eddf5782 chore(developer): add kmc-analyze makefile 2023-07-25 15:22:24 +07:00