Commit graph

2150 commits

Author SHA1 Message Date
Marc Durdin
eeb755f76a fix(windows): re-enable signature check
Fixes #9692.

Signature checking was skipped because we missed a ".virtual" to force
nmake to build the test and test_i3633 targets. This opened up a small
cascade of related formatting issues on Makefiles, and the fact that the
test_i3633 (has there ever been a more poorly named project?) Makefile
did not even work.

Refactored significantly, added same tests to Developer Makefile, and
also now verifying the .msi and installer executable.

We can improve this further but I'd like to get this in to avoid further
critical issues with code signing given the current broken signing
configuration.
2023-10-06 09:14:35 +07:00
Marc Durdin
248297fe5f
Merge branch 'master' into feat/developer/9324-warn-if-kps-includes-non-touch-js 2023-10-04 03:46:40 +02:00
Marc Durdin
5bb24c2910
Merge pull request #9662 from keymanapp/chore/developer/8661-add-c8-to-kmc
chore(developer): switch on code coverage reporting for kmc
2023-10-04 03:45:33 +02:00
Marc Durdin
4367bac8f7
Merge pull request #9658 from keymanapp/feat/developer/9325-hint-if-package-includes-keyboard-source-files
feat(developer): issue hint if package includes keyboard source files
2023-10-04 03:45:26 +02:00
Marc Durdin
abd363dc8b
Merge pull request #9653 from keymanapp/chore/developer/9597-reduce-warnings-to-hint-in-kmc-model
chore(developer): reduce duplicate words warning to hint
2023-10-04 03:45:18 +02:00
Marc Durdin
4562c8b6d7
Merge pull request #9652 from keymanapp/feat/developer/9610-info-when-warnings-fail-build
feat(developer): show an INFO message when warnings have failed a build
2023-10-04 03:45:08 +02:00
Steven R. Loomis
01c171ce82
Merge pull request #9615 from keymanapp/feat/developer/9403-scancodes-epic-ldml
feat(developer): ldml scan codes support 🙀
2023-10-03 08:55:19 -05:00
Marc Durdin
c5ee900736
Merge pull request #9661 from keymanapp/chore/developer/9317-test-for-check-filename-conventions-off
chore(developer): add test for `checkFilenameConventions == false` or unset
2023-10-03 15:39:43 +02:00
Marc Durdin
1b9c6fba51 feat(developer): warn if .kps includes a .js which is not touch-capable
Fixes #9324.

As .js keyboards in packages are only used by the iOS and Android apps,
it's kinda helpful if the keyboard itself includes a touch layout. While
Keyman will fall back to a desktop vk layout if a touch layout is not
present, this is less than ideal -- but that's why this is setup as a
hint and not a warning.
2023-10-03 15:28:22 +07:00
Marc Durdin
c66e8c1e8f chore(developer): switch on code coverage reporting for kmc
Fixes #8661.
2023-10-03 13:56:21 +07:00
Marc Durdin
886c64d1c3 chore(developer): add test for checkFilenameConventions == false or unset
Fixes #9317.
2023-10-03 13:29:34 +07:00
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
Marc Durdin
a2fa1f918e feat(developer): issue hint if package includes keyboard source files
Fixes #9325.

Also tweaks test for error_package_must_contain_a_model_or_a_keyboard as
the fixture had a .kmn, triggering the new hint, which was unhelpful in
this case.
2023-10-02 15:55:00 +07:00
Marc Durdin
7adc9b5d95 feat(developer): support store(&version) '17.0'
Fixes #9541.

Also adds version 16.0 support to the kmcmplib compiler constants, and
unit tests for both versions. Does not add any support for automatic
version feature detection, because that forces an inverted dependency on
the touch layout compilation phase (done in kmc-kmw), which would be a
significant refactor. This may be something we need to support in the
future.
2023-10-02 15:30:07 +07:00
Marc Durdin
d4fb7cd234 chore(developer): reduce duplicate words warning to hint
Fixes #9597.
2023-10-02 12:48:10 +07:00
Marc Durdin
c168ef01cb feat(developer): show an INFO message when warnings have failed a build
Fixes #9610.

If a build fails when "treat warnings as errors" is on, but there are
only warnings and no error messages, it can be confusing for the
developer. Adds the following `INFO_WarningsHaveFailedBuild` message:

`The build failed because option "treat warnings as errors" is enabled
and there are one or more warnings.`
2023-10-02 12:36:54 +07: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