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

Incorrect JarSearchableOptionsTask Caching Behavior #1583

Open
tylerbertrand opened this issue Apr 1, 2024 · 1 comment
Open

Incorrect JarSearchableOptionsTask Caching Behavior #1583

tylerbertrand opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels

Comments

@tylerbertrand
Copy link
Contributor

tylerbertrand commented Apr 1, 2024

What happened?

The jarSearchableOptions task is exhibiting a cache miss caused by its sandboxDir input property being set to an absolute path. Since sandboxDir is a String property, the path it is set to should either be relative, or, if changes to the contents of the directory affect the outcome of the task, sandboxDir should be converted to a DirectoryProperty with relative path normalization, so that its contents can be properly tracked by Gradle.

Relevant log output or stack trace

Steps to reproduce

In a project using gradle-intellij-plugin, run a clean build executing the jarSearchableOptions task. Clone or copy the project into another file system location, and run the same build again. The jarSearchableOptions task in the second build should come from cache, but it does not.

Gradle IntelliJ Plugin version

1.17.3

Gradle version

8.7-rc-1

Operating System

None

Link to build, i.e. failing GitHub Action job

No response

@tylerbertrand
Copy link
Contributor Author

tylerbertrand commented Apr 1, 2024

I noticed that on the main branch, the JarSearchableOptionsTask has been restructured to be SandboxAware, and that the sandboxDir property no longer exists - looks like it has been split into multiple @Internal DirectoryPropertys. In that case, not sure if you will want to fix the existing implementation, but based upon the updated implementation, perhaps sandboxDir should just be marked @Internal?

@tylerbertrand tylerbertrand changed the title JarSearchableOptionsTask cache miss Incorrect JarSearchableOptionsTask Caching Behavior Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants