You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are submitting a bug, please include the following:
summary of problem: Gradle configuration error when remote git branch is pruned in CI job
gradle or maven version: Gradle 6.8
spotless version: 6.3.0
operating system and version: currenly unknown for it's CI job, investigate later.
copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
I'm trying to build a package as aritifact on non-master branch. And it seems CI job had pruned the remote branch origin/master. But spotless still check the remote branch during Gradle configuration(evaluateing) time, which causes an error.
2022/03/30 16:45:21 Cause 1: java.lang.IllegalArgumentException: No such reference 'origin/master'
2022/03/30 16:45:21 at com.diffplug.spotless.extra.GitRatchet.rootTreeShaOf(GitRatchet.java:211)
2022/03/30 16:45:21 at com.diffplug.gradle.spotless.SpotlessTask.setupRatchet(SpotlessTask.java:94)
2022/03/30 16:45:21 at com.diffplug.gradle.spotless.FormatExtension.setupTask(FormatExtension.java:763)
2022/03/30 16:45:21 at com.diffplug.gradle.spotless.JavaExtension.setupTask(JavaExtension.java:256)
2022/03/30 16:45:21 at com.diffplug.gradle.spotless.SpotlessExtensionImpl.lambda$createFormatTasks$6(SpotlessExtensionImpl.java:73)
2022/03/30 16:45:21 at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
2022/03/30 16:45:21 at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:44)
Should spotless check the remote branch during task execution time rather than configuration time?
The text was updated successfully, but these errors were encountered:
Should spotless check the remote branch during task execution time rather than configuration time?
The ratchet point is used as part of up-to-date checking, which requires origin/master to be resolved at configuration time. #710 is the long-term fix for this, and you can find tips on deep vs shallow clones there.
If you are submitting a bug, please include the following:
gradlew spotless[Apply/Check] --stacktrace
I'm trying to build a package as aritifact on non-master branch. And it seems CI job had pruned the remote branch
origin/master
. But spotless still check the remote branch during Gradle configuration(evaluateing) time, which causes an error.Spotless configuration block(s)
Should spotless check the remote branch during task execution time rather than configuration time?
The text was updated successfully, but these errors were encountered: