Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Renamed AbstractDaemonCompiler to AbstractWorkerCompiler

And:

- DaemonJavaCompiler to WorkerJavaCompiler (supports both in-process and daemon workers)

- DaemonGroovyCompiler to WorkerGroovyCompiler (support both in-process and daemon workers)

- DaemonScalaCompiler to WorkerDaemonScalaCompiler (daemon workers only)

- DaemonPlayCompiler to WorkerDaemonPlayCompiler (daemon workers only)

    • -0
    • +100
    ./internal/tasks/compile/daemon/AbstractWorkerCompiler.java
  1. … 30 more files in changeset.
Non-forked Java compilation now uses in-process workers

Simplified AbstractDaemonCompiler and its type hierarchy.

Remove usage of some org.gradle.workers.internal types.

    • -0
    • +77
    ./internal/tasks/compile/ForkOptionsMerger.java
  1. … 9 more files in changeset.
Dogfood WorkerExecutor for java/groovy/scala compilation in worker daemons

Plus in-process groovy compilation

  1. … 29 more files in changeset.
Internal types, methods and variables renames in :workers

  1. … 63 more files in changeset.
Revert "Merge pull request #1486 from gradle/pm-parallel-in-process-workers"

This reverts commit 861bc80fe733f1ab6790860182a20957786e0711, reversing

changes made to cf20021050069a63b7ae629717eb663d95074997.

  1. … 23 more files in changeset.
WorkerDaemonAction implements Describable

  1. … 5 more files in changeset.
WorkerDaemonAction implements Describable

  1. … 5 more files in changeset.
In-process parallel workers

WorkerConfiguration.fork property added, false by default.

Coverage is pretty good already.

A lot of renames will be needed because of overloaded and now

misused terms.

  1. … 15 more files in changeset.
In-process parallel workers

WorkerConfiguration.fork property added, false by default.

Coverage is pretty good already.

A lot of renames will be needed because of overloaded and now

misused terms.

  1. … 15 more files in changeset.
First stab at parallelizing worker daemons

  1. … 106 more files in changeset.
Changed `JvmLanguageCompileSpec.classpath` back to `Iterable<File>` for backwards compatibility for now (these are internal types).

  1. … 17 more files in changeset.
Added internal method back for now.

  1. … 3 more files in changeset.
Fixes to ensure correct results when using annotation processors for Java source compilation. The fixes apply to Java compilation in both incremental and non-incremental modes.

Added `CompileOptions.annotationProcessorPath` to allow an annotation processor path to be explicitly declared for a compile task. When declared, this path is used to locate annotation processors, instead of searching the compile classpath for processors.

Added `JavaCompile.effectiveAnnotationProcessorPath` which returns the actual annotation processor path to use for compilation. This is marked with `@Classpath` so that source is recompiled when an annotation processor implementation or runtime dependency changes in some way that affects runtime execution.

The effective annotation processor path is calculated as follows:

- When explicitly set on the compile options, use this value. Can be empty.

- When an annotation processor is present in the compile classpath, use the compile classpath.

- When no annotation processors are present in the compile classspath, use an empty path.

Changed the incremental Java compile to fall back to full compile when the annotation processor path is not empty. This is an intentionally dumb strategy that can be made better later.

Made some simplifications to the generation of javac compiler args.

Added a bunch of test coverage for incremental builds in the presence of annotation processors.

  1. … 22 more files in changeset.
Treat `AbstractCompile.classpath` as an `@Internal` property for now.

Move `@CompileClasspath` to `JavaCompile` only for now

  1. … 1 more file in changeset.
Spike compile avoidance using compile classpath aware hashing strategy

  1. … 54 more files in changeset.
Make worker daemon lifecycle logging more meaningful

  1. … 4 more files in changeset.
Fix failing compiler daemon tests

- Fix DaemonJavaCompilerIntegrationTest

- Fixing issue with renamed class

- Fix issues with compiler daemon classpath

- Fixing issue with in-process compiler returning incorrect result

- Removing unnecessary wrapping of compiler result

- Fix checkstyle issues

  1. … 15 more files in changeset.
Improving worker daemon service api

- Removed implementationClass and sharedPackages method from WorkerDaemonExecutor

- Changed service to always infer the full classpath from the implementation class

  1. … 5 more files in changeset.
Fix an issue with the daemon compiler classpath

  1. … 7 more files in changeset.
Fix issue with runnables defined in the build script

  1. … 20 more files in changeset.
Introduce public WorkerDaemonServer and WorkerDaemonExecutor

  1. … 24 more files in changeset.
Introduce Timer abstractions for simpler timekeeping

- Timer provides a 'stopwatch' function, with the benefit of a nicely

formatted elapsed time.

- CountdownTimer tracks if a timeout limit has been reached.

  1. … 22 more files in changeset.
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.