Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Moved `Clock` and `TimeProvider` into a separate package

This commit reverts recent changes to the API of

`org.gradle.util.Clock`, and instead deprecates the existing type

replacing with a new internal type. This was done because the

`ExtractDslMetaDataTask` uses this type for timing, and external plugins may have copied this pattern.

`org.gradle.util.Clock` is now deprecated.

  1. … 103 more files in changeset.
Clarifying renames in o.g.util.Clock

- `start` -> `startInstant`

- `getTimeInMillis()` -> `getElapsedMillis()`

- `getTime()` -> `getElapsed()`

  1. … 22 more files in changeset.
Generalize compiler daemon infrastructure for any kind of worker

    • -45
    • +0
    ./internal/tasks/compile/daemon/CompileResult.java
  1. … 47 more files in changeset.
Mark classpaths as `@Classpath`

Instead of annotating with `@InputFiles` and `@OrderSensitive`, we now have only `@Classpath`.

This also enables relative path normalization for every classpath property.

+review REVIEW-6241

  1. … 32 more files in changeset.
Better name for CLASSPATH PathSensitivity

This is a temporary measure before introducing `@Classpath` to annotate classpath properties.

+review REVIEW-6090

  1. … 5 more files in changeset.
Keep track of file hierarchy for classpaths

Given a file structure like this:

/

/libs

library-a.jar

library-b.jar

/data

/a

input-1.txt

/b

input-2.txt

And a classpath like this:

C:\libs\library-a.jar;C:\libs\library-b.jar;C:\data

We need to normalize paths to this:

- "" (i.e. we ignore the path for library-a.jar)

- "" (same for library-b.jar)

- "a/input-1.txt" (notice that we ignore the root directory "data" itself!)

- "b/input-2.txt"

