Commit graph

27982 commits

Author SHA1 Message Date
Eberhard Beilharz
ab5df20eef
chore(web): move web/src/engine/paths/web/src/engine/interfaces/
Fixes: #12035
2024-07-31 20:06:02 +02:00
Keyman Server
dd12e73153
Merge pull request #12073 from keymanapp/auto/version-master-18.0.81
auto: increment master version to 18.0.81
2024-07-31 11:05:17 -07:00
Keyman Build Agent
fc8917f3af auto: increment master version to 18.0.81 2024-07-31 14:04:37 -04:00
Eberhard Beilharz
10ed10dbca
Merge pull request #11881 from keymanapp/change/web/11878_remove-es5
change(web): remove support for es5 🏗️
2024-07-31 17:48:14 +02:00
Eberhard Beilharz
1389d40965
Merge branch 'master' into change/web/11878_remove-es5 2024-07-31 15:28:38 +02:00
Dr Mark C. Sinclair
e8e28b60d4
Merge pull request #11894 from keymanapp/fix/developer/correct-use-of-u16chr-when-second-parameter-could-be-null
test(developer): check correct use of u16chr when second parameter could be null
2024-07-31 11:25:31 +01:00
sgschantz
ec2e48c11f change(mac): moved directory locations into KMDataRepository 2024-07-31 15:58:40 +07:00
Joshua A. Horton
9904a0c425 fix(web): improve post-punctuation, post-whitespace handling 2024-07-31 13:00:32 +07:00
sgschantz
bff17dc1c2 change(mac): customize menus after all views are created
rather than reading from disk and adding keyboards include
awakeFromNib, do so in applicationDidFinishLaunching
2024-07-31 10:52:34 +07:00
Joshua Horton
87f5560b14
Merge pull request #12049 from keymanapp/fix/web/unrevert-11258
fix(web): unrevert #11258, leaving OSK hidden before instructed to display
2024-07-31 08:08:46 +07:00
Marc Durdin
49b4b4e939
Merge pull request #12039 from keymanapp/fix/web/12038-nullish-test-for-set-osk
fix(web): add nullish test in setOsk
2024-07-31 09:38:05 +10:00
Marc Durdin
6f62edf976
Merge pull request #12037 from keymanapp/chore/developer/12027-remove-references-from-tsconfig.json
chore(developer): remove redundant references from tsconfig.json
2024-07-31 07:55:39 +10:00
Keyman Server
82545c5e8b
Merge pull request #12068 from keymanapp/auto/version-master-18.0.80
auto: increment master version to 18.0.80
2024-07-30 11:03:51 -07:00
Keyman Build Agent
bf9279b41a auto: increment master version to 18.0.80 2024-07-30 14:03:15 -04:00
Dr Mark C. Sinclair
a53ea2ced4 chore(developer): add additional comment to LineTokenType test case for 'c' with no following space 2024-07-30 11:49:23 +01:00
Dr Mark C. Sinclair
298853bccb chore(developer): correct copy-paste error in finl test case of u16tok_str_compare_to_strtok 2024-07-30 11:30:59 +01:00
Dr Mark C. Sinclair
0e303cd38a chore(developer): Merge branch 'master' into fix/developer/correct-use-of-u16chr-when-second-parameter-could-be-null
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-07-30 11:20:10 +01:00
sgschantz
37dcacc0cb change(mac): add KMDataRepository class to handle data (keyboards) migration 2024-07-30 16:08:34 +07:00
Eberhard Beilharz
e42a895977
fix(web): export consts 2024-07-30 09:47:02 +02:00
Marc Durdin
dc459a0926 refactor(developer): replace VERIFY_KEYBOARD_VERSION() calls with VerifyKeyboardVersion()
Remove the `VERIFY_KEYBOARD_VERSION()` and
`VERIFY_KEYBOARD_VERSION_ret()` macros, and instead use
`VerifyKeyboardVersion()`. The DRYing out of this function call pattern
moved the return statement into a macro, which is an inappropriate way
to reduce repetition, because (a) it is hard for devs to spot function
exits, and (b) automated code analysis tools stumble on it.

