Skip to content

Running the kotlin compiler #89

Open
@jayvdb

Description

@jayvdb

The following doesn't work, because there is no (predictable) value which can be used to populate the -kotlin-home cli arg. Is there a way we can make this possible ? Some CLI arg substitution that can occur within jgo?

$ jgo --additional-endpoints org.jetbrains.kotlin:kotlin-stdlib org.jetbrains.kotlin:kotlin-compiler Foo.kt
INFO 2023-02-11 15:01:26,477: First time start-up may be slow. Downloaded dependencies will be cached for shorter start-up times in subsequent executions.
INFO 2023-02-11 15:01:28,947: Inferring main class from jar manifest
INFO 2023-02-11 15:01:29,021: Inferred main class: org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
warning: unable to find kotlin-stdlib.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
warning: unable to find kotlin-script-runtime.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
warning: unable to find kotlin-reflect.jar in the Kotlin home directory. Pass either '-no-reflect' or '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
Foo.kt:8:17: error: cannot access built-in declaration 'kotlin.Int'. Ensure that you have a dependency on the Kotlin standard library
fun indexing(): Int {
                ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions