Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Clarify method's purpose with clearer name

  1. … 2 more files in changeset.
Improve incremental compilation for Java

This patch splits the collected dependencies found in a .class file into "accessible" and "private" dependencies.

* "Accessbile" dependencies are classes that belong to non-private fields, non-private method signatures, class signature ("extends", "implements") etc

* "Private" dependencies are classes that belong to private fields, private methods and classes used in method bodies (i.e. just in "the code")

The TL;DR of the approach is to change the algorithm in `ClassSetAnalysis.getRelevantDependents` to only recurse for "accessible" dependencies.

Goal by example:

Consider classes like

```

class A {

private B b

}

class B {

private C c

}

class C {

}

```

The previous algorithm in `ClassSetAnalysis.getRelevantDependents` would recompile all classes, if `C` was changed. The new algorithm recompiles

just `B` and `C`, because `C` has been changed and `B` uses `C`. But it doesn't recompile `A`, because `A` is not affected by the change. The same

is true, if `C` would have been only used in a method body of `B` or in the signature of a `private` function in `B`.

The algorithm properly handles changes to classes used in the following example:

```

public class SomeClass {

List<Integer> field = new LinkedList<Integer>();

private AccessedFromPrivateField accessedFromPrivateField;

AccessedFromPackagePrivateField someField;

private AccessedFromPrivateMethod accessedFromPrivateMethod() {

return null;

}

public String accessedFromPrivateMethodBody() {

return new AccessedFromPrivateMethodBody().toString();

}

private Set<String> stuff(HashMap<String, String> map) {

System.out.println(new Foo());

return new HashSet<String>();

}

private class Foo {

// Hint: this field won't appear in the ClassAnalysis for SomeClass

public AccessedFromPrivateClassPublicField anotherField;

public String toString() {

return "" + new AccessedFromPrivateClass();

}

}

}

```

Changes the serialization format of `ClassAnalysis` + `DependentsSet`

Signed-off-by: Robert Stupp <snazy@snazy.de>

  1. … 14 more files in changeset.
Use normalized path for inferring class names

Instead of relativizing the path to source roots. The information of

the relative path is already available, so why bother inferring it

again.

  1. … 6 more files in changeset.
Use normalized path for inferring class names

Instead of relativizing the path to source roots. The information of

the relative path is already available, so why bother inferring it

again.

  1. … 5 more files in changeset.
Move compiler parameters into compiler implementation classes

  1. … 5 more files in changeset.
Move compiler parameters into compiler implementation classes

  1. … 5 more files in changeset.
Move compiler parameters into compiler implementation classes

  1. … 5 more files in changeset.
Move compiler parameters into compiler implementation classes

  1. … 5 more files in changeset.
Move compiler parameters into compiler implementation classes

  1. … 5 more files in changeset.
Follow-ups of incremental Groovy compilation (#9848)

This PR:

- Closes https://github.com/gradle/gradle/issues/9785 and https://github.com/gradle/gradle/issues/9380

- Adds tests for

- Multiple classes in a same source Groovy file.

- Moving files between source set roots

Previously, removing a source directory from a source set would break the Java (and Groovy) incremental compiler (https://github.com/gradle/gradle/issues/9380). This PR detects this case and runs a full recompilation.

It also records relative path instead of absolute path in Groovy incremental compilation to make it build-cache-friendly.

  1. … 25 more files in changeset.
Resolve feedbacks

  1. … 2 more files in changeset.
Resolve feedbacks

  1. … 1 more file in changeset.
Resolve feedbacks

  1. … 2 more files in changeset.
Fix failed unit tests

  1. … 1 more file in changeset.
Fix failed unit tests

  1. … 2 more files in changeset.
Tests for followups of incremental Groovy compilation

  1. … 3 more files in changeset.
Test for fixing issue of removing source dirs

  1. … 3 more files in changeset.
Test for fixing issue of removing source dirs

  1. … 4 more files in changeset.
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. … 71 more files in changeset.
Use isolated parameters for all worker isolation modes

  1. … 42 more files in changeset.
Use isolated parameters for all worker isolation modes

  1. … 44 more files in changeset.
Use isolated parameters for all worker isolation modes

  1. … 44 more files in changeset.
Use isolated parameters for all worker isolation modes

  1. … 44 more files in changeset.
Construct a reverse map to avoid performance penalty

  1. … 1 more file in changeset.
Construct a reverse map to avoid performance penalty

  1. … 1 more file in changeset.
Test groovy incremental support

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

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

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

  1. … 37 more files in changeset.
Publish all projects

  1. … 2 more files in changeset.