kscripting / kscript

Scripting enhancements for Kotlin
MIT License
2.08k stars 126 forks source link

Seeing dependency issue running script directly #193

Closed jsonbrooks closed 5 years ago

jsonbrooks commented 5 years ago

... but not when I run with --package

I'm trying to use a library I created: @file:DependsOn("io.krews:krews:0.1.1")

I'm getting the following when I run: kscript sampleWorkflow.kts -c sampleWorkflow.conf -o local

I see the following: Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStartObject(Ljava/lang/Object;)V at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:626) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33) It can't find a method in a dependency of my library "krews".

Everything looks fine when I run:

kscript --package sampleWorkflow.kts ./sampleWorkflow -c sampleWorkflow.conf -o local

Could it be an issue using dependencies of dependencies? Please let me know if you need more detail.

holgerbrandl commented 5 years ago

Could you provide an actually example script which I could use to reproduce the issue?

In general sub-dependencies are resolved as well.