gradle
gradle copied to clipboard
Scala incremental compilation should be part of build outputs
When using a remote build cache Gradle downloads the class files from the cache if there's no change, but substantially does a full re-compile, even if there's only a small one class change.
Note that this might be conditioned by sbt/zinc#707 - I'm not sure the analysis file is portable.
Expected Behavior
The zinc analysis file is part of the build outputs, so it too is downloaded from the build cache so on the next run we get incremental compilation.
Current Behavior
The zinc analysis file is not considered part of build outputs, one can see 'Zinc is doing a full recompile since the analysis file doesn't exist' in the info log. This causes zinc to do a full re-compile even trough all the class files are present and a single class changed.
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.
Zinc 1.4.0 (which includes https://github.com/sbt/zinc/issues/707) has now been released.
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to to let know so we can reopen the issue. Please try to provide steps to reproduce, a quick explanation of your use case or a high-quality pull request.
I think this is still relevant
@wolfs can we keep this open for the community please? I think it's still relevant.
Sure. When the stale action comes around next time, please comment after the first "warning", so the issue isn't closed again.