IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Groovy incremental compilation support (#9616)

Inspired by https://github.com/gradle/gradle/pull/9388 , this PR implements Groovy compilation avoidance. Unlike Java, things are a little more complex in Groovy compilation - a compilation unit can generate multiple classes. Thus, we introduced a `sourceClassMappingFile`, which records the source to classes mappings during the compilation process. Later, we can use this information in incremental compiler: only the affected groovy source files get recompiled in next compilation.

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 73 more files in changeset.
Test groovy incremental support

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 38 more files in changeset.
Test groovy incremental support

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 38 more files in changeset.
Test groovy incremental support

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 38 more files in changeset.
Test groovy incremental compilation

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 38 more files in changeset.
Rewrite the tests for Groovy incremental compilation

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 21 more files in changeset.
Rewrite the tests for Groovy incremental compilation

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 21 more files in changeset.
Groovy incremental compilation support

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 45 more files in changeset.
Groovy incremental compilation support

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 45 more files in changeset.
Groovy incremental compilation support

Signed-off-by: Bo Zhang <bo@gradle.com>

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 45 more files in changeset.
Daily commit

    • -1
    • +3
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 33 more files in changeset.
Groovy compilation avoidance: first step (#9513)

### Context

See https://github.com/gradle/gradle/issues/9517

We want to enable compilation avoidance for Groovy: the Groovy transformation classpath should be normailzed with `@Classpath` and other classpath should be normalized with `@CompileClasspath`. This PR adds a `compilerPluginClasspath` field (the name is not finalized yet, suggestion is always welcomed) to `GroovyCompile`. Users can enable `org.gradle.groovy.compilation.avoidance` and set `compilerPluginClasspath`.

    • -5
    • +4
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 13 more files in changeset.
Adjust compilation avoidance tests structure

    • -1
    • +2
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 11 more files in changeset.
Add AST transformation tests

    • -0
    • +22
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 12 more files in changeset.
Rewrite tests for Java/Groovy compilation avoidance

    • -24
    • +0
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 10 more files in changeset.
Make incremental compilation the default.

    • -1
    • +0
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 24 more files in changeset.
Pull test up in the hierarchy, to test both class directories and jars

    • -52
    • +0
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 1 more file in changeset.
Fix incremental compiler not detecting removal of a jar on classpath

This commit fixes #1913 by making the incremental compiler rely on the previous compilation jar snapshot

to detect whether a jar has been removed or not. The rationale for this change is that the incremental task

inputs detection has a bug when the collection is ordered: while it will properly detect that something has

changed, the information it returns is incorrect: it would notify of modified jars for jars which haven't

changed, notify of removal jars which have not been removed, and eventually miss the real removal.

A proper fix for incremental task inputs change detection will be issued later. In the meantime, we will

use the information the incremental compiler already knows as the basis for analysis.

    • -0
    • +53
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 4 more files in changeset.
Changed classpath ABI calculation to ignore all changes to private inner classes, anonymous classes and local classes.

Also added a bunch of test coverage for `@CompileClasspath`.

    • -1
    • +1
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 9 more files in changeset.
Renamed test classes.

    • -0
    • +24
    ./IncrementalJavaCompileAvoidanceAgainstJarIntegrationSpec.groovy
  1. … 9 more files in changeset.