Comments (4)
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.
from kscript.
Unfortunately this provides the same result. Already tried with different kotlin-stdlib versions.
from kscript.
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.
from kscript.
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.
from kscript.
Related Issues (20)
- Create kscript package for scoop HOT 7
- Don't work @file:Import("absolute/path/to/myutils.kt") HOT 2
- Basic hello world example does not work with interpreter HOT 1
- Allow setting an alternate kotlinc binary (or use kotlinc-jvm)
- Add an option to suppress final error output HOT 10
- [Windows] path to kotlinc not quoted HOT 4
- How to load text file via relative path? HOT 2
- kscript --interactive does not resolve the variables defined inside .kts file HOT 1
- kscript environment variable substitution for repositories no longer works HOT 6
- Does not work with Kotlin 1.9.0 HOT 12
- Can kscript used in Android project written in kotlin HOT 1
- Can you change kscript's included java version? HOT 1
- [question] daemon concept HOT 4
- Does not support spaces in KOTLIN_HOME variable.
- --package is broken in 4.2.3 - doesn't include stuff in local dependencies
- Fresh checkout of repo causes failure on `gradle run` and other ways of invoking `kscript` fail for the same reason
- kscript downloading Kotlin Native jars during dependency resolution - why? HOT 1
- Example in README with @file:Import fails
- Use version 4.2.3 on Dockerfile
- Does not work with Kotlin 2.0.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kscript.