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

Tasks not compatible with the configuration cache #4

Closed
autonomousapps opened this issue Apr 21, 2022 · 2 comments · Fixed by #20
Closed

Tasks not compatible with the configuration cache #4

autonomousapps opened this issue Apr 21, 2022 · 2 comments · Fixed by #20
Milestone

Comments

@autonomousapps
Copy link
Contributor

autonomousapps commented Apr 21, 2022

First of all, this is not surprising, as dependency analysis in general is not well-supported by the configuration cache (CC). However, since I'm adding this to my project, I want an issue to refer to explain why CC has been disabled for these tasks.

I'm using the runtime API for this, available since Gradle 7.4. This looks like:

tasks.named('dependencyGuard') {
  notCompatibleWithConfigurationCache('https://github.com/dropbox/dependency-guard/issues/4')
}

I'm not sure which versions of Gradle you want to support, but you might bake this in with something like

tasks.register(...) {
  if (GradleVersion.current() > GradleVersion.version("7.4")) {
    notCompatibleWithConfigurationCache('https://github.com/dropbox/dependency-guard/issues/4')
  }
}

And of course, ideally, one day, this could be compatible out of the box.

@handstandsam
Copy link
Collaborator

Reopening because I'm seeing issues locally when running. Works every time when I specify --no-configuration-cache, but fails after the first run otherwise.

@handstandsam handstandsam reopened this May 12, 2022
@handstandsam
Copy link
Collaborator

Opened this issue for Gradle, but it looks like it's "working as intended". It is a weird configuration that causes this scenario.

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 a pull request may close this issue.

2 participants