Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle git is failing the configuration-cache #816

Open
credmond-git opened this issue Jul 8, 2024 · 1 comment
Open

Gradle git is failing the configuration-cache #816

credmond-git opened this issue Jul 8, 2024 · 1 comment

Comments

@credmond-git
Copy link

credmond-git commented Jul 8, 2024

What happened?

PS D:\dev\audit> ./gradlew --configuration-cache help
Picked up JAVA_TOOL_OPTIONS: -Dlog4j.formatMsgNoLookups=true
Calculating task graph as no cached configuration is available for tasks: help
Type-safe project accessors is an incubating feature.
Project accessors enabled, but root project name not explicitly set for 'buildSrc'. Checking out the project in different folders will impact the generated code and implicitly the buildscript classpath, breaking caching.

Configure project :
Git Build Information
last tag: v0.2X.0
version: v0.2X.0-6-XXXXXXXdirty
gitHash: XXXXXXX
isCleanTag: false
branchName: feat/XXXXXXXX

Task :help

Welcome to Gradle 8.8.

To run a build, run gradlew ...

To see a list of available tasks, run gradlew tasks

To see more detail about a task, run gradlew help --task

To see a list of command-line options, run gradlew --help

For more detail on using Gradle, see https://docs.gradle.org/8.8/userguide/command_line_interface.html

For troubleshooting, visit https://help.gradle.org

FAILURE: Build failed with an exception.

  • What went wrong:
    Configuration cache problems found in this build.

12 problems were found storing the configuration cache, 5 of which seem unique.

See the complete report at file:///D:/dev/audit/build/reports/configuration-cache/9342athxdaeem8n46eeh249m6/cnfhvzi1n5rzefp1th071mava/configuration-cache-report.html

Starting an external process 'git version' during configuration time is unsupported.
Starting an external process 'git describe --tags --always --first-parent --abbrev=7 --match=* HEAD' during configuration time is unsupported.
Starting an external process 'git status --porcelain' during configuration time is unsupported.
Starting an external process 'git rev-parse HEAD' during configuration time is unsupported.
Starting an external process 'git branch --show-current' during configuration time is unsupported.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 16s
11 actionable tasks: 2 executed, 9 up-to-date
Configuration cache entry discarded with 12 problems.

To get the git information we use

val versionDetails: groovy.lang.Closure<VersionDetails> by extra
        val details = versionDetails()

        println("Git Build Information")
        println("last tag: ${details.lastTag}")
        println("version: ${details.version}")
        println("gitHash: ${details.gitHash}")
        println("isCleanTag: ${details.isCleanTag}")
        println("branchName: ${details.branchName}")

What did you want to happen?

Gradle Git properly supports the new configuration cache features.

See possible solutions in this thread
https://discuss.gradle.org/t/using-jgit-with-gradle-configuration-cache/45410/8

@xenoterracide
Copy link

duplicate of #713

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

No branches or pull requests

2 participants