This release updates the Kotlin plugin for compatibility with the breaking api changes in pitest 1.15.0. This release will not work with earlier versions of pitest.
The Kotlin plugin requires pitest 1.11.0 or later. The plugin will now fail with an error directing the user to update pitest if an incompatible version is used.
If the plugin is not supplied with the project base dir and dynamic licensing is not being used, it must search backwards for a licence file. This release expands the scope of that search.
The “inlined” marker was being incorrectly added to calls to extension functions.
maxMethodSize has been increased from 200 to 500 instructions. This higher limit should not cause issues for most projects and removes the need to add custom configuration for many users.
The algorithm to align bytecode between inline code definitions and calls has been made more accurate at the cost of slightly more computationally expensive.
Reduce file io during static analysis. This may result in performance improvements for projects with large classpaths.
Significant reduction in static analysis time for some project.
To prevent large inline functions dominating analysis time, inline functions larger than 200 instructions will not be mutated by default. This limit can be configured with a pitest feature string.
Expensive static analysis is now avoided for some forms of inline code.
Fix for poor scaling of some junk mutation filters with method size. We recommend also upgrading to pitest 1.11.5 which fixes similar issues in the core filters.
Note, although this release is compatible with pitest 1.11.0, we recommend using 1.11.3 or above as it contains bug fixes which impact on Kotlin projects.
The Kotlin compiler generates bridge methods when inheriting from some classes such as
kotlin.Number, resulting in junk mutations. These are now filtered.
When using pitest incremental analysis, some mutants were assigned to the wrong source file in the HTML report as the original grouping of mutants was lost when analysing for inlined code.
In order to handle inline functions, arcmutate must mutate bytecode from the test tree when it contains code inlined from the project under test. This logic was including inline code not currently targeted for mutation.
This release requires pitest 1.11.0 or higher.
This release adds support for mutating inlined functions. Previously this was not possible as the bytecode within an inlined function is not executed by the JVM. Instead, multiple copies of the code are executed embedded within the function’s clients.
Analysis results for inlined copies of mutants are now seamlessly combined and rewritten to appear to occur in the original inline function. Line coverage is also rewritten so that inline the code will appear to have been executed if one or more of the embedded copies have been run.
Since 1.7, the Kotlin compiler produces slightly different bytecode for late initiailized variables which was not picked up by the junk mutation filters in previous releases.
See Licence Management for details.
Functions returning the following types
Will be mutated to return their “zero values” in place of the null mutation generated by standard pitest.
For public functions which cannot return null, the Kotlin compiler will add a
org.jetbrains.annotations.NotNull annotation. When this annotation is present, pitest will filter out mutations which would violate this constraint. The annotation is not added for private methods however.
This change uses other bytecode markers to infer if a return type is nullable and filter mutants accordingly.