Skip to content

Fix Detekt gradle task cache restoration issue (#2180)#2182

Merged
3flex merged 1 commit intodetekt:masterfrom
plastiv:sp_fix_cache_relocation
Dec 17, 2019
Merged

Fix Detekt gradle task cache restoration issue (#2180)#2182
3flex merged 1 commit intodetekt:masterfrom
plastiv:sp_fix_cache_relocation

Conversation

@plastiv
Copy link
Copy Markdown
Contributor

@plastiv plastiv commented Dec 16, 2019

Detekt gradle task is marked as @CacheableTask but it's input source files are
marked with PathSensitivity.ABSOLUTE annotation from source property defined in
parent SourceTask.

Having task inputs with absolute path sensitivity effectively disables cache reusability:
https://guides.gradle.org/using-build-cache/#relocatability

Closes #2180

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 16, 2019

Codecov Report

Merging #2182 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2182   +/-   ##
=========================================
  Coverage     80.59%   80.59%           
  Complexity     2028     2028           
=========================================
  Files           338      338           
  Lines          5850     5850           
  Branches       1066     1066           
=========================================
  Hits           4715     4715           
  Misses          564      564           
  Partials        571      571

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f41ea5...447ca33. Read the comment docs.

@schalkms schalkms requested a review from 3flex December 16, 2019 18:54
@plastiv plastiv force-pushed the sp_fix_cache_relocation branch from f055642 to 62b9540 Compare December 16, 2019 19:30
`Detekt` gradle task is marked as `@CacheableTask` but it's input source files are
marked with `PathSensitivity.ABSOLUTE` annotation from `source` property defined in
parent `SourceTask`.

Having task inputs with absolute path sensitivity effectively disables cache reusability:
https://guides.gradle.org/using-build-cache/#relocatability
@plastiv plastiv force-pushed the sp_fix_cache_relocation branch from 62b9540 to 447ca33 Compare December 16, 2019 19:33
@3flex 3flex merged commit f04c215 into detekt:master Dec 17, 2019
@3flex
Copy link
Copy Markdown
Member

3flex commented Dec 17, 2019

Thanks for picking that up, plus the fix!

@plastiv
Copy link
Copy Markdown
Contributor Author

plastiv commented Dec 18, 2019

@3flex is there a way to get a snapshot for gradle-plugin? I don't see it being published here https://oss.jfrog.org/artifactory/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/io/gitlab/arturbosch/detekt

@plastiv plastiv deleted the sp_fix_cache_relocation branch December 18, 2019 12:56
@3flex
Copy link
Copy Markdown
Member

3flex commented Dec 20, 2019

Not sure, I don't have access to publish artifacts. @arturbosch do you know if anything can be done here?

@plastiv consider opening a new issue to track this, thanks!

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 this pull request may close these issues.

Gradle cache restoration issue

5 participants