keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
391 stars 108 forks source link

bug(developer): kmc builds a keyboard successfully, but generates no outputs if `&targets` store contains no recognized tokens #11773

Closed darcywong00 closed 2 months ago

darcywong00 commented 3 months ago

I'm troubleshooting the keyboards build on keymanapp/keyboards#2820 as of commit keymanapp/keyboards@742fe8b54450d139c4f668e629895cca839b0718

where I changed the kmn targets to all without adding adding a touch-optimized keyman-touch-layout file to the project.

The keyboard is "built successfully", but there's no kmx or js files generated, so the package compiler fails. Results from kmc and Keyman Developer below

Keyboards Repo Compiler

./build.sh build -k release/sil/sil_greek_polytonic

Gives the following output:

[/c/src/keyboards] ## build starting...
sil_greek_polytonic.kpj - info KM05002: Building release/sil/sil_greek_polytonic/sil_greek_polytonic.kpj
sil_greek_polytonic - hint KM05014: The project file is an older version and can be upgraded to version 17.0
sil_greek_polytonic.kmn - info KM05002: Building release/sil/sil_greek_polytonic/source/sil_greek_polytonic.kmn
sil_greek_polytonic.kmn:819 - hint KM020AE: This rule will never be matched as another rule takes precedence Overridden by rule on line 817
sil_greek_polytonic.kmn - info KM05006: release/sil/sil_greek_polytonic/source/sil_greek_polytonic.kmn built successfully.
sil_greek_polytonic.kps - info KM05002: Building release/sil/sil_greek_polytonic/source/sil_greek_polytonic.kps
sil_greek_polytonic.kps - error KM04011: Keyboard file C:\src\keyboards\release\sil\sil_greek_polytonic\build\sil_greek_polytonic.kmx was not found. Has it been compiled?
sil_greek_polytonic.kps - info KM05007: release/sil/sil_greek_polytonic/source/sil_greek_polytonic.kps failed to build.
sil_greek_polytonic.kpj - info KM0500C: Project release/sil/sil_greek_polytonic/sil_greek_polytonic.kpj failed to build.
[/c/src/keyboards] ## build failed

Keyman Developer

17.0.326 stable

Compiling keyboard gives

sil_greek_polytonic.kmn - info KM05002: Building sil_greek_polytonic.kmn
sil_greek_polytonic.kmn:819 - hint KM020AE: This rule will never be matched as another rule takes precedence Overridden by rule on line 817
sil_greek_polytonic.kmn - info KM05006: sil_greek_polytonic.kmn built successfully.

But build\sil_greek_polytonic.kmx and build\sil_greek_polytyonic.js aren't generated.

Compiling package then fails with

sil_greek_polytonic.kmn - info KM05006: sil_greek_polytonic.kmn built successfully.
sil_greek_polytonic.kps - info KM05002: Building sil_greek_polytonic.kps
sil_greek_polytonic.kps - error KM04011: Keyboard file C:\src\keyboards\release\sil\sil_greek_polytonic\build\sil_greek_polytonic.kmx was not found. Has it been compiled?
sil_greek_polytonic.kps - info KM05007: sil_greek_polytonic.kps failed to build.
darcywong00 commented 3 months ago

Likely user error (me). I now see "all" should have been "any". When I set targets to "all", I see the Keyman Developer IDE showed the pre-existing target "Windows".

TLDR: "all" not a valid target. Should IDE flag it?

mcdurdin commented 3 months ago

TLDR: "all" not a valid target. Should IDE flag it?

Yes, let's turn this issue into generating a warning from kmc when unknown (or no) targets selected for keyboard.