Skip to content

Improve Scala compilation caching and build config#2967

Open
ribafish wants to merge 6 commits intoapache:masterfrom
ribafish:gk/cachingImprovements
Open

Improve Scala compilation caching and build config#2967
ribafish wants to merge 6 commits intoapache:masterfrom
ribafish:gk/cachingImprovements

Conversation

@ribafish
Copy link

@ribafish ribafish commented Mar 6, 2026

Changes

  • Bump scala-maven-plugin from 4.9.6 to 4.9.10 to fix testCompile cache misses
  • Bump semanticdb-scalac from 4.9.6 to 4.15.2
  • Enhance build cache configuration for scalaCompile tasks:
    • Track sourceDirectory and testSourceDirectory as explicit file inputs
    • Track pluginArtifacts and dependencies as iterated properties instead of ignoring them
    • Track compilerPlugins with IGNORED_PATH normalization
    • Remove classpath from ignored properties (deprecated, included in classpathElements)
  • Add .idea/ to .gitignore to exclude IntelliJ IDEA configuration

Impact

These changes improve Maven build caching accuracy by properly tracking all compilation inputs, reducing unnecessary cache misses during incremental builds.

Copy link
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful contribution 👍

Grateful if you could share build time enhancement metrics!

@chibenwa
Copy link
Contributor

chibenwa commented Mar 6, 2026

Cc @jeantil not sure you have time for this but it will for sure interest you

@jeantil
Copy link
Contributor

jeantil commented Mar 6, 2026

Looks good to me, I had already investigated these changes before after clay pointed out https://github.com/gradle/develocity-build-config-samples/pull/2087/changes to me
however at the time there was a bug in the extension and I reverted the changes

when I upgraded the extension back I forgot to apply the changes again

go

(discussion on the ASF slack https://the-asf.slack.com/archives/CF6PY5M4N/p1758051950501649)

test-run.log
build
.mvn/.develocity
.idea/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nitpick

  1. this change is unrelated

  2. this local env specific exclusion is more relevant in

  • $GIT_DIR/info/exclude.
  • or a configured global ignore file for your user (usually achieved by setting core.excludesFile)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants