Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(developer): a package with a File element missing a Name element crashes kmc #11351

Closed
mcdurdin opened this issue May 3, 2024 · 1 comment · Fixed by #11352
Closed

bug(developer): a package with a File element missing a Name element crashes kmc #11351

mcdurdin opened this issue May 3, 2024 · 1 comment · Fixed by #11352
Assignees
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented May 3, 2024

kmc 17.0.316-beta.

Compiling a .kps that is missing <Name>...</Name> for a <File/> element causes the compiler to crash:

TypeError: The "path" argument must be of type string. Received undefined
  File "node:internal/errors", line 399, col 5, in new NodeError
  File "node:internal/validators", line 163, col 11, in validateString
  File "node:path", line 752, col 5, in Module.basename
  File "../../../src/compiler/package-metadata-collector.ts", line 43, col 59, in file
  File "<anonymous>", in Array.find
  File "../../../src/compiler/package-metadata-collector.ts", line 43, col 26, in PackageMetadataCollector.getKeyboardFileData
  File "../../../src/compiler/package-metadata-collector.ts", line 26, col 34, in PackageMetadataCollector.collectKeyboardMetadata
  File "../../../src/compiler/kmp-compiler.ts", line 348, col 32, in KmpCompiler.transformKpsFileToKmpObject
  File "../../../src/compiler/kmp-compiler.ts", line 154, col 22, in KmpCompiler.transformKpsToKmpObject
  File "../../../src/compiler/kmp-compiler.ts", line 95, col 30, in KmpCompiler.run
@mcdurdin mcdurdin added this to the A18S1 milestone May 3, 2024
@mcdurdin mcdurdin self-assigned this May 3, 2024
Copy link

sentry-io bot commented May 3, 2024

Sentry Issue: KEYMAN-DEVELOPER-1XH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant