Closed wuseal closed 2 years ago
Hi, I tested with 4.1.1, there is a behavior that I think not the same like before
run kscript https://raw.githubusercontent.com/wuseal/Scripts/main/test.kts script code
kscript https://raw.githubusercontent.com/wuseal/Scripts/main/test.kts
@file:DependsOn("com.sealwu:kscript-tools:1.0.2") "ls".runCommand()
with failed information
[kscript] [ERROR] Exit Code : 1 [kscript] [ERROR] Stdout : '' [kscript] [ERROR] Stderr : '/Users/haibao/.cache/kscript/jar_3592325632d88f4324f2326b81bd87b2/Test.kts:3:6: error: unresolved reference: runCommand[nl]"ls".runCommand()[nl] ^[nl]' [kscript] [ERROR]
run kscript https://raw.githubusercontent.com/wuseal/Scripts/main/testOk.kts script code:
kscript https://raw.githubusercontent.com/wuseal/Scripts/main/testOk.kts
@file:DependsOn("com.sealwu:kscript-tools:1.0.2") import runCommand "ls".runCommand()
works fine, the difference is that one more code
import runCommand
For kotlin standard syntax, I think no need to import root function that without package declarations
How do you think?
In this case, I would keep the import. I plan to do one more big rework in kscript so that refactoring might resolve this issue.
Hi, I tested with 4.1.1, there is a behavior that I think not the same like before
run
kscript https://raw.githubusercontent.com/wuseal/Scripts/main/test.kts
script codewith failed information
run
kscript https://raw.githubusercontent.com/wuseal/Scripts/main/testOk.kts
script code:works fine, the difference is that one more code
For kotlin standard syntax, I think no need to import root function that without package declarations
How do you think?