ComponentMetadataRulesIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Reshuffle some tests into subpackages

This is just a refactoring of tests, to make it clearer: the base

package started to grow significantly.

    • -476
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 79 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.

    • -2
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 18 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.

    • -2
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 18 more files in changeset.
Revert per-project caches as it has a very large impact on performance

    • -0
    • +2
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 4 more files in changeset.
Revert per-project caches as it has a very large impact on performance

    • -0
    • +2
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 4 more files in changeset.
Make the in-memory dependency metadata caches per project

    • -2
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 5 more files in changeset.
Make the in-memory dependency metadata caches per project

    • -2
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 5 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.

    • -1
    • +1
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 4 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.

    • -1
    • +1
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 4 more files in changeset.
No deprecation for component metadata rule

The new class based form might still evolve, so no deprecation for

now.

    • -14
    • +0
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 7 more files in changeset.
Add deprecation logging statement for old style metadata rules

    • -0
    • +14
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 5 more files in changeset.
Enforce isolation of ComponentMetadataRule

This means that passed in parameters must be snapshotable as defined by

the ValueSnapshotter

Added support for Attribute to ValueSnapshotter

    • -16
    • +21
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 53 more files in changeset.
Migrate integration tests to use class based rules.

    • -38
    • +118
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 9 more files in changeset.
Cache processed metadata in-memory

Processing component metadata rules for resolved module metadata

is expensive, and the fix for #3019 introduced a serious performance

regression. This change adds in-memory caching for the post-processed

metadata on a per-repository basis.

Unfortunately, this re-introduces the bug #4261, where component

metadata rule outputs can leak between projects for a repository.

Since defining different metadata rules in different projects is

unlikely to be commonplace, this is considered an acceptable

interim position. This issue should be addressed with the

introduction of general-purpose caching of component metadata

rules.

    • -0
    • +2
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 3 more files in changeset.
Add failing test for #4261

In-memory caching of module metadata is done on a per-repository

basis: the same repository definition in different projects will

allow sharing of in-memory cached module metadata.

Component metadata rules are defined on a per-project basis. This

means that in the scenario where different component metadata rules

have been defined for different projects, only the rules from the

first project to resolve a particular module from a particular

repository will apply.

This fix for this issue will require further changes beyond the fix

for #3019.

    • -0
    • +66
    ./ComponentMetadataRulesIntegrationTest.groovy
Extract Ivy specific tests into their own test case

    • -347
    • +1
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Migrate `ComponentMetadataRulesIntegrationTest` to cross-repository test fixtures

    • -22
    • +470
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 8 more files in changeset.
Added some context to error message when component selection or metadata rule fails with an exception.

    • -7
    • +6
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 5 more files in changeset.
Minor updates on review of ComponentMetadata rules improvements

+review REVIEW-5218

    • -3
    • +15
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 11 more files in changeset.
Adding support for module-targeted component metadata rules

+review REVIEW-5218

    • -0
    • +82
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 3 more files in changeset.
Refactored ComponentMetadataHandler.eachComponent() to all()

+review REVIEW-5218

    • -4
    • +4
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 14 more files in changeset.
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +130
    ./ComponentMetadataRulesIntegrationTest.groovy
  1. … 1384 more files in changeset.