Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Make comparison of `ModuleComponentAtRepositoryKey` faster

to mitigate small performance regression due to the isolation

of component metadata rules.

  1. … 6 more files in changeset.
Make comparison of `ModuleComponentAtRepositoryKey` faster

to mitigate small performance regression due to the isolation

of component metadata rules.

  1. … 6 more files in changeset.
Use `int` instead of `HashCode`

As `HashCode` was only overhead.

  1. … 4 more files in changeset.
Use `int` instead of `HashCode`

As `HashCode` was only overhead.

  1. … 4 more files in changeset.
Fix isolation of processed metadata

Introduce a hash of the component metadata rules, so that we can

cache different processed metadata based on the hash. This is a

performance optimization, which allows setting different processed

metadata on the "cached metadata" instance, based on a rules hash.

The rule hash is more stable when using class-based rules. If not,

then we have instance based rules which are opaque to Gradle, meaning

that we're going to create as many instances of processed metadata

as there are rules instantiated.

    • -138
    • +0
    ./DefaultModuleMetadataCache.java
    • -0
    • +1
    ./DefaultModuleMetadataCacheDetails.java
    • -0
    • +138
    ./PersistentModuleMetadataCache.java
  1. … 12 more files in changeset.
Fix isolation of processed metadata

Introduce a hash of the component metadata rules, so that we can

cache different processed metadata based on the hash. This is a

performance optimization, which allows setting different processed

metadata on the "cached metadata" instance, based on a rules hash.

The rule hash is more stable when using class-based rules. If not,

then we have instance based rules which are opaque to Gradle, meaning

that we're going to create as many instances of processed metadata

as there are rules instantiated.

    • -138
    • +0
    ./DefaultModuleMetadataCache.java
    • -0
    • +1
    ./DefaultModuleMetadataCacheDetails.java
    • -0
    • +138
    ./PersistentModuleMetadataCache.java
  1. … 12 more files in changeset.
Introduce context object for caching of metadata

This will make it easier to add additional data without changing all method signatures.

    • -0
    • +39
    ./DefaultModuleMetadataCacheDetails.java
  1. … 3 more files in changeset.
Introduce context object for caching of metadata

This will make it easier to add additional data without changing all method signatures.

    • -0
    • +39
    ./DefaultModuleMetadataCacheDetails.java
  1. … 3 more files in changeset.
Revert per-project caches as it has a very large impact on performance

    • -78
    • +9
    ./ModuleRepositoryCacheProvider.java
  1. … 4 more files in changeset.
Revert per-project caches as it has a very large impact on performance

    • -78
    • +9
    ./ModuleRepositoryCacheProvider.java
  1. … 4 more files in changeset.
Make the in-memory dependency metadata caches per project

    • -9
    • +78
    ./ModuleRepositoryCacheProvider.java
  1. … 5 more files in changeset.
Make the in-memory dependency metadata caches per project

    • -9
    • +78
    ./ModuleRepositoryCacheProvider.java
  1. … 5 more files in changeset.
Use the same decorating pattern for `DefaultModuleArtifactCache`

    • -27
    • +1
    ./artifacts/DefaultModuleArtifactCache.java
    • -1
    • +24
    ./artifacts/InMemoryModuleArtifactCache.java
  1. … 1 more file in changeset.
Use the same decorating pattern for `DefaultModuleArtifactCache`

    • -27
    • +1
    ./artifacts/DefaultModuleArtifactCache.java
    • -1
    • +24
    ./artifacts/InMemoryModuleArtifactCache.java
  1. … 1 more file in changeset.
Decouple `InMemoryModuleArtifactsCache` from `DefaultModuleArtifactsCache`

    • -0
    • +69
    ./artifacts/AbstractArtifactsCache.java
    • -15
    • +6
    ./artifacts/DefaultModuleArtifactsCache.java
    • -39
    • +20
    ./artifacts/InMemoryModuleArtifactsCache.java
  1. … 1 more file in changeset.
Decouple `InMemoryModuleArtifactsCache` from `DefaultModuleArtifactsCache`

    • -0
    • +69
    ./artifacts/AbstractArtifactsCache.java
    • -15
    • +6
    ./artifacts/DefaultModuleArtifactsCache.java
    • -39
    • +20
    ./artifacts/InMemoryModuleArtifactsCache.java
  1. … 1 more file in changeset.
