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

Relocation is not working for caching of animalsniffer task #10

Closed
dcabasson opened this issue Aug 23, 2018 · 4 comments
Closed

Relocation is not working for caching of animalsniffer task #10

dcabasson opened this issue Aug 23, 2018 · 4 comments
Labels

Comments

@dcabasson
Copy link

Relocation (the fact of renaming the folder the code is in) is not working currently and is breaking the cache for the animal sniffer plugin.

Test to do that : Pick any project with an animalsniffer task, make 2 copies, one in /projects/test-a and one in /projects/test-b with the exact same code.

Run the animalsniffer task in the first project, then in the second project. If the relocation is correct, the second project should hit the cache and not rerun the task. This is currently not the case because the field SourceDirectorySet sourcesDirs is missing the proper gradle annotations.

@xvik
Copy link
Owner

xvik commented Aug 24, 2018

Do you mean sourcesDirs miss @PathSensitive(PathSensitivity.RELATIVE)?

As I understand the issue only appears for equal modules: compileJava is cached (only one module is compiled) but animalsniffer task is not cached (and runs for both modules). I'm asking to be sure because this is quite a rare case and even relocation should cause this issue only once. Am I missing something?

@dcabasson
Copy link
Author

You might also have to change the @input to a @InputFiles

You are missing the scale of that issue. In a project with 300+ subprojects, that our CI system checks out in a random directory every time, that means for any change that would have only affected 5 projects - and the other 295 projects would have been just rebuilt from cache - we are taking an extra 30s (15s for main + 15s for test) * 295 projects = over 2h of un-necessary build time.

Having a correct caching is really important to "entreprise" projects that have a significant scale.

@xvik xvik added the bug label Aug 27, 2018
@xvik xvik closed this as completed in f170759 Aug 27, 2018
@dcabasson
Copy link
Author

Perfect, thanks! Looking forward to having that integrated in the next release.

@xvik
Copy link
Owner

xvik commented Aug 27, 2018

Hotfix released

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