Commit graph

31 commits

Author SHA1 Message Date
Marc Durdin
d1c8061b5f chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-kmcompx 2023-03-16 12:29:17 +07:00
Marc Durdin
9db4cf2379 fix(developer): lm compiler handle missing line no in errors
Fixes #8443.

Will cherry-pick to stable-16.0.

The regex for matching error messages has an optional section for
the file/line detail (line 54):

```regex
^(?:(.+) \((\d+)\): )?<snip>
```

The code that parses the results did not account for this being
optional, which would cause a crash if the error message did not include
this information.
2023-03-16 09:38:50 +07:00
Marc Durdin
e36c0085b0 fix(developer): improve .kmx output consistency for cross-platform
This fixes two issues:

1. `COMP_KEY` structure had padding that was not always zeroed out.
   Made this explicit.

2. Rule sorting could be inconsistent when re-sorting rules that
   use `+ any() > ...`, which are expanded at compile time into multiple
   rules, and which ended up with identical sort keys due to lack of
   precision. This relates to #8381 but only adds differentiation for
   the otherwise ambiguous rule sort keys, and does not fix that issue,
   which requires further investigation.
2023-03-08 13:53:29 +07:00
Marc Durdin
dbd296f761
Merge pull request #8335 from keymanapp/feat/developer/kmcmplib-feature-flag-kmcomp
feat(developer): add `-use-legacy-compiler` flag to kmcomp 🚑
2023-03-02 17:59:47 +11:00
Marc Durdin
6846a6bb70 feat(developer): add -use-legacy-compiler flag to kmcomp 2023-02-27 16:00:02 +07:00
Steven R. Loomis
ae45295dc6 Merge remote-tracking branch 'upstream/master' into chore/merge-master-a17s5-REDO-epic-ldml 2023-02-03 16:53:35 -06:00
Marc Durdin
8ee8325c74 feat(developer): check for duplicated language codes in package editor and compiler
Fixes #8119.
2023-02-02 15:06:15 +07:00
Steven R. Loomis
bc14f18460 Merge remote-tracking branch 'origin/master' into chore/core/mergemaster4-epic-ldml 2022-12-15 17:55:13 -06:00
Marc Durdin
7793be015b fix(developer): prevent repeated begin statements
Fixes #3784.

Only one type of each `begin` statement should be allowed in any given
keyboard source file.
2022-11-01 14:25:05 +11:00
Marc Durdin
df34c064c7 chore: Merge branch 'feature-ldml' into chore/merge-master-into-feature-ldml 2022-10-20 06:33:57 +11:00
Marc Durdin
7a819598e7 fix(developer): Handle hints and warnings cleanly
Relates to #4324 (but slightly orthogonal.)

We wanted some message classes to be handled in the lexical model editor
more cleanly, including drill-down to line of error. A few changes
required to make this work well:

1. Parse error messages from kmlmc. This is not perfect but works while
   the two projects are kept in sync, which they always are for Keyman
   Developer. Note that at this stage, .ts warnings are not captured in
   this parser, as they are generated by tsc.
2. Drill-down in Wordlist Editor Frame to find line of error
3. Model editor reports ownership of .tsv files so they can be loaded
4. In case of model editor not open (e.g. building from project view),
   the TSV standalone editor was not displaying the frame, so it never
   actually worked.
5. If the text editor had never loaded, then FindError was effectively
   a no-op; adds code to seek to error line after page load finishes.
6. Ensures that if we attempt to seek an error in a sub-file owned by
   an editor (e.g. .tsv owned by .model.ts, .kvks owned by .kmn), that
   the parent editor will be focused first. Does not verify all paths
   here, just the tsv one.
2022-09-28 20:17:44 +10:00
Marc Durdin
4e396224d0 chore(developer): fixup external refs to kmc 2022-09-19 06:36:56 +10:00
Marc Durdin
c98fb89b86 fix(developer): suppress repeated warnings about unreachable code
Fixes #7216.

