Commit graph

2509 commits

Author SHA1 Message Date
Steven R. Loomis
8b65010892
Merge pull request #10306 from keymanapp/feat/developer/9121-reject-bad-regex-epic-ldml
feat(developer): escape bad markers 🙀
2024-01-03 11:47:11 -06:00
Steven R. Loomis
54c77e2de9
Merge pull request #10300 from keymanapp/fix/developer/10291-layer-errs-epic-ldml
fix(developer): quell internal error when  a section fails 🙀
2024-01-02 17:05:00 -06:00
Steven R. Loomis
a6151e681b
Merge branch 'chore/core/ldml-test-robust-epic-ldml' into feat/developer/9121-reject-bad-regex-epic-ldml 2024-01-02 17:04:37 -06:00
Marc Durdin
ee6814c67a
Merge pull request #10218 from keymanapp/chore/developer/10162-honor-prompt-to-upgrade-in-kmc
chore(developer): honor prompt to upgrade in kmc
2024-01-02 15:36:48 +11:00
Marc Durdin
edc950727f
Merge pull request #10208 from keymanapp/feat/developer/9473-kmc-module-api-consolidation
feat(developer): Consolidate public APIs for kmc modules
2024-01-02 15:35:47 +11:00
Steven R. Loomis
80ba5aa0ce fix(developer): escape markers as regex 🙀
- escape markers to prevent the n'th marker from having some other meaning
2023-12-30 11:18:51 -06:00
Steven R. Loomis
21a7680278 fix(developer): quell internal error when a section fails 🙀
- 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
2023-12-21 22:14:54 -06:00
Steven R. Loomis
1b944e7578 feat(developer): update to basic.txt for key-not-found 🙀
- rest of keys.
- found that the reserved gap key was 1/10th width, but fixed

For #9451
2023-12-15 18:02:06 -06:00
Steven R. Loomis
fd5cf041ff feat(developer): update to basic.txt for key-not-found 🙀
- add the new gap key
- start adding the additional vkeys

For #9451
2023-12-14 19:06:49 -06:00
Steven R. Loomis
5fd1f98f7f feat(developer): fix import 🙀
For #9451
2023-12-13 18:28:55 -06:00
Marc Durdin
2a73725839 chore(developer): fix duplicated message number 2023-12-13 08:59:57 +07:00
Marc Durdin
67b1b65337 chore(developer): Merge branch 'master' into feat/developer/9473-kmc-module-api-consolidation 2023-12-13 08:07:09 +07:00
Steven R. Loomis
c3dfc9422f feat(developer): add reserved gap keys to fill out the layer 🙀
- fix the row loop

For #9451
2023-12-12 18:51:12 -06:00
Steven R. Loomis
a4f20f99e4 feat(developer): add reserved gap keys to fill out the layer 🙀
- 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
2023-12-12 18:42:25 -06:00
Marc Durdin
e2ce64d9be fix(web): mocha describe does not do async
mocha describe() does not accept an async function. Any async prep
should be done in a before() function, which does support async.

