Skip to content

Using Kotlin compiler directly instead of subprocess and kotlinc #217

Closed

Description

@mikroskeem

Hello!

Firstly, this project is neat. I haven't seen Kotlin scripting in the wild before and good luck with it!

When I looked into its internals, I saw this project using subprocesses (e.g invoking kotlinc) instead of Kotlin compiler native API (can it even be called API?). While this sort-of works for this project, I find it quite dirty and crap for e.g actually embedding Kotlin scripting support for other applications.

Why is this project using kotlinc and why isn't compiler interface used? If there are some limitations, are they reported to JetBrains?

I'm bringing up this question mainly to ask if you've ever looked into using Kotlin compiler directly, or attempted to do so or... whatever - I want to implement Kotlin scripting support into my Java application without depending on subprocesses, because that feels more correct to me. However I found compiler interface bit hard to wrap my head around in 2 hour time frame and gave up, so I'm looking for answers around the internet.

Thanks.

Activity

  1. holgerbrandl commented on Mar 6, 2019

    @holgerbrandl
    Collaborator

    There's a PR #102 which implements this functionality. It's on my ever-growing list of things to do, and since it's such a fundamental change without direct user benefits it's, unfortunately, sitting there since a while already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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