InstantExecutionHost.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge branch 'release'

  1. … 2 more files in changeset.
Make paths/names of included builds immutable (#10998)

Changes the “build path” for included builds to be determined at inclusion time based on the directory name, or a user supplied override. Previously, we tried to use the root project name defined in the included build. This caused a lot of complexity due to it not being known until part way through building the included build.

This change also disallows use of `buildSrc` as a project name, as it collides with the `buildSrc` nested build.

  1. … 72 more files in changeset.
Also get Instant Execution system properties directly

if not in startParameter

This is temporary adding on top of the temporary way to enable

instant execution in order to be able to configure an IDE to always

use instant execution easily.

Signed-off-by: Paul Merlin <paul@gradle.com>

Build buildSrc after applying the settings file (#10305)

Fixes #9094 and #5333

  1. … 54 more files in changeset.
Record the ClassLoader associated with each class that is serialized to the instant execution cache, and use this to make class lookup on deserialize faster and to deal correctly with multiple classes with the same name.

Move some ClassLoader lifecycling from Groovy DSL script compilation to `ClassLoaderScope`, so that the scope takes care of creating and caching the script ClassLoader.

  1. … 30 more files in changeset.
Some simplifications of the instant execution types that take care of serializing the work nodes.

  1. … 7 more files in changeset.
Change instant execution serialization to write the edges between work nodes to the cache, instead of the dependencies between tasks.

This will allow nodes other than tasks to be deserialized and added back to the work graph. Also short-circuit the node dependency calculation when reading nodes back from the cache, as the calculation has already been done.

  1. … 5 more files in changeset.
Change instant execution to serialize all work nodes to the cache, rather than just the task nodes.

In this change, only a placeholder is written to the cache for node that are not task nodes, and this are discarded on read.

  1. … 10 more files in changeset.
Revert "Revert "Let instant execution reuse classloaders when loading""

  1. … 36 more files in changeset.
Revert "Let instant execution reuse classloaders when loading"

  1. … 36 more files in changeset.
Polish `InstantExecutionHost`

Polish `InstantExecutionHost`

- Use cached value

Refine InstantExecutionHost

Signed-off-by: Paul Merlin <paul@gradle.com>

Rework serialization infra to allow for a Gradle instance isolate

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 8 more files in changeset.
Fix task execution via the tooling API when using the instant execution cache.

  1. … 2 more files in changeset.
Don't attempt to run `buildSrc` tasks when using the instant execution cache, and don't attempt to serialize their state when creating the instant execution cache.

  1. … 4 more files in changeset.
Move `StateSerialization` to `serialization.codecs` as `Codecs`

  1. … 7 more files in changeset.
Move serialization specific types to `serialization` subpackage

And move codecs to `serialization.codecs` subpackage.

  1. … 30 more files in changeset.
Get `ClassLoader` from `ReadContext`

  1. … 3 more files in changeset.
Polish `InstantExecutionHost`

Merge branch 'master' into bamboo/master/instant-execution/polish

  1. … 1 more file in changeset.
Polish `InstantExecutionHost`

- Replace `getService(T::class.java)` by `service<T>()`

- Reorder members to improve top-to-bottom readability

- Add explicit non-obvious type declarations

- Prefer expression bodies over block bodies

- Prefer lambda syntax over object syntax for SAM types

- Prefer property syntax over method syntax for getters

  1. … 1 more file in changeset.
Polish `InstantExecutionHost`

- Return `gradle.rootProject` explicitly instead of querying it

- Replace `if/else/return` by `return/when`

Handle serialization of objects of several more types to the instance execution cache.

Also add some more test coverage of Java builds.

  1. … 5 more files in changeset.
Treat all objects of an unrecognized type as a "bean" when serializing values to the instant execution cache, regardless of whether the type has a zero args constructor.

Also handle values of type `Long` and `long`, and handle bean fields of type `Property`, `DirectoryProperty` and `RegularFileProperty`.

  1. … 10 more files in changeset.
Renamed some types that represent the high level steps of the build lifecycle.

  1. … 27 more files in changeset.
Skip loading instant execution cache on --refresh-dependencies

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 2 more files in changeset.
Refine InstantExecutionHost

by moving eagerly looked up services to ctor injection

and simplifying createSettings()

and specifying property types explicitly instead of exposing platform types

Signed-off-by: Paul Merlin <paul@gradle.com>

Use the correct name for the root project when restoring from instant execution cache. This makes build scans more useful when comparing a given build with and without instant execution.

  1. … 4 more files in changeset.
Support changes to the requested task names in instant execution. Include the requested task names and also Gradle version in the cache file name.

Also add some logging to inform the user when there is a hit or miss on the cache.

  1. … 2 more files in changeset.