Link Search Menu Expand Document

Kotlin Plugin

1.1.0

Enhancement: Pitest 1.15.0 compatibility

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.

1.0.8

1.0.7

Enhancement: Fail Cleanly When Pitest Version Too Low

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.

1.0.6

Bug Fix: Extension Function Calls Marked As Inlined

The “inlined” marker was being incorrectly added to calls to extension functions.

Enhancement: Increase Default Maximum Method Size

The default 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.

Enhancement: More Accurate Offset Calculation

The algorithm to align bytecode between inline code definitions and calls has been made more accurate at the cost of slightly more computationally expensive.

1.0.5

Enhancement: Reduce File IO

Reduce file io during static analysis. This may result in performance improvements for projects with large classpaths.

1.0.4

Enhancement: Static Analysis Performance Improvements

Significant reduction in static analysis time for some project.

1.0.3

Enhancement: Apply Size Limit To Inline Functions

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.

e.g.

+KOTLIN(maxMethodSize[50])

Enhancement: Shortcut Static Analysis

Expensive static analysis is now avoided for some forms of inline code.

1.0.2

Bug Fix: Poor Performance Analysing Large Methods

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.

1.0.1

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.

Enhancement: Filter Kotlin Bridge Methods

The Kotlin compiler generates bridge methods when inheriting from some classes such as kotlin.Number, resulting in junk mutations. These are now filtered.

Bug Fix: Incremental Mutants Assigned To Wrong File

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.

Bug Fix: Over Inclusion of Inlined Test Classes

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.

1.0.0

This release requires pitest 1.11.0 or higher.

Enhancement: Improved Inline Function Support

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.

0.2.2

Bug Fix: Support Late Init Bytecode for Kotlin 1.7+

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.

0.2.1

Enhancement: Further Improvements to Inlined Code Support

0.2.0

Require Pitest 1.9.5 or Above

Enhancement: Dynamic Licence Retrieval

See Licence Management for details.

0.1.4

Enhancement: Improvements to Inlined Code Support

0.1.3

New Feature: Stable Range Returns

Functions returning the following types

  • IntRange
  • LongRange
  • CharRange
  • Sequence
  • CoroutineContex

Will be mutated to return their “zero values” in place of the null mutation generated by standard pitest.

Enhancement: Infer Non Nullable Returns When Annotation Absent

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.

0.1.2

New Feature: Inlined Code Support

See Inlined Functions