Commit graph

27 commits

Author SHA1 Message Date
Marc Durdin
bd48ba646b
Merge pull request #7219 from keymanapp/fix/developer/7216-suppress-repeated-warnings-unreachable-code
fix(developer): suppress repeated warnings about unreachable code
2022-09-12 11:18:54 +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
75139ed919 fix(developer): compiler mismatch on currentLine
Fixes #7122.

The compiler was updating currentLine when checking for unreachable
rules, but not restoring it afterwards. This led to mismatches in the
debugger and in compiler warnings.
2022-09-02 17:15:27 +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
0902c730c0
Merge pull request #6756 from keymanapp/chore/windows/move-keymanversion-h
chore(windows): move keymanversion.h to common 🎢
2022-06-23 15:55:06 +10:00
Marc Durdin
45969da17b chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/cleanup-keyman64-h 2022-06-23 15:54:11 +10:00
Marc Durdin
5075b54343
Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-headers 2022-06-23 15:52:06 +10:00
Marc Durdin
3d0294769d
Merge pull request #6752 from keymanapp/chore/windows/cleanup-vkeys-h
chore(windows): merge vkeys.h and move to common 🎢
2022-06-22 14:33:00 +10:00
Marc Durdin
81b82b86e7
chore: Apply suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2022-06-21 07:17:11 +10:00
Marc Durdin
2d67873a6a chore(developer): address review comment 2022-06-21 07:15:34 +10:00
Marc Durdin
84982f3027 chore(developer): fixup relative ref to legacy_kmx_file.h 2022-06-21 07:11:27 +10:00
Marc Durdin
4342cdb96e chore(windows): remove rc temp files 2022-06-12 13:58:02 +10:00
Marc Durdin
3632582522 chore(windows): move keymanversion.h to common 2022-06-12 13:56:13 +10:00
Marc Durdin
754c1295aa chore(windows): cleanup keyman64.h usage
keyman64.h is now only used by keyman32/keyman64. Shared components have
been moved to legacy_kmx_memory.h - KMX structures in-memory, as used by
kmanalyze, kmdecomp.

Removed unnecessary references to keyman64.h from kmtip.

Also removed aiDebugger.* which are obsolete files.

One day in the future, we could merge keyman64.h with keymanengine.h.
2022-06-12 13:44:56 +10:00
Marc Durdin
d8f3a5598a chore(windows): move various headers to common
* moved ConvertUTF.h -> common/windows/cpp/include
* moved crc32.h -> common/windows/cpp/include
* moved keymansentry.h -> common/windows/cpp/include
* moved registry.h -> common/windows/cpp/include
* moved unicode.h -> common/windows/cpp/include
* moved xstring.h -> common/windows/cpp/include

and updated corresponding references. Deleted a bunch of old references
to missing headers from .vcxproj files. Updated vkeys.h and vkeys.cpp
references in .vcxproj to use $(KEYMAN_ROOT) instead of relative paths.
2022-06-12 13:18:45 +10:00
Marc Durdin
5119f8d808 chore(windows): merge vkeys.h and move to common
Moves vkeys.h to common, turns it into a proper header and adds
corresponding vkeys.cpp so that we don't include the data multiple times
in a project.

Removes duplication of vkeys.h in kmcmpdll and global/inc.

Updates all projects to reference the common files, except kmdecomp,
coming in the next commit, as it is more complex.
2022-06-12 07:18:36 +10:00
Marc Durdin
51952c2242 chore(developer): move debugstore.h to kmcmpdll 2022-06-12 06:36:51 +10:00
Marc Durdin
e5b31669af chore(developer): move and rename compiler.h
The name compiler.h was misleading, so renamed to legacy_kmx_file.h, as
it largely describes .kmx files. There are two declarations in the file
which are specific to kmcmpdll, at the bottom of the file, but
everything else is all related to the .kmx file format. (We may move
those in a future update to kmcmpdll, but that should wait until the
kmcmpdll cross-platform refactor is complete.)

Moved to common/windows/cpp/include/ because it is used by both
Developer and Windows projects.

Where possible, removed redundant references, as compfile.h includes
legacy_kmx_file.h anyway.
2022-06-12 06:31:38 +10:00
Marc Durdin
e295e3ef71 chore(developer): move compfile.h to kmcmpdll
Moves compfile.h to kmcmpdll path and removes unnecessary dependencies on it.
2022-06-12 06:10:37 +10:00
Marc Durdin
2fe84c7ea8 chore(developer): move comperr.h to kmcmpdll
Moves comperr.h to kmcmpdll path and removes unnecessary dependencies on it.
2022-06-12 06:04:36 +10:00
Marc Durdin
e79006a686 chore(windows): remove rc4.cpp references 2022-06-11 11:14:30 +10:00
Marc Durdin
0b95f31f34 chore(windows): remove unused rc4.h, rc4.cpp 2022-06-11 10:44:38 +10:00
Marc Durdin
86de748219 chore(windows): remove unused onlineconstants.h 2022-06-11 10:43:28 +10:00
Marc Durdin
5a8ca7ba41 chore(windows): update project references for shared cpp 2022-06-11 08:39:09 +10:00
Marc Durdin
21a9212fae chore(windows): move json-schema-validator to developer 2022-06-05 15:35:38 +10:00
Marc Durdin
b47b8ded54 chore(developer): fixup kmcmpdll build 2022-05-19 09:46:38 +10:00
Marc Durdin
a160a5c709 chore(developer): move source files to /developer/src 2022-05-18 10:34:48 +10:00