You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very large codebase, and clover is trying to re-instrument and recompile every single source file, even though only one file has changed, which is a huge overhead with the run time. I was wondering if there is a way to configure the plugin or even the Ant task to make it so that it only re instruments and re compiles the files that have been changed.
The text was updated successfully, but these errors were encountered:
jandaj
changed the title
All tests run despite optimization being on
re-instrument and recompile every single source file
Jun 29, 2018
I have no control over the Ant tasks. This plugin integrates OpenClover using the Ant tasks and is subordinate to the behavior of the OpenClover Ant tasks. Perhaps this is better served as a query in OpenClover project.
I will look at the behavior regarding the recompile, it might take some significant refactoring to work because of the compilation code swapping that happens in this plugin. The plugin injects actions on the test tasks that recompile the code after moving the original compiled files to a backup location. A possible approach would be to create sourceSets derived from the original defined sourceSets and construct compilation tasks for each one. Then we would inject the new classpath into the test tasks and run with the Clover instrumented code. That is quite involved and might take significant time to accomplish but it would let the default up-to-date Gradle mechanism to operate on the files. Not sure if the OpenClover Ant tasks are able to do incremental compilation as effectively as Gradle's own compilation tasks do it. This would work best if the compilation process and the code instrumentation process were truly separate steps that were invoked independently with each having correct up-to-date criteria.
One possible approach that I should put some thought into is to cache the instrumented files between runs in incremental compilation. The plugin takes great care to replace the original not instrumented binaries back into the locations they were swapped out of but we do not save the instrumented binaries in a way that would make it possible to allow the Ant task to do incremental builds.
I also suspect the modification of the original binaries by moving out and back into position causes the Gradle compile tasks to consider them modified and thus not up-to-date. Both of these behaviors are probably responsible for this issue and should be looked at.
I have a very large codebase, and clover is trying to re-instrument and recompile every single source file, even though only one file has changed, which is a huge overhead with the run time. I was wondering if there is a way to configure the plugin or even the Ant task to make it so that it only re instruments and re compiles the files that have been changed.
The text was updated successfully, but these errors were encountered: