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

ClearConfigurationCacheStateMutator incorrectly hardcodes the location of configuration-cache #510

Open
liutikas opened this issue Aug 15, 2023 · 2 comments

Comments

@liutikas
Copy link
Contributor

  @Override
    protected void cleanup() {
        System.out.println("> Cleaning configuration cache state");
        cleanup(new File(projectDir, ".gradle/configuration-cache"));
        cleanup(new File(projectDir, ".instant-execution-state"));
    }

for projects that use --project-cache-dir / org.gradle.projectcachedir the configuration cache will be in a different location. So the gradle-profiler should either read the project cache dir state that is set or set a custom one to make sure the location is where it is expected.

@liutikas
Copy link
Contributor Author

liutikas commented Aug 15, 2023

The way it will manifest in the projects today is that if you have

rerunDryRun {
    tasks = ["bOS"]
    gradle-args = ["--dry-run", "--rerun-tasks"]
    daemon = cold
    warm-ups = 1
    clear-configuration-cache-state-before = BUILD
}

you'll see

* Running measured build #1
> Cleaning configuration cache state
Configuration on demand is an incubating feature.
Reusing configuration cache.

which will attempt to delete configuration cache, do nothing, reuse configuration cache from a previous run.

@bamboo
Copy link
Member

bamboo commented Aug 16, 2023

I think It would make more sense for gradle-profiler to set --project-cache-dir since it already changes the Gradle user home for isolation.

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