One helpful ref: https://github.com/mochajs/mocha/issues/2975#issuecomment-1004176440
2023-12-13 05:38:51 +07:00
Marc Durdin
69a11c9ceb chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-13 05:05:53 +07:00
Marc Durdin
60bb1e4d9e chore(developer): Merge branch 'master' into feat/developer/9473-kmc-module-api-consolidation 2023-12-13 05:01:20 +07:00
Marc Durdin
2f59e8d38b
Merge pull request #10211 from keymanapp/fix/developer/10091-10194-touch-layout-builder-errors
fix(developer): two errors in touch layout editor
2023-12-13 08:46:04 +11:00
Marc Durdin
1b45c6b8e9
Merge pull request #10155 from keymanapp/feat/developer/10138-new-project-new-process
feat(developer): New Project opens in new process 🦕
2023-12-13 08:45:53 +11:00
Marc Durdin
0b05013fc8
Merge pull request #10154 from keymanapp/feat/developer/10149-window-menu
feat(developer): Add Window menu 🦕
2023-12-13 08:45:43 +11:00
Marc Durdin
1f06224c6e
Merge pull request #10151 from keymanapp/fix/developer/10144-10145-10146-10148
fix(developer): various project fixes 🦕
2023-12-13 08:45:30 +11:00
Marc Durdin
ee7d6e67d9 chore(developer): refactor IsTemporaryProject 2023-12-13 04:43:34 +07:00
Marc Durdin
3d250fecc0 chore(developer): ensure unit tests have default options set 2023-12-12 07:38:13 +07:00
Marc Durdin
89254296db chore(developer): honor prompt to upgrade in kmc
Fixes #10162.
2023-12-11 21:17:00 +07:00
Marc Durdin
ff87042974 chore(developer): make getOption synchronous 2023-12-11 21:16:16 +07:00
Marc Durdin
59cb7b25d3 chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-11 21:13:33 +07:00
Marc Durdin
a63070d4db
Merge pull request #10158 from keymanapp/feat/developer/10147-hint-if-old-project-file-version
feat(developer): kmc emit hint if project file is old version 🦕
2023-12-12 01:12:18 +11:00
Marc Durdin
e57766d1b1 feat(developer): retry on locked file when reading options 2023-12-11 21:00:51 +07:00
Marc Durdin
67379f4603 feat(developer): use ~/.keymandeveloper/options.json for TS sentry 2023-12-11 16:01:56 +07:00
Marc Durdin
01fe68a66d feat(developer): Move options to ~/.keymandeveloper/options.json
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.
2023-12-11 15:31:21 +07:00
Marc Durdin
3a91c7d197 chore(developer): move IDEOptions key responsibility into KeymanDeveloperOptions
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.
2023-12-11 13:48:43 +07:00
Marc Durdin
39a53d439a fix(developer): error when rescaling touch layout editor keys
Fixes #10194.
2023-12-11 12:39:33 +07:00
Marc Durdin
61a0155435 fix(developer): touch layout editor wedges don't scroll
Fixes #10091.
2023-12-11 12:39:01 +07:00
Marc Durdin
22b7f5bf07 fix(developer): crash loading a project when referenced .xml is missing
Fixes #10181.
2023-12-11 12:05:56 +07:00
Marc Durdin
52038e22aa chore(developer): remove unintended usage of callbacks.path/callbacks.fs in kmc 2023-12-11 11:43:24 +07:00
Marc Durdin
f4918d36e2 feat(developer): refactor common compiler steps into BuildActivity.runCompiler
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).
2023-12-11 10:10:31 +07:00
Marc Durdin
f9c3be09a6 refactor(developer): move outFile out of CompilerBaseOptions
`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.
2023-12-11 09:47:23 +07:00
Marc Durdin
7b6b4f0add feat(developer): ModelInfoCompiler now implements KeymanCompiler
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!
2023-12-09 07:28:26 +07:00
Marc Durdin
13533a726a feat(developer): KeyboardInfoCompiler now implements KeymanCompiler
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!
2023-12-09 07:15:06 +07:00
Marc Durdin
69a2448176 feat(developer): PackageCompiler and WindowPackageInstallerCompiler now implement KeymanCompiler
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.
2023-12-09 06:48:53 +07:00
Marc Durdin
4c53509df9 feat(developer): LexicalModelCompiler now implements KeymanCompiler
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.
2023-12-08 11:45:53 +07:00
Marc Durdin
d3ee8c9802 feat(developer): LdmlKeyboardCompiler now implements KeymanCompiler
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.
2023-12-07 11:42:10 +07:00
Marc Durdin
d18d4833a9 chore(developer): tidyup of KmnCompiler members 2023-12-07 11:41:27 +07:00
Marc Durdin
6bebefda10 feat(developer): move kmc-kmn to KeymanCompiler interface
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.
2023-12-07 11:05:31 +07:00
Marc Durdin
e5c4f7134d feat(developer): kmc emit hint if project file is old version
Fixes #10147.
2023-12-06 14:01:21 +07:00
Marc Durdin
40b5828263 feat(developer): New Project opens in new process
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.
2023-12-06 12:10:12 +07:00
Marc Durdin
86e1728f97 feat(developer): Add Window menu
Fixes #10149.
2023-12-06 11:45:16 +07:00
Marc Durdin
cb8c114ff8 chore(developer): add unit to kmconvert 2023-12-06 11:45:03 +07:00
Marc Durdin
fe772e1008 fix(developer): Validate SourcePath and BuildPath in Project Settings
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.
2023-12-06 09:55:26 +07:00
Marc Durdin
6c918e6aa8 fix(developer): Option to disable prompting for project upgrade
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.
2023-12-06 09:54:12 +07:00