ConfigurationCache and InvalidUserCodeException with git

I’m seeing the following issues with git versioning plugins

  • pl.allegro.tech.build:axion-release-plugin:1.15.4

I looked at the various other plugins but they don’t seem to work with configuration cache. Am I missing something here ?
Thanks in advance for suggestions.

org.gradle.api.InvalidUserCodeException: Starting an external process '/opt/homebrew/bin/git --version' during configuration time is unsupported.
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1$build$diagnostics$1.get(DefaultProblemFactory.kt:86)
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1$build$diagnostics$1.get(DefaultProblemFactory.kt:86)
	at org.gradle.internal.problems.DefaultProblemDiagnosticsFactory$DefaultProblemStream.getImplicitThrowable(DefaultProblemDiagnosticsFactory.java:111)
	at org.gradle.internal.problems.DefaultProblemDiagnosticsFactory$DefaultProblemStream.forCurrentCaller(DefaultProblemDiagnosticsFactory.java:100)
	at org.gradle.configurationcache.problems.DefaultProblemFactory$problem$1.build(DefaultProblemFactory.kt:86)
	at org.gradle.configurationcache.initialization.DefaultConfigurationCacheProblemsListener.onExternalProcessStarted(ConfigurationCacheProblemsListener.kt:98)
	at org.gradle.configurationcache.InstrumentedInputAccessListener.externalProcessStarted(InstrumentedInputAccessListener.kt:111)
	at org.gradle.internal.classpath.Instrumented.externalProcessStarted(Instrumented.java:509)
	at org.gradle.internal.classpath.Instrumented.externalProcessStarted(Instrumented.java:517)
	at org.gradle.internal.classpath.Instrumented.start(Instrumented.java:371)
	at org.eclipse.jgit.util.FS.readPipe(FS.java:1383)
	at org.eclipse.jgit.util.FS.readPipe(FS.java:1345)
	at org.eclipse.jgit.util.FS.discoverGitSystemConfig(FS.java:1534)
	at org.eclipse.jgit.util.FS.getGitSystemConfig(FS.java:1631)
	at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:106)
	at org.eclipse.jgit.util.SystemReader.getSystemConfig(SystemReader.java:386)
	at org.eclipse.jgit.util.SystemReader.getUserConfig(SystemReader.java:334)
	at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:162)
	at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:625)
	at org.eclipse.jgit.api.Git.open(Git.java:93)
	at org.eclipse.jgit.api.Git.open(Git.java:73)
	at pl.allegro.tech.build.axion.release.infrastructure.git.GitRepository.<init>(GitRepository.java:70)
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite.access$401(CallInterceptorsSet.java:132)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite$4.callOriginal(CallInterceptorsSet.java:184)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$1.doIntercept(CallInterceptorsSet.java:56)
	at org.gradle.internal.classpath.intercept.CallInterceptorsSet$DecoratingCallSite.callConstructor(CallInterceptorsSet.java:181)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
	at pl.allegro.tech.build.axion.release.infrastructure.di.ScmRepositoryFactory.create(ScmRepositoryFactory.groovy:23)
	at pl.allegro.tech.build.axion.release.infrastructure.di.ScmRepositoryFactory$create.call(Unknown Source)

See Using jgit with Gradle configuration cache for the full story. :slight_smile:

1 Like