keymanapp / keyman

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

bug(developer): kmc: TypeError: Cannot read properties of undefined (reading 'description') #11856

Open sentry-io[bot] opened 2 weeks ago

sentry-io[bot] commented 2 weeks ago

Trying to compile a minimal project with the following source/mykeyboard.kps file:

<Package>
  <Info>
    <Name>MyKeyboard</Name>
  </Info>
  <Files>
    <File>
      <Name>../build/mykeyboard.kmx</Name>
    </File>
  </Files>
  <Keyboards>
    <Keyboard>
      <Name>MyKeyboard</Name>
      <ID>mykeyboard</ID>
    </Keyboard>
  </Keyboards>
</Package>          

with kmc build mykeyboard.kpj results in a crash. I tried to add description tags but still got the crash.

TypeError: Cannot read properties of undefined (reading 'description')
  File "../../src/keyboard-info-compiler.ts", line 297, in KeyboardInfoCompiler.run
    keyboard_info.version = kmpJsonData.info.version.description;
  File "/usr/local/lib/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildActivity.js", line 9, in BuildKeyboardInfo.runCompiler
    const result = await compiler.run(infile, outfile);
  File "/usr/local/lib/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildKeyboardInfo.js", line 44, in BuildKeyboardInfo.build
    return await super.runCompiler(compiler, infile, outputFilename, callbacks, { ...options, sources });
  File "/usr/local/lib/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildProject.js", line 103, in ProjectBuilder.buildTarget
    let result = await activity.build(infile, outfile, callbacks, options);
  File "/usr/local/lib/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildProject.js", line 84, in ProjectBuilder.buildProjectTargets
    return await this.buildTarget(this.project.projectFile, activity);
...
(5 additional frame(s) were not displayed)

Keyman 17.0.236

Sentry Issue: KEYMAN-DEVELOPER-21Q

mcdurdin commented 1 week ago

Don't forget to update the documentation in keymanapp/help.keyman.com#1335 once this is addressed.