elect
07/14/2022, 4:52 AMWith all of this in mind, it’s best to split the project into two modules.while in the example of Oliveira mentioned above he has definition and host inside one single module. And the same is the
simple-main-kts
inside "kotlin-script-examples".
Is there any specific reason to have them splitted?elect
07/14/2022, 7:10 AMmain
(as suggested by docs) then the evaluation and configuration gets called. If I try using the IDE instead, no. Is this expected? Do I have to do something special for the Idea to recognize them? (ie meta-inf)elect
07/14/2022, 8:04 AM@KotlinScript
)?
Looking at the code I don't think so 😕elect
07/14/2022, 4:43 PMelect
07/18/2022, 12:24 PMsmain.kts
scripts in "kotlin-script-examples" by running the scripts itself (right click -> Run), but I get:
warning: default scripting plugin is disabled: The provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar is not compatible with this version of compiler
error: unable to evaluate script, no scripting plugin loaded
elect
07/19/2022, 9:02 AM@ScriptBody
annotationPiotr Krzemiński
07/20/2022, 7:04 AMelect
07/20/2022, 9:40 AMscriptBodyTarget
doesn't exist, probably a relict or to be implemented
• unless I explicitly force the superclass by defining baseClass
, the script class doesn't seem to implement the Script class defined by @KotlinScript
val res = evalFile(File("$TEST_DATA/hello-resolve-junit.tf.kts"))
val inst = res.valueOrThrow().returnValue.scriptInstance!! as Script
println(inst.pro2) // works only with baseClass(Script::class)
Javier
07/20/2022, 11:38 AMelect
07/20/2022, 4:35 PMandylamax
07/26/2022, 1:12 PM@file:Imports
still not supported by IDE?ESchouten
07/26/2022, 1:24 PMjmfayard
07/30/2022, 3:07 PMjmfayard
07/31/2022, 5:15 PMjmfayard
08/01/2022, 6:43 AMaltavir
08/18/2022, 9:55 AMjmfayard
08/23/2022, 3:22 AMsdk install kotlin
or snap install kotlin
on heroku and Google isn't my friend either.
Any idea?holgerbrandl
08/27/2022, 4:45 PMribesg
09/02/2022, 2:43 PMmikehearn
09/05/2022, 2:08 PMNikky
09/05/2022, 7:56 PM.main.kts
files recently, freezing the IDE, especially bad when there is something invalid in the @DependsOn
or such
fixes itself if i somehow manage to close the file though..Peter
09/08/2022, 5:25 AMSebastian Schuberth
09/19/2022, 6:11 PMkotlinScriptDef
and kotlinScriptDefExtensions
Gradle configurations, and which to use when?Vampire
09/26/2022, 12:45 PMzt
10/09/2022, 5:57 PMhumblehacker
10/13/2022, 2:10 AMrunCommand()
from kscript-tools. Anyone familiar with this? I've added the dependency to my script:
@file:DependsOn("com.sealwu:kscript-tools:1.0.2")
and I've added a line to my script to test it:
"ls".runCommand()
But when I run the script, runCommand()
can't be found:
error: unresolved reference: runCommand
If I run the script from IDEA using
kscript --idea myscript.kts
it works fine. It's only when I run the script from the command line that it fails.
Anyone have any idea what I'm doing wrong?Sebastian Schuberth
10/13/2022, 8:00 AMw: Script 'osadl.rules.kts' is not supposed to be used along with regular Kotlin sources, and will be ignored in the future versions by default. (Use -Xallow-any-scripts-in-source-roots command line option to opt-in for the old behavior.)
for a script that's committed as a resource in a Kotlin project (see https://github.com/oss-review-toolkit/ort/blob/osadl-rules/evaluator/src/main/resources/rules/osadl.rules.kts). What's this supposed to tell me? I mean, the script is not in a source root of Kotlin source set after all...rnett
10/15/2022, 3:01 AMzt
10/18/2022, 7:45 PMAdam S
11/06/2022, 1:30 PMprintln()
, and also the Micrometer dependency prints something
➜ kts-px /Users/me/projects/kts-px/px.main.kts
Nov 06, 2022 2:29:49 PM io.micrometer.core.instrument.push.PushMeterRegistry start
INFO: publishing metrics for LoggingMeterRegistry every 1m
I've tried with logback-classic and slf4j-simple, but I can't figure it out... any ideas?Adam S
11/06/2022, 1:30 PMprintln()
, and also the Micrometer dependency prints something
➜ kts-px /Users/me/projects/kts-px/px.main.kts
Nov 06, 2022 2:29:49 PM io.micrometer.core.instrument.push.PushMeterRegistry start
INFO: publishing metrics for LoggingMeterRegistry every 1m
I've tried with logback-classic and slf4j-simple, but I can't figure it out... any ideas?