Skip to content

KSP1 breaks compilation avoidance #2347

@ZacSweers

Description

@ZacSweers

We've been doing some benchmarking and I was surprised to find that KSP tasks are not compatible with Kotlin's compilation avoidance in incremental compilation because it appears to poke through useClasspathSnapshot to manually depend on packaged jars (ref), which will always be out of date even if the change is non-abi breaking.

The task was not up-to-date because of the following reasons:
Input property 'classpathSnapshotProperties.classpath' file services/navigation/navigation-key/build/intermediates/compile_library_classes_jar/release/bundleLibCompileToJarRelease/classes.jar has changed.

This significantly slows down builds that use KSP extensively because their tasks rerun unnecessarily

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions