SourceToNameConverterTest.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. … 73 more files in changeset.
Test groovy incremental support

  1. … 38 more files in changeset.
Test groovy incremental support

  1. … 38 more files in changeset.
Test groovy incremental support

  1. … 38 more files in changeset.
Test groovy incremental compilation

  1. … 38 more files in changeset.
Rewrite the tests for Groovy incremental compilation

  1. … 21 more files in changeset.
Rewrite the tests for Groovy incremental compilation

  1. … 21 more files in changeset.
Groovy incremental compilation support

  1. … 45 more files in changeset.
Groovy incremental compilation support

  1. … 45 more files in changeset.
Groovy incremental compilation support

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

  1. … 45 more files in changeset.
Daily commit

  1. … 33 more files in changeset.
Groovy incremental compilation support

  1. … 21 more files in changeset.
Add support for incremental compilation of Groovy sources

This **experimental** feature works similarly to Java's, and actually

reuses most of the Java infrastructure. It should be cleaned up and

replace annotation processor detection with AST xforms detection.

  1. … 17 more files in changeset.
Merge incremental compile caches into one

We had three different caches for the data associated with the

previous execution of an incremental compile task:

- its class dependency analysis

- its classpath snapshot

- its processor path snapshot

These are now merged into one PreviousCompilationData cache.

This led to quite a few moved classes due to package cycles,

but the new structure makes a lot more sense.

  1. … 46 more files in changeset.
Revert changes to SourceToNameConverter

The performance improvements made this class

inconsistent with other classes doing similar

jobs like OutputToNameConverter.

Since incremental builds rarely change a significant

amount of the code base, it is unlikely that this will

actually become a bottleneck. The reason for the perf

improvements was a different usage of this class,

which we have removed in the meantime.

  1. … 2 more files in changeset.
More performance improvements for SourceToNameConverter

- CompilationSourceDirs now returns the absolute path with the trailing

separator directly.

- Instead of using regular expressions, we use endsWith.

- We split off any anonymous inner class extension directly.

  1. … 2 more files in changeset.
Cache inferred source directories for incremental java compilation

+review REVIEW-5727

  1. … 3 more files in changeset.
Extract java and groovy compilation into separate language subprojects

- ‘language-java’ contains JavaCompile task, compiler infrastructure and associated classes

- ‘language-groovy’ contains GroovyCompile task and associated infrastructure

- depends on ‘language-java’

- ‘language-jvm’ contains ProcessResources task and some common JVM language infrastructure

    • -0
    • +43
    ./SourceToNameConverterTest.groovy
  1. … 321 more files in changeset.