This allows us to ignore changes to the roots (i.e. it should make a difference for the JavaCompile task if `library-a.jar` was renamed to `other-library-a.jar` as long as contents stay the same). It also allows us to detect if `a/input-1.txt` is moved to `b/input-1.txt` (think of how that changes the behavior of `ClassLoader.getResource("a/input-1.txt")`.

Before this change we ignored every directory, and the whole path of every file on the classpath. This included ignoring the path of `a/input-1.txt`, so if that file was moved, we wouldn't detect the change. This is a false positive that we need to avoid at all cost.

This commit doesn't take us directly to the right solution, though. Instead, we'll keep track of the following information:

- "library-a.jar"

- "library-b.jar"

- "data"

- "data/a/input-1.txt"

- "data/b/input-2.txt"

Basically, we include the name of the root of the hierarchy, and don't remove root directories. This already allows us to detect `a/input-1.txt` being moved. The downside is that we produce false negatives (i.e. we needlessly consider the task out-of-date) when `library-a.jar` is renamed to `other-library-a.jar`. This will be addressed in a later change.

+review REVIEW-6170

  1. … 1 more file in changeset.
Make `@PathSensitive` public

We need this annotation in the public API

+review REVIEW-6170

  1. … 12 more files in changeset.
Introduce `@PathSensitive` annotation

This annotation on a task property specifies which part of the file paths to observe when comparing different states of the task. For example, a Java classpath property will most probably ignore file paths completely, whereas Java sources to be compiled should observe the file names (and ignore the rest of the paths).

This feature enables up-to-date checks to recognize the case where the whole project has been moved, but its internal contents haven't changed. More importantly, this feature enables sharing cached task outputs between different computers where the task is being executed under different root directories.

+review REVIEW-6170

  1. … 44 more files in changeset.
Expose per-property previous task output files

Output files from the previous execution were accessible as a single file collection previously. Now it is possible to query per-property instead. This simplifies the logic somewhat (no need to filter files belonging to other properties). This is also a step towards a more optimal implementation for output directory snapshots, where we can reconstruct the absolute paths of files from the directory path and relative paths of files (instead of storing the full absolute path).

+review REVIEW-6141

  1. … 27 more files in changeset.
Introduce order-sensitive task file inputs

Some task file input properties (such as Java classpaths) need to be treated in an order-sensitive fashion. If the same files are present, but in different order, the corresponding task should be out-of-date.

Fixes GRADLE-3508

+review REVIEW-6114

  1. … 27 more files in changeset.
Expose less about filtering classloaders

There's no need for the caller to know the specific type of classloader

being created.

+review REVIEW-6020

  1. … 4 more files in changeset.
Make `FilteringClassLoader` immutable

`SystemClassLoaderSpec` is moved to its own class so that it can be

included in `gradle-worker.jar`.

+review REVIEW-6020

  1. … 20 more files in changeset.
Revert "Make `FilteringClassLoader` immutable"

This reverts commit 18ee27f8561df18b19761ebd65f209eed88c19f5.

  1. … 15 more files in changeset.
Make `FilteringClassLoader` immutable

+review REVIEW-6020

  1. … 15 more files in changeset.
Remove unused `MutableURLClassLoader.addURL()` method

This effectively makes `MutableURLClassLoader` not publicly mutable,

thus the rename to `VisitableURLClassLoader`.

+review REVIEW-6020

  1. … 21 more files in changeset.
Annotate more task properties

Part of this is fixing missing annotations. Part is applying the new

`@Console` and `@Internal` annotations where appropriate.

+review REVIEW-5932

  1. … 80 more files in changeset.
Revert "Annotate more task properties"

This reverts commit 4b32689375b46bb01ace46d5255118683c7c13ed.

  1. … 68 more files in changeset.
Annotate more task properties

Part of this is fixing missing annotations. Part is applying the new

`@Console` and `@Internal` annotations where appropriate.

+review REVIEW-5932

  1. … 68 more files in changeset.
Removed assumption about how class decoration is implemented.

  1. … 1 more file in changeset.
Disable deprecation warning when calculating Scala compile options.

Changed compiler daemon implementation to be backed by a multi-request worker.

    • -0
    • +24
    ./internal/tasks/compile/daemon/CompilerDaemonProtocol.java
    • -0
    • +22
    ./internal/tasks/compile/daemon/CompilerDaemonWorker.java
Moved worker process classes into their own package.

  1. … 90 more files in changeset.
Changed the API for creating worker processes, so that the worker action must always be supplied.

Also introduced a couple of interfaces to present the API.

  1. … 31 more files in changeset.
Removed the now unused 'app-in-isolated-classloader' worker process ClassLoader strategy.

This strategy is more flexible in terms of process reuse than the 'app-in-system-classloader', but it's flexibility we're not using at this stage.

  1. … 10 more files in changeset.
Add @Override where missing in production software model sources

Prior to this change, the affected submodules had 2044 occurrences of

the @Override annotation. With this commit, there are now 3492

occurrences. This suggests some divergence in IDE settings, either

across developers, across time, or both. At the moment, it appears that

IDEA (15 CE) is configured correctly to add @Override automatically.

This same refactoring should probably be done globally acrosse the

Gradle codebase, but has been constrained here to software model-related

submodules (a) because it is what the author is responsible for and (b)

because significant refactoring of type hierarchies is underway there

right now--the kind of work most likely to benefit from the compiler

checks that proper use of @Override affords.

Should this same refactoring be applied globally, it would be worth

looking into enforcing consistent use of @Override via checkstyle or

similar at the same time.

    • -0
    • +1
    ./internal/tasks/compile/daemon/CompileResult.java
  1. … 412 more files in changeset.
Moved `ArgWriter` to baseServices project, so that it can be used from more places.

+review REVIEW-5806

  1. … 9 more files in changeset.
Revert "Disable java.net.URL cache for Compiler Daemons"

This reverts commit fe65dc18b4fab82d01bd98792302c97bc6284559.

+review REVIEW-5748

Disable java.net.URL cache for Compiler Daemons

- disabled only in continuous build

- fixes GRADLE-3370

+review REVIEW-5748

Apply Groovy memory leak prevention to in-process Groovy compilation.

[JDK9] Uses application in system classloader