#While working on the Java SDK, I'm
1 messages · Page 1 of 1 (latest)
I suppose you're relying on adding java to the list of SDKs in core? To use an sdk you don't actually need it to be referenced in core, that's just to allow for a simpler name or alias.
When using dagger init --sdk=, you can put the reference to your runtime module, for example, dagger init --sdk=sdks/java (to use ./sdks/java/dagger.json). This allows for a faster feedback loop that you can use even with latest dagger, so you don't even need to build a dev engine for this.
To debug the runtime module you can access it like any other module. For example:
dagger call -m sdks/java sdk-source terminal
Assuming the runtime module has a SdkSource field, and // +defaultPath=... and // +ignore pragmas in the constructor to populate it. That command will drop you in a shell to inspect the source files that the runtime module will receive.
You can similarly call module-runtime and pass a ModuleSource argument through a module reference. As for inspectionJson, you can either create one locally and use it, or have the runtime module ignore codegen if that file's empty so you can test other parts of the module easily.
For example:
dagger call -m sdks/java module-runime --mod-source ./my-module --inspection-json ./schema.json terminal