IvyModuleResolveMetadataBuilderTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Initial implementation of component metadata rules allowing modification of variant attributes

This commit introduces metadata rules that support modification of variant attributes. Variant attributes

are specific to each variant and can be found in module metadata. Those are NOT component level attributes,

which could be used during dependency resolution. This will be added in a subsequent commit.

    • -1
    • +2
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 49 more files in changeset.
Create all mutable Ivy module resolve metadata through factory

This will simplify the injection of services through the factory, when we will need the immutable

attributes factory to be pushed to resolve metadata.

    • -1
    • +3
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 26 more files in changeset.
Cache module version identifiers

In a similar way to module identifiers, use the module identifier factory to cache the module version identifiers.

It allows faster comparisons as we will hit `a==b` much more often and don't have to go the `equals` route. There

are still places where the factory is not used, but it doesn't seem to have a huge impact on performance.

    • -1
    • +2
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 49 more files in changeset.
Use the module identifier factory during ivy parsing

    • -1
    • +2
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 23 more files in changeset.
Revert De-duplicate commonly used immutable objects in dependency resolution and IDE changes

Commits reverted:

- 807b1e4f8d1585d93c1de3e9ca83d99d0819e2d2

- 9482b0b05374253cafdb776550d7016385912e04

- 4ecead06b53ec6b0f15c517bf0d0c6a74c3b3c05

- db1135a8a5f1c507e0df3c03ad12ddc963799e4d

- 7350bcbae30a777909cec74ebfd5a91d2c89081e

Additionally, minor changes to avoid usage of introduced

classes and methods from subsequent commits.

Issue: gradle/gradle-private#563

    • -1
    • +1
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 109 more files in changeset.
De-duplicate (= intern) some instances in dependency resolution

- Reduce memory usage of dependency resolution by de-duplicating the

most commonly used immutable instances.

- Objects aren't strictly immutable: displayName is calculated lazily

- solution is thread-safe without synchronization

- lazy calculation is needed for efficient interning since a lookup

will always create a new instance.

- Use strong references in some instance interners

- strong references cause less GC overhead than weak references

- Strong references:

DefaultModuleIdentifier

DefaultModuleVersionIdentifier

DefaultModuleVersionSelector

DefaultModuleComponentIdentifier

DefaultModuleComponentSelector

DefaultProjectComponentSelector

- Weak references:

DefaultLibraryBinaryIdentifier

DefaultLibraryComponentSelector

DefaultIvyArtifactName

- Both reference types:

DefaultBuildIdentifier

DefaultProjectComponentIdentifier

- The reason for special handing is that DefaultBuildIdentifier

has a state field "current" as part of the instance which

isn't part of equals/hashCode.

+review REVIEW-6277

    • -1
    • +1
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 104 more files in changeset.
Started to separate the implementations of module meta-data into an immutable and a mutable implementation.

    • -3
    • +3
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 25 more files in changeset.
Rename `o.g.i.c.e.model.*{MetaData => Metadata}`

    • -0
    • +103
    ./IvyModuleResolveMetadataBuilderTest.groovy
  1. … 113 more files in changeset.