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

Simple changes in a scala multi project build take very long to compile preventing quick iteration #13720

Open
alpar-t opened this issue Jul 8, 2020 · 2 comments
Labels
a:feature A new functionality in:scala-plugin

Comments

@alpar-t
Copy link

alpar-t commented Jul 8, 2020

There's no compiler avoidance for Scala multi project builds.
Making a one line change such as adding a comment in a project that depend on it to be rebuilt.
There's no incremental compilation for the upstream projects either making it painful to do a simple change and quickly run some tests.

Expected Behavior

Scala uses the @CompilerClasspath similarly to Java to detect ABI compatible changes and skips re-building upstream projects.

Current Behavior

There's no compiler avoidance for Scala.

Context

We switched to building a large multi project Scala project with Gradle and have been mostly happy with it, but ran into some challenges for local development in small iterations of changing a few lines and running tests. We are working around these by using bloop and the bloop Gradle integration, but we'd rather use a single build tool with a single IDE setup. We use IntelliJ so our IDE builds default to Gradle too.

@jbartok
Copy link
Member

jbartok commented Sep 13, 2021

Could you pls. provide us with a reproducer? Will make this issue much simpler to investigate.

@jbartok jbartok self-assigned this Sep 13, 2021
@alpar-t
Copy link
Author

alpar-t commented Sep 13, 2021

@jbartok excited to see this get some traction this is still super important for us!
Please see this sample project, it uses Java classes instead of Scala but compiles them with the Scala plugin, so they behave like Scala classes for the purposes of this issue:
scala-sample.tar.gz

Here's the first build of the project: https://scans.gradle.com/s/v4l2vtpvshlr4/timeline I then edited Greeter.java to change the String value it returns from "Hello Mars" to "Hello Earth" and built again https://scans.gradle.com/s/cq7vt3iiiz2qw/timeline?details=rblabgyu6onns . Note that on the second run the root project was re-compiled even trough there were no ABI changes in :dependency. Thus the feature documented here for Java https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_compile_avoidance is not implemented for Scala, even trough Scala compilation times are much longer and Scala projects would benefit more.

@jbartok jbartok removed their assignment Sep 14, 2021
@big-guy big-guy changed the title Simple changes in a scal multi poject build take very long to compile preventing quick iteration Simple changes in a scala multi project build take very long to compile preventing quick iteration Sep 15, 2021
@big-guy big-guy removed the to-triage label Sep 15, 2021
@ljacomet ljacomet self-assigned this Sep 15, 2021
@ljacomet ljacomet removed their assignment Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:scala-plugin
Projects
None yet
Development

No branches or pull requests

6 participants