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

Codegen failing on windows #442

Open
johanandren opened this issue Dec 21, 2022 · 2 comments
Open

Codegen failing on windows #442

johanandren opened this issue Dec 21, 2022 · 2 comments
Labels
bug Something isn't working kalix-runtime Runtime and SDKs sub-team

Comments

@johanandren
Copy link
Contributor

johanandren commented Dec 21, 2022

Class not found when running codegen on windows only, reported in the forums:
https://discuss.kalix.io/t/kalix-annotations-not-found/182

Building Typescript definitions from static JS with command: C:\data\kalix\shopping-cart\node_modules.bin\pbts C:\data\kalix\shopping-cart\lib\generated\proto.js -o C:\data\kalix\shopping-cart\lib\generated\proto.d.ts
installing estraverse@^5.1.0
Invoking Kalix codegen with command: C:\data\kalix\shopping-cart\node_modules@kalix-io\kalix-scripts\bin\kalix-codegen-js.bin --proto-source-dir ./proto --source-dir ./src --generated-source-dir ./lib/generated --test-source-dir ./test --integration-test-source-dir ./integration-test
Inspecting proto file descriptor for Kalix code generation…
Exception in thread “main” java.lang.NoClassDefFoundError: kalix.Annotations
at io.kalix.codegen.DescriptorSet$.$anonfun$fileDescriptors$2(DescriptorSet.scala:45)
at scala.util.Using$.$anonfun$apply$1(Using.scala:261)
at scala.util.Using$.apply(Using.scala:113)
at io.kalix.codegen.DescriptorSet$.fileDescriptors(DescriptorSet.scala:43)
at io.kalix.codegen.js.Cli$.main(Cli.scala:85)
at io.kalix.codegen.js.Cli.main(Cli.scala)
Running Invoking Kalix codegen failed, process: [C:\data\kalix\shopping-cart\node_modules@kalix-io\kalix-scripts\bin\kalix-codegen-js.bin], args: [–proto-source-dir,./proto,–source-dir,./src,–generated-source-dir,./lib/generated,–test-source-dir,./test,–integration-test-source-dir,./integration-test]

@johanandren johanandren added bug Something isn't working kalix-runtime Runtime and SDKs sub-team labels Dec 21, 2022
@timppa67
Copy link

It seems that this is probablyt a known issue:

`

Known issues

Invoking Kalix codegen with command: /Users/francisco/Git/kalix-javascript-sdk/samples/js/js-replicated-entity-shopping-cart/node_modules/@kalix-io/kalix-scripts/bin/kalix-codegen-js.bin --proto-source-dir ./proto --source-dir ./src --generated-source-dir ./lib/generated --test-source-dir ./test
Inspecting proto file descriptor for Kalix code generation...
Exception in thread "main" java.lang.NoClassDefFoundError: kalix.Annotations

This happens when you generate the codegen with Java 17 instead of 11 and then you run npm run build on one of the samples.`

To verify this I used Java SDK 11 and rebuilt my own copy of codegen and it works on Windows. So this known issue seems to be a valid thing.

Is there any estimate / idea when that known issue would be fixed?

@johanandren
Copy link
Contributor Author

Not entirely sure I follow.

The codegen is a native executable (using GraalVM) not using any local Java installation, are you saying you rebuilt an image of your own but based on a different GraalVM version than 22.1.0, or that you built the codegen Java library with JDK 17 first and then generated a new native image with the default GraalVM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kalix-runtime Runtime and SDKs sub-team
Projects
None yet
Development

No branches or pull requests

2 participants