ComponentSelectionRulesProcessorTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Split off value snapshotting and attributes related methods of TestUtil

    • -2
    • +2
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 64 more files in changeset.
Deprecate extra parameters in ComponentSelectionRules

Since methods have been added on ComponentSelection, the logic for

detecting extra parameters in provided closures is now deprecated.

Fixes #6607

    • -50
    • +136
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 12 more files in changeset.
Add accessors to ComponentSelection

The Groovy DSL gave access to ComponentMetadata and IvyModuleDescriptor

through the use of dynamic closure parameters.

These extra parameters are now available directly on the

ComponentSelection allowing access to them from the Action based API.

Note that this implies a slight semantical change, where rules using

closures would never see a null ComponentMetadata or IvyModuleDescriptor

while the API on ComponentSelection are effectively nullable.

Issue #6607

    • -19
    • +38
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 6 more files in changeset.
Normalize `ModuleIdentifier`

This commit reworks the `ComponentModuleIdentifier`/`ComponentModuleSelector`/`ModuleVersionSelector`

classes to use `ModuleIdentifier` under the hood, instead of storing denormalized strings. This has

the advantage that we can reduce the use of the module identifier factory, which is called very

often during dependency resolution. Sharing instances reduces the need for conversions, and makes

comparisons faster.

    • -1
    • +1
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 164 more files in changeset.
Refactor MetadataProvider

Extract interface and two implementations

    • -18
    • +30
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 10 more files in changeset.
Add `getAttributes` to `ComponentMetadata`

This allows the component selection rules to access attributes and reject versions based on

the attribute values.

Signed-off-by: Cedric Champeau <cedric@gradle.com>

    • -14
    • +50
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 4 more files in changeset.
Fixed unit test

    • -35
    • +19
    ./ComponentSelectionRulesProcessorTest.groovy
Rename `o.g.i.c.model.*{MetaData => Metadata}`

    • -19
    • +19
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 162 more files in changeset.
Improve error reporting when a candidate for a dynamic version is not resolvable and component selection rules that require meta-data are present.

    • -4
    • +23
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 5 more files in changeset.
Added some context to error message when component selection or metadata rule fails with an exception.

    • -3
    • +4
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 5 more files in changeset.
More improvements to error handling for component selection/metadata rules

+review REVIEW-5248

    • -1
    • +1
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 5 more files in changeset.
Fix error message for failed application of component selection rules

    • -1
    • +1
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 3 more files in changeset.
Cleanup of metadata fetching so that we're sure to only fetch once during version matching/selection

+review REVIEW-5227

    • -45
    • +31
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 4 more files in changeset.
Removed RuleAction from the public API: no replacement yet

    • -2
    • +2
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 34 more files in changeset.
Improving component selection rules targeting tests - Separated targeted tests from untargeted tests - Cleaned up instances of rule order assumptions - Extracted validation into RuleActionValidator +review REVIEW-5180

    • -18
    • +97
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 5 more files in changeset.
Changing component selection rule targeting to use a collection of Spec/RuleAction tuples

+review REVIEW-5180

    • -5
    • +9
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 10 more files in changeset.
Minor refactoring for component selection rule targeting - Moved all validation to ModuleIdentifierNotationParser - Changed ComponentSelectionMatchingSpec to accept ModuleIdentifier in constructor - Wrapped notation parser errors in a contextual exception +review REVIEW-5180

    • -1
    • +2
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 4 more files in changeset.
Pushed strategy for finding component meta-data up from the implementation of ComponentChooser to the caller, as it has a better idea of how to do this, or already has the meta-data available.

    • -44
    • +31
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 9 more files in changeset.
Removed moduleSource from the meta data resolve result, as its attached to the meta data now.

    • -3
    • +3
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 21 more files in changeset.
Renamed a few dep management types to replace 'ModuleVersion' with 'ModuleComponent'

    • -5
    • +5
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 116 more files in changeset.
Renamed the types in the ComponentMetaData hierarchy

    • -16
    • +16
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 109 more files in changeset.
Moved a few more result types to org.gradle.internal.resolve.result.

    • -0
    • +1
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 43 more files in changeset.
Moved some meta-data types out of org.gradle.api.internal.artifacts to org.gradle.internal.component, and split up into base, local and external types.

    • -6
    • +6
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 307 more files in changeset.
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +245
    ./ComponentSelectionRulesProcessorTest.groovy
  1. … 1384 more files in changeset.