-
Notifications
You must be signed in to change notification settings - Fork 5.1k
9.4.0 seems to include build directory path in the key for build script compilation cache entries #36964
Description
Current Behavior
If the same build is checked out at two locations then build script compilation cache entries populated from one location are not reused at the other location.
Expected Behavior
Build script compilation cache entries are reused between checkouts of the same build located at different filesystem locations.
Context (optional)
Looks like something made build scripts not relocatable between 9.3.1 and 9.4.0.
Self-contained Reproducer Project
Create a build at /tmp/9.4.0-regression. Add a settings.gradle.kts file:
rootProject.name = "9.4.0-regression"
and a build.gradle.kts file
plugins {
java
}
to it.
Install a wrapper for 9.3.1 into the build. Run ./gradlew :tasks --scan and see that build scripts were compiled.
Copy /tmp/9.4.0-regression to /tmp/9.4.0-regression-9.3.1. Go into the newly copied directory and run ./gradlew :tasks --scan and see that build scripts were not compiled.
Go back to /tmp/9.4.0-regression and install wrapper for 9.4.0. Run ./gradlew :tasks --scan and see that build scripts were compiled.
Finally copy /tmp/9.4.0-regression to /tmp/9.4.0-regression-9.4.0. Go into the newly copied directory and run ./gradlew :tasks --scan and see that build scripts were compiled which shows the regression.
Gradle version
9.4.0
Gradle version that used to work
9.3.1
Build scan URL (optional)
Links to 4 scans included in reproduction steps obove
Your Environment (optional)
Not significant.