ModuleVersionResolveExceptionTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Simplify construction of ModuleVersionSelector in unit tests

    • -7
    • +2
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 13 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.

    • -5
    • +11
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 164 more files in changeset.
Revert changes from PR5628

This reverts the following commits:

10a25358953dfb28b09cf04356945517d5cc560e

54d19a74ab2d29673219d9c6d27388b93c55eada

d0eb19dbf28df1a108742ba177eda56301e1fab4

dcf5f65b49db17fb625ecab7498b060ab8191b9b

99847ad25f9e0ab7b1f65beb976dcb59cbadd1b9

f2f412141e1ab29e0cfafc72fd962ae645508720

99b45c8d7f0e94d2d41c43c731ca1329d6f07606

    • -2
    • +2
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 40 more files in changeset.
Removed `ModuleVersionSelector.versionConstraint`

- Pushed `getVersionConstraint()` down to `ExternalDependency` and

`DependencyConstraint`

- Only use a single version string when constructing `ModuleVersionSelector`

    • -2
    • +2
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 19 more files in changeset.
Removed `ModuleVersionSelector.versionConstraint`

- Pushed `getVersionConstraint()` down to `ExternalDependency` and

`DependencyConstraint`

- Only use a single version string when constructing `ModuleVersionSelector`

    • -2
    • +2
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 19 more files in changeset.
Rename `DefaultVersionConstraint` to `DefaultMutableVersionConstraint`

... and use the immutable version whenever possible.

    • -2
    • +2
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 63 more files in changeset.
Make `ModuleComponentSelector` the source of truth for version constraints

This commit pushes `VersionConstraint` as a primary concept in `ModuleComponentSelector`. It replaces the (now)

deprecated `getVersion` call, which didn't reflect all possible constraints on a version. This change has several

consequences:

- version constraints now need to be "serializable"

- version constraints now consist of a preferred version and a list of rejected versions

- only a single item in the rejection list is supported

- Gradle module metadata parsing now generates a prefer/reject list

- Gradle module metadata writing does **not** yet support writing prefer/reject

- the module metadata binary format has been bumped to support prefer/reject in module descriptors

- metadata rules can say `useTarget(VersionConstraint)`

Issue #3312

    • -2
    • +8
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 93 more files in changeset.
Use component id rather than module version id in the 'required by' paths in resolve exceptions. This provides a better description for local components, and also allows for components that don't have a module version id.

    • -1
    • +1
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 13 more files in changeset.
Added more detail to the 'could not find any matches for selector' error message, to distinguish between:

1. No versions were found.

2. Some candidate versions were found but none matched the selector (and what those versions were).

3. Some matching versions were found by all were rejected by component selection rules (and what those versions were).

Changed ModuleVersionResolveException constructor so that it does not pass the provided message through String.format().

    • -5
    • +1
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 22 more files in changeset.
Moved some exception and result types out of org.gradle.api.internal.artifacts into org.gradle.internal.resolve

    • -0
    • +60
    ./ModuleVersionResolveExceptionTest.groovy
  1. … 109 more files in changeset.