Also means that we uncover more clearly the return mismatches between
`KMX_DWORD` and `KMX_BOOL` through the compiler source.

Fixes: #12047
2024-07-30 13:13:10 +07:00
Marc Durdin
897697d208 chore(developer): support filename field in kmcmplib compiler messages
Relates-to: #10866
2024-07-30 13:09:55 +07:00
Marc Durdin
7682a31e32 refactor(developer): replace AddWarning() and AddWarningBool() macro usage with call to ReportCompilerMessage()
The `AddWarning()` and `AddWarningBool()` macros just called
`ReportCompilerMessage()`. A side-effect of removing `AddWarningBool()`
is that the functions that called it always returned `TRUE` (and the
return value was never checked anyway), and so these functions have been
made `void`.
2024-07-30 11:02:37 +07:00
Marc Durdin
619b03a20d refactor(developer): rename AddCompileError() to ReportCompilerMessage() 2024-07-30 10:05:06 +07:00
Marc Durdin
8cd97e5f5d refactor(developer): move kmcmplib message construction to kmc-kmn
* Remove compiler message definitions from kmcmplib
* Add parameterization to compiler message structures
* Translate parameters for existing parameterized messages (except for
  `ERROR_InvalidToken`, which requires a bigger refactor of
  `GetXStringImpl()` and many friends)
* Add columnNumber to message structures (not yet used in kmc-kmn)
* Add filename to message structures (not yet used in kmcmplib)
* Rename `INFO_Info` to `INFO_MinimumCoreEngineVersion` and
  `INFO_MinimumEngineVersion` to `INFO_MinimumWebEngineVersion`

Relates-to: #10866
2024-07-30 10:01:19 +07:00
Joshua Horton
32e1ed12ea
Merge pull request #11952 from keymanapp/refactor/web/correction-search-thresholding
refactor(web): spin off method for correction-search probability-thresholding check 📚
2024-07-30 08:47:30 +07:00
Joshua Horton
0651a9031e
Merge pull request #11950 from keymanapp/feat/web/case-detection-unit-tests
feat(web): add unit tests for case-detection & handling 📚
2024-07-30 08:47:24 +07:00
Shawn Schantz
9e4721cc25
Merge pull request #11947 from keymanapp/change/mac/11623-add-sentry-breadcrumbs
change(mac): add custom tags in sentry to better identify errors
2024-07-30 08:43:43 +07:00
Keyman Server
b39f51bb56
Merge pull request #12055 from keymanapp/auto/version-master-18.0.79
auto: increment master version to 18.0.79
2024-07-29 11:03:57 -07:00
Keyman Build Agent
ece8a5cf59 auto: increment master version to 18.0.79 2024-07-29 14:03:20 -04:00
Eberhard Beilharz
fd8ffb5efc
chore(web): don't deep import and remove sub-export of util
Addresses code review comments and reverts eb9205f46e and
partially reverts 5552fdd5ad.
2024-07-29 17:43:34 +02:00
Shawn Schantz
5488e32be2 change(mac): add class to encapsulate settings 2024-07-29 16:01:58 +07:00
Joshua A. Horton
a966b7b8fc chore(web): implement optional-chaining PR suggestion 2024-07-29 15:46:25 +07:00
Joshua A. Horton
612adf6fae fix(web): prevents correction from deleting tokens 2024-07-29 15:40:56 +07:00
Joshua A. Horton
dd91671595 fix(web): prevents correction from deleting tokens 2024-07-29 15:38:27 +07:00
Joshua A. Horton
a5dc128975 chore(web): Merge branch 'master' into feat/web/case-detection-unit-tests 2024-07-29 15:04:40 +07:00
Joshua Horton
b29900ec59
Merge pull request #11949 from keymanapp/feat/web/prediction-lookup-unit-tests
feat(web): add unit tests for prediction lookup component 📚
2024-07-29 15:02:58 +07:00
Joshua Horton
036724d744
Merge pull request #11946 from keymanapp/feat/web/suggestion-finalization-unit-testing
feat(web): add unit testing for finalization of generated suggestions 📚
2024-07-29 15:02:48 +07:00
Joshua A. Horton
37d3487425 chore(web): Merge branch 'change/web/full-context-tokenization-tracking' into change/web/tokenization-awareness-for-predictions 2024-07-29 14:08:04 +07:00
Joshua A. Horton
cfbf973f49 chore(web): Merge branch 'feat/web/transform-tokenization' into change/web/full-context-tokenization-tracking 2024-07-29 14:06:52 +07:00
Joshua A. Horton
fad3b1c9ee chore(web): Merge branch 'change/common/models/tokenization' into feat/web/transform-tokenization 2024-07-29 14:05:20 +07:00
Joshua A. Horton
092b6f7a4f fix(common/models): null-guard left-hand token reference for split-token check during tokenization 2024-07-29 14:04:40 +07:00
Joshua A. Horton
969f997ae7 chore(web): missed a review improvement spot - let -> const 2024-07-29 12:15:24 +07:00
Joshua A. Horton
b7c7f5a41c chore(common/models): address PR review comments re needed comment, condition-clarity improvement 2024-07-29 12:13:36 +07:00
Joshua A. Horton
fca87e21f9 fix(web): unrevert #11258, leaving OSK hidden before instructed to display 2024-07-29 11:36:37 +07:00
Joshua Horton
7e5903b1ab
Merge pull request #12015 from keymanapp/change/web/revert-11174
change(web): revert #11174, which loads keyboards before initializing the OSK
2024-07-29 11:34:08 +07:00
Marc Durdin
59addc5d2b refactor(developer): move error reporting inside GetCompileTargetsFromTargetsStore
This supports upcoming changes for parameterized errors in
`GetCompileTargetsFromTargetsStore`.
2024-07-29 10:52:23 +07:00
Marc Durdin
c359fd6ccc refactor(developer): move error reporting inside ProcessGroupFinish
This supports upcoming changes for parameterized errors in
`VerifyUnreachableRules` (now a `void` return because it always returned
success anyway).
2024-07-29 10:41:32 +07:00
Darcy Wong
fc56010520
Merge pull request #12021 from keymanapp/chore/common/history-17-0-327
chore(common): Update history from 17.0.327 and add missing descriptions
2024-07-28 21:13:31 -05:00
Marc Durdin
bcec446144 refactor(developer): return KMX_BOOL instead of KMX_DWORD for AddStore() and friends
This is definitely a yak shave, but should have payoff in terms of
cleaner and more descriptive error messages in the long run.

