`CheckForDuplicateGroup` 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, simple change in `ProcessGroupLine`.)
`AddCompileError` would return FALSE only for 'user interruption' (not
used since Developer 17) or for fatal errors. After analysis, it turns
out that this error value was not used anywhere and removing it
simplifies the error management logic, making code paths much easier to
follow.
The return value was used in v17.0 and earlier in the macro for
`AddCompileWarning`, effectively only relevant for 'user interruption'
(`CERR_Break`); this was an ugly code pattern as it meant that any
`AddCompileWarning` could exit a function with failure -- though as
noted above `CERR_Break` was never emitted in v17.0.
Add a unit test to verify that kmn_compiler_errors.h and
kmn-compiler-messages.ts have identical definitions for all errors in
kmcmplib. Then remove mismatched (and unused) messages identified by
this test.
Renames kmcmplib error codes to match those in kmc-kmn, and updates the
bitmasks accordingly. Adds a KmnCompilerMessages namespace so a trivial
enum can be declared without risk of clashes with other ERROR_ or
similar messages.
These two codes are not true error or message codes, but are used as
return values extensively throughout kmcmplib. The codes are never
passed to message callbacks. As such, I have renamed them to reflect
usage, but opted not to change their values as there would be some risk
in doing so (e.g. use of `!v` vs `v == CERR_None`).
With the full move to ES Modules, we no longer need to include
`references` in tsconfig.json, as we can rely on package.json and
build.sh dependency management. Note however that `tsc -b` may not work
to build dependencies -- they need to be built using `build.sh`, which
calculates which dependencies need building.
kmc-keyboard-info was missing a dependency link to kmc-package in
build.sh, correcting this at the same time.
Relates-to: #12027
# 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
# 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
* Removes redundant calls
* Uses C++ classes on the interface side
* Removes global callbacks from the Javascript side
In preparation for cleanup of compiler messages
During analysis of root causes for #12027, discovered a few package
relationship issues in package.json and build.sh.
analyzer-messages.ts ///<reference> is a mitigation for now.
Relates-to: #12027