- when a required section is missing, only throw an internal error IF we haven't already flagged a problem. for example, if 'vars' fails to compile because of a problem, and we already have an error on file, then don't throw an internal error that 'bksp' depends on uninitialized 'vars'.
- mimic this flow in the test helpers.
- add a test case for this in the test helpers, in test-tran
- add a strictError flag to say that no additional errs are allowed.
Fixes: #10291
- add keys on each row and add rows, mapping to a new reserved "gap (reserved)" key.
- add a mechanism for reserved keys, in case we have others…
For #9451
Fixes#10161.
Includes transition of existing options from registry to options.json,
and once options.json exists, will always read from that and ignore
registry. Was able to eliminate some of the legacy datatype usage for
several options. Reader/writer includes naive file lock retry to avoid
contention, which I am hopeful will be sufficient for our needs, given
the low chance of contention.
First part of addressing #10161 is to refactor the existing usage of the
registry values into the common KeymanDeveloperOptions unit. This was
mostly straightforward except for the changes to KeymanSentryClient,
which happens to be the most important part of this particular fix.
Relates to #9473.
Now that each compiler has a common interface, we can consolidate the
common code into BuildActivity. This makes it very easy to see where the
compiler calls have special cases, such as the model_info and
keyboard_info compilers (these are primarily for internal use, so the
special case work should not be a problem).
`outFile` is not a compiler option, and so it should not be a part of
the `CompilerBaseOptions` interface. This formally separates the
command-line options from the compiler options, which eliminates a
number of restrictive structures.
Relates to #9473.
Refactors the public API of ModelInfoCompiler to meet KeymanCompiler,
including moving file write responsibilities into the class itself.
`sources` has become a property of `options`, which is perhaps a slight
violation of the intent of the `init()` function being a one-time call,
as it means we'll need to instantiate an new class for each file we
compile. Given the use-case for the model_info compiler is almost
exclusively internal, I think this is acceptable. Tell me if you think
otherwise!
Relates to #9473.
Refactors the public API of KeyboardInfoCompiler to meet KeymanCompiler,
including moving file write responsibilities into the class itself.
`sources` has become a property of `options`, which is perhaps a slight
violation of the intent of the `init()` function being a one-time call,
as it means we'll need to instantiate an new class for each file we
compile. Given the use-case for the keyboard_info compiler is almost
exclusively internal, I think this is acceptable. Tell me if you think
otherwise!
Relates to #9473.
Refactors the public API of PackageCompiler and
WindowsPackageInstallerCompiler to meet KeymanCompiler, including
asyncing a bunch of functions, and moving file write responsibilities
into the classes themselves.
The classes were updated together in a single commit because
WindowsPackageInstallerCompiler depends on PackageCompiler, and needed
refactoring for the updated API access there anyway.
Most of the test cases needed only minor patching, but introducing the
`async init()` function has caused them to all be async. The
test-messages module has a slight functional change with the compile
process running completely rather than stopping on first message, which
meant we needed to add extra dummy fixtures to avoid other errors that
arose later in the compile process. The keyman.exe fixture is a text
file, not a Windows executable.
Relates to #9473.
Refactors the public API of LexicalModelCompiler to meet KeymanCompiler,
including asyncing a bunch of functions, and moving file write
responsibilities into the class itself. Removes top-level
`compileModel()` and `loadFromFilename()` functions, as you should now
use `LexicalModelCompiler` API.
Most of the test cases needed only minor patching, but introducing the
`async init()` function has caused them to all be async, despite the
model compiler itself having no async requirements. I think this is
fine, because it makes any future additional async initialization tasks
much less painful to implement.
Relates to #9473.
Refactors the public API of LdmlKeyboardCompiler to meet KeymanCompiler,
including asyncing a bunch of functions, and moving file write
responsibilities out of kmc and into kmc-ldml.
Part of #9473.
KmnCompiler now implements KeymanCompiler, including the returned
artifacts. Also establishes the common types for the compiler interfaces
and consolidates and renames various API surfaces for kmc-kmn.
Fixes#10138.
If the current instance of Keyman Developer already has a project open,
then the New Project dialog will now open the new project in a new
instance of Keyman Developer.
Note: this also moves a couple of functions out of dmActionsMain and
into UfrmMain, as their functionality belongs more closely there. The
`TmodActionsMain.OpenProject` function has been renamed to
`TfrmMain.OpenProjectInCurrentProcess` to clarify its usage and context.
Fixes#10148.
We now force the SourcePath and BuildPath project properties to be a
direct subfolder of the project folder, in order to avoid issues with
paths in the future. This is only applied to v2.0 projects, and only
enforced via the UI at this point.
Fixes#10146.
Some developers may wish to stick with kpj-1.0 for now, and the prompt
to upgrade would annoying because it cannot be hidden. This resolves
that.
Note that I haven't at this point renamed UrlRenderer.pas, although it
may be worth considering in the future.