Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Define size of immutable builders where possible

This makes it possible to avoid unnecessary re-allocations when the number of elements is known up-front.

    • -2
    • +2
    ./SuppliedComponentMetadataSerializer.java
  1. … 30 more files in changeset.
Define size of immutable builders where possible

This makes it possible to avoid unnecessary re-allocations when the number of elements is known up-front.

    • -2
    • +2
    ./SuppliedComponentMetadataSerializer.java
  1. … 32 more files in changeset.
Define size of immutable builders where possible

This makes it possible to avoid unnecessary re-allocations when the number of elements is known up-front.

    • -2
    • +2
    ./SuppliedComponentMetadataSerializer.java
  1. … 31 more files in changeset.
Experimental change

Further deduplication of serialized metadata

Maven dependency metadata de-duplication now happens as well when

serializing untransformed metadata.

Fixes #8311

    • -6
    • +11
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 5 more files in changeset.
Deduplication of serialized metadata

When writing realised Maven metadata, when a cacheable

ComponentMetadataRule is used, a lot of duplication happened around

MavenDependencyDescriptor.

This was caused by the amount of derived variants computed in for Maven

dependencies, which effectively have a very common set of dependencies.

This commit changes that for derived variants and configurations by

de-duplicating MavenDependencyDescriptor instances for serialization.

Issue #8311

    • -2
    • +4
    ./ModuleComponentResolveMetadataSerializer.java
  1. … 3 more files in changeset.
Introduce ecosystem registration

This commit introduces the concept of "ecosystem", that can be

registered on an attributes schema. When a component is published,

it may provide a list of ecosystems. This list is used by consumers

when resolving. If, for some reason, variant resolution fails, and

that the consumer didn't use a plugin which provides the expected

ecosystem, the error message will indicate that they probably

miss a plugin that understands that ecosystem.

This is useful when a plugin extends an existing ecosystem with

additional attributes, that consumers may not be aware of. In

this case it is expected that the plugin declares an ecosystem.

Currently the error message will only indicate what ecosystem

is missing, and an optional description. It will not tell _how_

such plugin can be found, nor what plugins provide it.

By default, for adhoc components, publishing will use the

ecosystems of the producer. For example, for a Java project,

the published Gradle metadata file will include the java

ecosystem requirement.

For components which are not adhoc, they must implement the

`ComponentWithEcosystems` interface in order to tell which

ecosystems are in use.

  1. … 54 more files in changeset.
Support requested capabilities on external dependencies

This commit adds support for having requested capabilities

part of the module component selector, for external dependencies.

This means that if a component is using Gradle metadata, we can

read requested capabilities and honor them during selection.

This reworks where requested capabilities are stored, and in

particular moves them to the `ComponentSelector`, making them

properly part of the identity of a dependency. As such, two

dependencies requiring two different variants by using distinct

capabilities will now properly appear as two different dependencies

in the dependency graph, instead of two variants of the same

dependency.

  1. … 63 more files in changeset.
Code style improvements

Support concurrent access in DefaultCachedMetadata

The code was optimized to have a singleton map as much as possible. But

lacked the necessary protections to move out of that case.

As soon as we move beyond a single mapping, we use a concurrent map

underneath and the map swap is now properly protected.

Revert introduction of context object

Since the strategy for isolating caches changed, this is not

necessary anymore.

    • -40
    • +0
    ./DefaultModuleMetadataCacheDetails.java
  1. … 2 more files in changeset.
Revert introduction of context object

Since the strategy for isolating caches changed, this is not

necessary anymore.

    • -40
    • +0
    ./DefaultModuleMetadataCacheDetails.java
  1. … 2 more files in changeset.
Use builders with expected size

This should in theory make things a bit faster.

Use builders with expected size

This should in theory make things a bit faster.

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.