In the existing design, many (but not all) functions return a KMX_DWORD
error value, and that is passed on up the call stack to be reported as
an error elsewhere. This separation of error reporting from error site
makes it difficult to add parameters (and masks the actual error site in
analysis).

This commit starts to move the error reporting to the actual site of the
error, in `AddStore()`, `ProcessSystemStore()`, `ParseLine()`,
`AddCompilerVersionStore()`, `BuildVKDictionary()`, and
`ProcessBeginLine()`.

During analysis, identified a memory leak (missing `delete[] temp`) in
`process_if()`. Fixed on line 2716.

Many of the `process_*()` functions call `AddStore()`, which is now
responsible for reporting its own errors; these functions have not yet
been updated and so if `AddStore()` fails, the compiler will generate
two error messages -- one from `AddStore()` and a second one in the
value returned from the calling `process_*()` function.

The `VERIFY_KEYBOARD_VERSION` macro hides a `return` statement which
returned an error code on failure. This has been split into
`VERIFY_KEYBOARD_VERSION_ret` which causes the caller to returns the
error code, and the existing `VERIFY_KEYBOARD_VERSION` macro now causes
the caller to return `FALSE` on failure. This should be refactored to
move the `return` condition into the caller (removing the `return`
side-effect) in the future.
2024-07-29 06:21:21 +07:00
Marc Durdin
05fd680a9e refactor(developer): Move error reporting inside CheckForDuplicateStore
This is the same change as for `CheckForDuplicateGroup`.

`CheckForDuplicateStore` is one of a few places where parameterized
errors are returned. Moving the error reporting inside the function
makes it cleaner to refactor those parameterized errors later. (This
requires a similar change in `ProcessStoreLine`, also formatted and
rebraced per style guide.)
2024-07-29 04:27:06 +07:00