The warning message 0x209A 'The rule will never be matched because its
key code is never fired.' was being generated multiple times for a
single line because the `JavaScript_Key` function it is generated by is
used for various purposes.

This PR keeps a cache of reported key rules to ensure that the message
is reported only once for a given key rule, and also improves the
reporting to clarify which specific key is unreachable, which makes it
easier to diagnose when using `any(k)` style messages, for example:

```
lao_phonetic.kmn (237): Warning: 209A The rule will never be matched for key 'ñ' because its key code is never fired.
```

This also reduces the warning to a hint, as this should not be a
blocking issue for a keyboard, rather just a place the keyboard author
can tidy up.
2022-09-07 06:02:46 +10:00
Marc Durdin
9a3d11e9ff feat(developer): Option to skip embed of compiler version
If `-no-compiler-version` is specified, then we skip the embedding of
the `TSS_COMPILEDVERSION` and `TSS_KEYMANCOPYRIGHT` stores. This is
intended for use with regression test builds of keyboards when we want
to verify changes to the compiler.

This patch introduces the new export `SetCompilerOptions` in kmcmpdll,
which should make it easier to include new options like this in future
versions.
2022-07-11 12:01:13 +10:00
Marc Durdin
27eb1b9f19 fix(developer): add no-ops for symbol builds for components
Fixes the release build where we do `nmake symbols` for developer/src,
which was failing on calls to these two sets of components. (In
windows/src, the build structure is different due to an additional layer
of folders, so we end up with no `nmake symbols` call on the common
components).
2022-07-08 05:04:10 +10:00
Marc Durdin
4f36c3c2df chore(developer): Merge branch 'master' into chore/developer/js-to-lmc 2022-06-25 05:48:57 +10:00
Marc Durdin
9bb4c27e61 chore(windows): move general developer files to developer/ 2022-06-23 09:28:34 +10:00
Marc Durdin
1cf4cc3cb7 chore(developer): no signcode for components 2022-06-21 09:38:14 +10:00
Marc Durdin
5b14f60c8c chore(developer): create output folder for components package 2022-06-20 06:27:22 +10:00
Marc Durdin
4ca334b151 chore(developer): ignore error if folder missing on clean 2022-06-18 14:44:38 +10:00
Marc Durdin
21915e0d09 chore(developer): move StringGridEditControlled visual component 2022-06-18 14:33:02 +10:00
Marc Durdin
57eccfbcad chore(developer): move MenuImgList visual component 2022-06-18 14:31:45 +10:00
Marc Durdin
eeb8d9c9bf chore(developer): move LeftTabbedPageControl visual component 2022-06-18 14:30:31 +10:00
Marc Durdin
a295cfc8f0 chore(developer): move KMDActions component
Note this also drags TextFileFormat.pas and KMDActionInterfaces.pas into
the package so have moved those into general and components folders
respectively, alongside KMDActions.pas and updated corresponding
project includes.
2022-06-18 14:28:44 +10:00
Marc Durdin
f8adee2c68 chore(developer): move KeymanDeveloperDebuggerMemo visual component 2022-06-18 14:18:55 +10:00
Marc Durdin
89a4e73e99 chore(developer): move Debug visual components 2022-06-18 14:17:27 +10:00
Marc Durdin
e26286af50 chore(developer): move CloseButtonPageControl component 2022-06-18 14:14:58 +10:00
Marc Durdin
4baea35943 chore(developer): move CaptionPanel component 2022-06-18 14:12:59 +10:00
Marc Durdin
9a2e422161 chore(developer): move BitmapEditor component 2022-06-18 14:10:44 +10:00
Marc Durdin
eb4b7396f8 chore(developer): add developer_components package 2022-06-18 14:05:44 +10:00
Marc Durdin
c0ecb7e0f6 chore(windows): move Delphi developer units to developer 2022-06-12 15:38:19 +10:00