CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.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.

    • -95
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 73 more files in changeset.
Test groovy incremental support

    • -95
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 38 more files in changeset.
Test groovy incremental support

    • -95
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 38 more files in changeset.
Test groovy incremental support

    • -95
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 38 more files in changeset.
Test groovy incremental compilation

    • -95
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 38 more files in changeset.
Prefer implementation/api over compile in language-java tests

    • -2
    • +2
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 9 more files in changeset.
Prefer implementation/api over compile in language-java tests

    • -2
    • +2
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 9 more files in changeset.
Prefer implementation/api over compile in language-java tests

    • -2
    • +2
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 9 more files in changeset.
Prefer implementation/api over compile in language-java tests

    • -2
    • +2
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 9 more files in changeset.
Adjust test expectation for malformed JARs

    • -5
    • +5
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
Ignore annotation processors on compile classpath

Resolves #6296.

    • -0
    • +3
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 17 more files in changeset.
Make incremental compilation the default.

    • -5
    • +1
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 24 more files in changeset.
On CI redirect jcenter queries to local repo for integration tests

    • -5
    • +3
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 51 more files in changeset.
Refactor classpath content and entry hashers

- Simplify ClasspathContentHasher to have a single method

- Use an InputStream vs passing around byte[]

- Handle duplicates in jar files

- Cache "no signature" calculations

+review REVIEW-6442

    • -0
    • +15
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 14 more files in changeset.
Revert "Hack to restore caching of individual files in a classpath entry"

This reverts commit 19790308bb7853235bdd229987db77d2f2f43f16.

Revert "Refactored ClasspathContentHasher and ClasspathEntryHasher"

This reverts commit be5dad934e525208dcfdfc2de7327f85c58ee9fb.

Revert "Rename withContent to withContentHash"

This reverts commit 650d899813c39a3f7e0423733d78f1d6080057fd.

Revert "Allow ClasspathEntryHasher to hash directories"

This reverts commit f26f3cfa6dc6d10c5b78dae45abe80fb0240482a.

    • -15
    • +0
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 15 more files in changeset.
Refactored ClasspathContentHasher and ClasspathEntryHasher

- Use an InputStream vs passing around byte[]

- Return null HashCode's when the Hasher isn't used

- Use a single method in ClasspathContentHasher

- Document issues with duplicates in Jars

- Fix error messages to be a little more generic since this is used for both

@Classpath and @CompileClasspath

+review REVIEW-6442

    • -0
    • +15
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 11 more files in changeset.
Make compile classpath snapshotting more robust

This commit changes the implementation of compile classpath snapshotting in several ways, to make more robust:

- we ignore resources

- the default compile classpath snapshotter includes resources in the computed hash, so it will typically

fail to recognize that 2 libraries are ABI compatible if they include a resource which have changed. Workaround

for this is enabling the incremental compiler.

- there's a global flag to fallback to the old compile classpath snapshotting in case a bug was found. This is

only meant to be used in emergency, until we fix the bug.

    • -0
    • +83
    ./CompileAvoidanceWithIncrementalJavaCompilationIntegrationTest.groovy
  1. … 3 more files in changeset.