Decouple `InMemoryModuleVersionsCache` from `DefaultModuleVersionsCache`

    • -0
    • +62
    ./dynamicversions/AbstractModuleVersionsCache.java
    • -10
    • +2
    ./dynamicversions/DefaultModuleVersionsCache.java
    • -32
    • +18
    ./dynamicversions/InMemoryModuleVersionsCache.java
  1. … 1 more file in changeset.
Decouple `InMemoryModuleVersionsCache` from `DefaultModuleVersionsCache`

    • -0
    • +62
    ./dynamicversions/AbstractModuleVersionsCache.java
    • -10
    • +2
    ./dynamicversions/DefaultModuleVersionsCache.java
    • -32
    • +18
    ./dynamicversions/InMemoryModuleVersionsCache.java
  1. … 1 more file in changeset.
Decouple `InMemoryModuleMetadataCache` from `DefaultModuleMetadataCache`

Isolate the in-memory caching from the persistent caching, so that we can

later use a different in-memory cache for all projects.

    • -38
    • +18
    ./InMemoryModuleMetadataCache.java
  1. … 2 more files in changeset.
Decouple `InMemoryModuleMetadataCache` from `DefaultModuleMetadataCache`

Isolate the in-memory caching from the persistent caching, so that we can

later use a different in-memory cache for all projects.

    • -0
    • +67
    ./AbstractModuleMetadataCache.java
    • -38
    • +18
    ./InMemoryModuleMetadataCache.java
  1. … 2 more files in changeset.
Fix "platform owners" not being serialized

    • -3
    • +49
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 5 more files in changeset.
Fix caching of component metadata rules in presence of `withDependencies`

This commit fixes several issues with component metadata rule `@CacheableRule`:

1. when using Gradle metadata, the original content hash wasn't set, leading

to incorrect keys in cache. The consequence is that we would fetch from cache

the wrong components.

2. there was a race condition between the component metadata serializer and

the graph resolution, which lead to rules being executed several times, and

actually multiple `DefaultConfigurationMetadata` created for the same components

3. a `ClassCastException` was visible as soon as one rule worked on dependencies

or dependency constraints, because we assume immutability, and that the rule

applicator was actually creating a mutable list

4. realized component metadata wasn't setting the `force` flag properly for

enforced platforms

This fixes #6978

    • -6
    • +2
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 10 more files in changeset.
Avoid the creation of a string to build the path in the file store

This creates a significant amount of garbage. Assuming we read from the store

more often than we write to, this commit builds an array corresponding to the

path in the store, rather than a string.

  1. … 3 more files in changeset.
Omit excludes for Maven optional dependencies

For BOM import support, when a <dependencyManagement> entry has a declared <exclusion>,

we apply this exclusion globally whenever the target module is resolved, regardless of

the path to the module. However, this behaviour is not desired for <optional> dependencies,

and these could not be distinguished from <dependencyManagement> entries after the POM was parsed.

With this change, we retain a 'type' attribute for all dependencies parsed from a Maven POM

file. This allows us to omit any exclusions that are defined for a dependency declared with

<optional>, while retaining them for <dependencyManagement> entries.

  1. … 8 more files in changeset.
Document lazy vs. realised ModuleComponentResolveMetadata

Also includes minor code refactoring to improve readability.

    • -0
    • +6
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 9 more files in changeset.
Rename method to better indicate meaning

The hash value returned by getOriginalContentHash() is the one from the

metadata parsed from a repository. It does not reflect any of the

potential mutations that happened to it at later stages.

The new name indicates this better.

  1. … 9 more files in changeset.
Improved name and documentation of attribute container serializer

    • -2
    • +2
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 10 more files in changeset.
Refactor ModuleResolveMetadata

Reorganize code in packages, move serialization related code closer to

classes to reduce need of public methods.

    • -462
    • +21
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 78 more files in changeset.
Refactor ModuleResolveMetadata

Reorganize code in packages, move serialization related code closer to

classes to reduce need of public methods.

    • -462
    • +21
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 78 more files in changeset.
Serialization of realised ModuleComponentResolveMetadata

This enables proper caching by making sure we can save and reload cache

values.

Fixes #5653

    • -4
    • +467
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 13 more files in changeset.