DefaultVersionedComponentChooserTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix DefaultVersionedComponentChooserTest argument matcher syntax

    • -15
    • +11
    ./DefaultVersionedComponentChooserTest.groovy
Fix DefaultVersionedComponentChooserTest argument matcher syntax

    • -15
    • +11
    ./DefaultVersionedComponentChooserTest.groovy
Fix DefaultVersionedComponentChooserTest argument matcher syntax

    • -15
    • +11
    ./DefaultVersionedComponentChooserTest.groovy
Fix DefaultVersionedComponentChooserTest argument matcher syntax

    • -15
    • +11
    ./DefaultVersionedComponentChooserTest.groovy
    • -0
    • +2
    ./DefaultVersionedComponentChooserTest.groovy
TODO

    • -0
    • +1
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 8 more files in changeset.
First shot at providing incremental inputs

    • -1
    • +1
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 9 more files in changeset.
Pass fingerprinterRegistry into invoker

    • -1
    • +1
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 16 more files in changeset.
Refactor dependency provider injection

The `ArtifactTransformDependenciesProvider`is now made available through

`Transformation.transform` and `TransformerInvoker.invoke` instead of

being part of the `TransformationSubject`.

The motivation is that this type provides context for all transforms,

while the subject is transform step specific.

Issue #7766

    • -1
    • +1
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 16 more files in changeset.
Use repository content filtering when selecting dynamic versions

This commit fixes an issue with content filtering, which led to versions

being silently ignored because we were listing versions, _then_ filtering.

Instead, this commit makes sure we actually only return versions which

do participate in the repository.

    • -0
    • +11
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 6 more files in changeset.
Split off value snapshotting and attributes related methods of TestUtil

    • -3
    • +5
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 64 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.

    • -3
    • +4
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 164 more files in changeset.
Refactor MetadataProvider

Extract interface and two implementations

    • -5
    • +0
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 10 more files in changeset.
Collect unmatched dependencies too

Without this change, it is not possible to know which versions Gradle

considered for a dynamic range, unless it's rejected by a rule or by

attribute matching.

    • -16
    • +16
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 19 more files in changeset.
Collect unmatched dependencies too

Without this change, it is not possible to know which versions Gradle

considered for a dynamic range, unless it's rejected by a rule or by

attribute matching.

    • -16
    • +16
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 19 more files in changeset.
Associate rejected versions with their constraint or rule

This commit reworks the mapping between rejected versions and

version selectors, so that we can make the difference between

a version which was rejected by a selector (regular or constraint)

or a rule. Then the dependency insight report can properly show

what versions were rejected in which context.

    • -7
    • +7
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 18 more files in changeset.
Associate rejected versions with their constraint or rule

This commit reworks the mapping between rejected versions and

version selectors, so that we can make the difference between

a version which was rejected by a selector (regular or constraint)

or a rule. Then the dependency insight report can properly show

what versions were rejected in which context.

    • -7
    • +7
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 18 more files in changeset.
Collect all rejections during dependency resolution

This commit collects all rejections during dependency resolution,

so that we can properly show them in the dependency insight report.

This highlights some consistency/readability issues, like when a

rejection originates from a constraint. For this reason this commit

does **not** pass tests, and is just the first step towards better

rendering.

    • -2
    • +2
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 26 more files in changeset.
Collect all rejections during dependency resolution

This commit collects all rejections during dependency resolution,

so that we can properly show them in the dependency insight report.

This highlights some consistency/readability issues, like when a

rejection originates from a constraint. For this reason this commit

does **not** pass tests, and is just the first step towards better

rendering.

    • -2
    • +2
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 26 more files in changeset.
Introduce `ComponentMetadataSupplierRuleExecutor`

This gives us better abilities to unit test the behavior of this specific

rule executor.

    • -3
    • +3
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 16 more files in changeset.
Introduce `ComponentMetadataSupplierRuleExecutor`

This gives us better abilities to unit test the behavior of this specific

rule executor.

    • -3
    • +3
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 16 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

    • -1
    • +1
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 53 more files in changeset.
Fix failing unit tests

    • -11
    • +34
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 13 more files in changeset.
Fix failing unit tests

    • -11
    • +34
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 13 more files in changeset.
Improve error reporting in case no matching dynamic version is found

This commit improves rendering of errors in case resolution fails because

all versions in a dynamic range are evicted, and that at least one of the

evicted versions was evicted because of attribute matching. The error will

now report the attributes on each tested version, as well as the requested

attributes.

For this, the module not found exception has been updated to carry more

context, and now makes use of the tree formatter for consistency with other

exceptions in the codebase.

    • -2
    • +17
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 37 more files in changeset.
Cache parsing of version strings

The version parser is by far the largest contributor to garbage created during the

resolution of a large dependency graph. This commit creates a build scope version

parser which is shared and caches the result of parsing, avoiding the creation of

a significant number of arrays.

    • -3
    • +4
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 45 more files in changeset.
Implement matching of component attributes during dynamic version selection

This commit adds support for matching the component attributes during the selection

of a version, when the selector is dynamic. Before, component-level attributes were

ignored, meaning we could select a version which wouldn't have any variant matching

the consumer attributes. With those changes, it is possible, for example, to have

a version, 1.3, which doesn't match the consumer attributes, and an earlier version,

say 1.2, which does. In that case, 1.2 would be selected instead of 1.3.

The consequence of this change is that we now have to fetch metadata for components

that are selected during dynamic version selection, in order to check if they match

the component attributes. This used to be the case for status selectors (`latest.release`)

but not for version ranges (`[1.0, )`).

It's also worth noting that if the selector is dynamic, we will perform attribute

matching at least twice (possibly with different attribute sets):

- once during version selection (for each candidate, check if its attribute match)

- then once during _variant_ selection (in which case each variant may have additional

attributes)

    • -28
    • +65
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 14 more files in changeset.
Simplify unit test to make it less tied to implementation

    • -107
    • +48
    ./DefaultVersionedComponentChooserTest.groovy
Consider all reject constraints when resolving dynamic versions

When resolving a component selector to a component identifier, we now construct

a unified 'allRejects' constraint that allows the correct resolution of

dynamic versions. If all versions matching a dynamic version are rejected,

then the highest rejected version is chosen. Checking for rejected versions

in the resolved graph is done in a subsequent step, after conflict resolution.

When the set of reject constraints changes there may be a need to re-resolve

a particular component selector. Efforts are made to reduce these situations

by comparing the previously resolved version to the updated set of constraints.

    • -26
    • +24
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 12 more files in changeset.
Rename id accessors for consistency

Use `ComponentIdentifier getId()`

Use `ModuleVersionIdentifier getModuleVersionId()`

    • -5
    • +5
    ./DefaultVersionedComponentChooserTest.groovy
  1. … 67 more files in changeset.