Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable other languages (e.g. Kotlin) to implement compile avoidance #5226

Open
yogurtearl opened this issue May 1, 2018 · 9 comments

Comments

@yogurtearl
Copy link

@yogurtearl yogurtearl commented May 1, 2018

The compile avoidance in the Java plugin should be built in a way that is can be used from other language plugins. e.g. Kotlin.
https://docs.gradle.org/3.4/userguide/java_plugin.html#sec:java_compile_avoidance

Related Kotlin issue.
https://youtrack.jetbrains.com/issue/KT-24203

@melix

This comment has been minimized.

Copy link
Member

@melix melix commented May 5, 2018

It's mostly about custom snapshotting. For this we need to know which parts of the bytecode produced by the Kotlin compiler are relevant for the API.

@yogurtearl

This comment has been minimized.

Copy link
Author

@yogurtearl yogurtearl commented May 5, 2018

Would be good to have an gradle API so language plugins could describe their ABI programmatically.

See https://youtrack.jetbrains.com/issue/KT-24203 for more info on the Kotlin ABI

@yogurtearl

This comment has been minimized.

Copy link
Author

@yogurtearl yogurtearl commented May 30, 2018

@melix could Gradle provide a way for language plugins to define there own custom snapshotting?

@melix

This comment has been minimized.

Copy link
Member

@melix melix commented May 31, 2018

I don't see this coming anytime soon. Snapshotting is very sensitive, and an area of the code we still change often/optimize. There are lots of things to take into consideration. So while it may happen in the future, there's no immediate plan.

@yogurtearl

This comment has been minimized.

Copy link
Author

@yogurtearl yogurtearl commented May 31, 2018

In the meantime, while language plugins can't define this themselves, would you consider a in-built compile avoidance impl for Kotlin?

" we need to know which parts of the bytecode produced by the Kotlin compiler are relevant for the API."
Is there a doc explaining exactly what info you would need for such an impl for Kotlin?

@lptr

This comment has been minimized.

Copy link
Member

@lptr lptr commented May 31, 2018

Compile avoidance for Kotlin unfortunately cannot be included in Gradle itself. We talked to JetBrains about this, and the Kotlin compiler is still adding features that affect ABI. This means the ABI definition needs to live next to the Kotlin compiler, which means the Kotlin plugin itself.

We are considering doing this also for Groovy, which means we need to open up the API somewhat anyway. We are doing some work around snapshotting currently, I'll keep an eye out for what exactly we'd need to do to make this happen.

@yogurtearl

This comment has been minimized.

Copy link
Author

@yogurtearl yogurtearl commented Jan 14, 2019

@lptr Is the ABI generation feature in KT-25128 sufficient for gradle to do compile avoidance for Kotlin?

@lptr lptr added @build-cache and removed in:build-cache labels Apr 16, 2019
@TWiStErRob

This comment has been minimized.

Copy link
Contributor

@TWiStErRob TWiStErRob commented Sep 23, 2019

@lptr is this scheduled on a roadmap yet, or just an idea forming?

@lptr

This comment has been minimized.

Copy link
Member

@lptr lptr commented Sep 24, 2019

General support for arbitrary languages wrt compilation avoidance is not on our roadmap currently. Note that JetBrains is working on Kotlin compile avoidance in another way: https://youtrack.jetbrains.com/issue/KT-26305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.