DefaultInstantExecution.kt

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename `InstantExecutionCache{Invalidation => Key}`

Plus:

- make it a little more convenient to use in string templates by overriding

`toString`

- compose method

  1. … 4 more files in changeset.
Merge branch 'master' into eskatos/cc/cache-cleanup

  1. … 2 more files in changeset.
Honour `Managed.factoryId` when reading managed values from the cache

  1. … 3 more files in changeset.
Extract cache key calculation from start parameter

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

  1. … 4 more files in changeset.
Simplify `TransformationStepCodec`

Use `ReadContext.getProject` instead of `ProjectFinder`.

  1. … 3 more files in changeset.
Merge pull request #13237 from gradle/bamboo/cc/transforms/i

Serialize `Transform.fromAttributes` to the configuration cache

Refine InstantExecutionCache

by renaming useForWrite() to useForStore() for symmetry

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

  1. … 1 more file in changeset.
Merge branch 'master' into eskatos/cc/cache-cleanup

Serialize `Transform.fromAttributes` to the configuration cache

  1. … 6 more files in changeset.
Remove implemented TODO

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

Extract state write/read from DefaultInstantExecution

Because DefaultInstantExecution was getting large and had too many

responsibilities.

Leaving the orchestration and cache layout handling responsibility to

DefaultInstantExecution and moving the knowledge of how to write/read

the state to InstantExecutionState.

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

  1. … 1 more file in changeset.
Extract state write/read from DefaultInstantExecution

Because DefaultInstantExecution was getting large and had too many

responsibilities.

Leaving the orchestration and cache layout handling responsibility to

DefaultInstantExecution and moving the knowledge of how to write/read

the state to InstantExecutionState.

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

  1. … 1 more file in changeset.
Introduce InstantExecutionCache with cache cleanup

LRU cleanup with a 7 days max last access time.

File locks required on LOAD because cleanup or a matching STORE could be

running in another daemon.

File locks required on STORE because a matching STORE could be running

in another daemon.

This commit doesn't change the fact that two separate operations are

required on LOAD, first for the fingerprint check, second for loading

the state.

It means two file locks on LOAD. The cached entry (fingerprint + file)

is marked as accessed under their respective file lock. This prevents a

cleanup running in another daemon to delete the cached entry between the

two cache operations.

In the same vein, this commit doesn't change the fact that the cache is

not additive. In other words, it is still possible that entries get

overwritten: same cache key, different fingerprint.

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

  1. … 3 more files in changeset.
Introduce InstantExecutionCache with cache cleanup

LRU cleanup with a 7 days max last access time.

File locks required on LOAD because cleanup or a matching STORE could be

running in another daemon.

File locks required on STORE because a matching STORE could be running

in another daemon.

This commit doesn't change the fact that two separate operations are

required on LOAD, first for the fingerprint check, second for loading

the state.

It means two file locks on LOAD. The cached entry (fingerprint + file)

is marked as accessed under their respective file lock. This prevents a

cleanup running in another daemon to delete the cached entry between the

two cache operations.

In the same vein, this commit doesn't change the fact that the cache is

not additive. In other words, it is still possible that entries get

overwritten: same cache key, different fingerprint.

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

  1. … 3 more files in changeset.
Polish DefaultInstantExecution

by tightening member visibility

by adding missing TODO keyword to existing comment

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

Polish DefaultInstantExecution

by tightening member visibility

by adding missing TODO keyword to existing comment

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

Move GradleVersion from cache path to configuration cache key

in order to simplify cleanup, manual or automatic

From:

.gradle/configuration-cache/<gradle-version>/<hash>.bin

.gradle/configuration-cache/<gradle-version>/<hash>.fingerprint

To:

.gradle/configuration-cache/<hash>/state.bin

.gradle/configuration-cache/<hash>/fingerprint.bin

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

  1. … 1 more file in changeset.
Move GradleVersion from cache path to configuration cache key

in order to simplify cleanup, manual or automatic

From:

.gradle/configuration-cache/<gradle-version>/<hash>.bin

.gradle/configuration-cache/<gradle-version>/<hash>.fingerprint

To:

.gradle/configuration-cache/<hash>/state.bin

.gradle/configuration-cache/<hash>/fingerprint.bin

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

  1. … 1 more file in changeset.
Change cache layout to group state & fingerprint in a directory

From:

.gradle/configuration-cache/<gradle-version>/<hash>.bin

.gradle/configuration-cache/<gradle-version>/<hash>.fingerprint

To:

.gradle/configuration-cache/<gradle-version>/<hash>/state.bin

.gradle/configuration-cache/<gradle-version>/<hash>/fingerprint.bin

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

Change cache layout to group state & fingerprint in a directory

From:

.gradle/configuration-cache/<gradle-version>/<hash>.bin

.gradle/configuration-cache/<gradle-version>/<hash>.fingerprint

To:

.gradle/configuration-cache/<gradle-version>/<hash>/state.bin

.gradle/configuration-cache/<gradle-version>/<hash>/fingerprint.bin

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

Let composite builds problem link to corresponding documentation section

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

  1. … 2 more files in changeset.
Let configuration cache disable itself on unsupported tasks

denoted with an annotation on the task

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

  1. … 1 more file in changeset.
Refine configuration cache cached state location

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

Move cached state into .gradle/<version>/configuration-cache

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

Merge branch 'master' into eskatos/cc/build-option-direct

  1. … 9 more files in changeset.
Invalidate the configuration cache only when there are failures writing the state, such as when an exception thrown by a `writeReplace()` method, rather than when problems are encountered that do not result in a badly formed cache file, such as the registration of a listener or read of a system property.

  1. … 5 more files in changeset.
Invalidate the configuration cache only when there are failures writing the state, such as when an exception thrown by a `writeReplace()` method, rather than when problems are encountered that do not result in a badly formed cache file, such as the registration of a listener or read of a system property.

  1. … 5 more files in changeset.
Invalidate the configuration cache only when there are failures writing the state, such as when an exception thrown by a `writeReplace()` method, rather than when problems are encountered that do not result in a badly formed cache file, such as the registration of a listener or read of a system property.

  1. … 6 more files in changeset.
Invalidate the configuration cache only when there are failures to write the state, such as an exception thrown by a `writeReplace()` method, rather than when problems are encountered that do not result in a badly formed cache file, such as the registration of a listener or read of a system property.

  1. … 2 more files in changeset.
Invalidate the configuration cache only when there are failures writing the state, such as when an exception thrown by a `writeReplace()` method, rather than when problems are encountered that do not result in a badly formed cache file, such as the registration of a listener or read of a system property.

  1. … 5 more files in changeset.