Closed quentinmarciset closed 1 year ago
Please add std lib to the dependencies, add proper imports for extension functions and recheck.
@file:DependsOn("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21")
I had a similar issue, so maybe it is the cause of the issue.
If that's the case, I will add std lib to the classpath by default in the next version of kscript.
Unfortunately this provides the same result. Already tried with different kotlin-stdlib versions.
Does it happen only when you are packaging the script or also during the normal execution? Please provide a small test case reproducing the issue.
I have tested it in kscript 4.1.1 with only the following:
val lineSeparator = System.getProperty("line.separator").encodeToByteArray()
And it seems to work as required, without any other imports or dependencies.
Closing as: unable to reproduce.
Hello,
I am trying to migrate kscript from 3.0.2 to 4.1.1.
kscript --package main.kt
gives me :The
write()
issue is caused by the unresolvedencodeByteArray()
I can't figure out why it can't resolve it. No issue on kscript v3.0.2.