Removes a number of unused functions from the file, renames remaining
functions to match our builder script prefix patterns, removes unused
imports from various build scripts (e.g. Android).
Fixes: #14453
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.
Fixes: #14447
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.
Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh
Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
android/build.sh.
* Renames functions in builder-basic.inc.sh
More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.
Fixes: #14065
Build-bot: build all
Test-bot: skip
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.
Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy. As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.
Test-bot: skip
- added new DelegatingCompilerCallbacks class
- added ResolvingCompilerCallbacks which does event resolution
- added the XML file name metadata to *every object* after XML parse.
Fixes: #10622
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.
This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.
Test-bot: skip
Consolidates project loading code from kmc and kmc-copy, in preparation
for kmc-test epic. This leaves open a change we need to make to
CompilerCallbacks, to consolidate the fsAsync and net callbacks into
CompilerCallbacks as a first-class part of CompilerCallbacks. We will
then need to start to move all the fs and net callback interactions to
the async model across all kmc modules, at some point.
Move the sentry dependency out of developer-utils and into the console
apps kmc and server, in process of making sure that developer-utils has
no node dependencies.
Also copy the options.ts module into kmc and server, for the same
reason.
This first step duplicates two units, options.ts and KeymanSentry.ts. We
do need to refactor this again later to avoid this duplication (maybe
via yet another internal package?)
Renames common-messages.ts to developer-utils-messages.ts. This was
split from /common/web/types, but the messages module retained the old
name, which was confusing (two modules with same name).
- it's a hook to the hook to allow the LDML compiler to resolve error message line numbers
- TODO still not extra performant, but maybe the right separation of concerns
Fixes: #10622
- add 'column' to CompilerEvent
- Add a LdmlCompilerMessages.col() function to set the column number
- add a LdmlCompilerMessages.resolveLineNumber() to map offsets to line number
Fixes: #10622
Note: these messages are in `kmc`, not in `kmc-copy` or `kmc-generate`,
matching the structure for existing `INFO_BuildingProject` and related
messages.
Fixes: #13127
* Add unit test to verify the format of message detail strings
(max line length of 80 chars)
* Add unit test to verify non-null, non-empty message strings
* Tidy up a number of messages (to pass unit tests)
* Add message details for all kmw compiler messages
* Add a clickable link for the TIKE message window for each message
so that explanations and further message details are more accessible
to authors (`kmc message` is already available for command-line users)
* Fixes a number of minor issues with the messages window in TIKE,
mostly relating to when popup menu commands are enabled and how
messages are selected.
Fixes: #13134
In order to reproduce kmc errors, it's very helpful to know how it was
instantiated. This change includes the command line call for kmc. This
includes things such as a keyboard filename and may include file paths,
but does not include private personal information or secrets.
Makes the `--log-format`, `--log-level`, and `--color`/`--no-color`
options available for all commands and DRYs out some of the options
processing for consistency. This has positive impact in particular on
the Generator classes which removes the need for several unit tests as
the interface can now be checked at compile time.
Fixes: #13072
Unblocks: #13073
Because the build process for multi-keyboard packages does not deploy
.js keyboards to s.keyman.com, it does not make sense to list them, even
if the package may contain .js keyboards for mobile platforms.
Fixes: #12853
Adds 'verbose' and 'debug' log levels and corresponding error severity
levels. This means the internal error severity values have changed to
match - 'info' is now 2 instead of 0.
Fixes: #12975
As icon generation turns out to be challenging due to limitations or
native dependencies in node.js libraries for image generation, icon
options are now stubbed out to avoid confusion.