Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add requested attributes to the resolution result

This is done so that it is possible to find out what

attributes were requested/compatible/missing in variants

based on the consumer attributes, without having to

resort on finding the configuration being resolved.

This is mostly useful in build scans where the plugin

listens to every resolution result, but does not necessarily

know what configuration was resolved to generate this

result.

    • -6
    • +12
    ./DefaultResolutionResultTest.groovy
  1. … 16 more files in changeset.
Add requested attributes to the resolution result

This is done so that it is possible to find out what

attributes were requested/compatible/missing in variants

based on the consumer attributes, without having to

resort on finding the configuration being resolved.

This is mostly useful in build scans where the plugin

listens to every resolution result, but does not necessarily

know what configuration was resolved to generate this

result.

    • -6
    • +12
    ./DefaultResolutionResultTest.groovy
  1. … 16 more files in changeset.
Make selected variant accessible on dependency

For resolved dependency results, we now tell what

is the corresponding selected variant.

  1. … 24 more files in changeset.
Make selected variant accessible on dependency

For resolved dependency results, we now tell what

is the corresponding selected variant.

  1. … 24 more files in changeset.
Optimize `ModuleVersionResolveException`

During resolution, we may throw a lot of `ModuleVersionResolveException`

or `ModuleVersionNotFoundException`. Often, one per repository, when

a version is not found in that repository. But in the end, the version

may be found, or a different version may be selected, in which case we

don't care about the failure, which is only used if _no version_ could

be selected.

As a consequence, we had a lot of overhead in both generating a stack

trace **and** an error message, that would never be used.

This commit reworks those special exceptions used during resolution so

that we avoid filling the stack trace (we don't care) and we create

the message lazily (only if it will actually be used).

  1. … 23 more files in changeset.
Optimize `ModuleVersionResolveException`

During resolution, we may throw a lot of `ModuleVersionResolveException`

or `ModuleVersionNotFoundException`. Often, one per repository, when

a version is not found in that repository. But in the end, the version

may be found, or a different version may be selected, in which case we

don't care about the failure, which is only used if _no version_ could

be selected.

As a consequence, we had a lot of overhead in both generating a stack

trace **and** an error message, that would never be used.

This commit reworks those special exceptions used during resolution so

that we avoid filling the stack trace (we don't care) and we create

the message lazily (only if it will actually be used).

  1. … 23 more files in changeset.
Optimize `ModuleVersionResolveException`

During resolution, we may throw a lot of `ModuleVersionResolveException`

or `ModuleVersionNotFoundException`. Often, one per repository, when

a version is not found in that repository. But in the end, the version

may be found, or a different version may be selected, in which case we

don't care about the failure, which is only used if _no version_ could

be selected.

As a consequence, we had a lot of overhead in both generating a stack

trace **and** an error message, that would never be used.

This commit reworks those special exceptions used during resolution so

that we avoid filling the stack trace (we don't care) and we create

the message lazily (only if it will actually be used).

  1. … 24 more files in changeset.
Optimize `ModuleVersionResolveException`

During resolution, we may throw a lot of `ModuleVersionResolveException`

or `ModuleVersionNotFoundException`. Often, one per repository, when

a version is not found in that repository. But in the end, the version

may be found, or a different version may be selected, in which case we

don't care about the failure, which is only used if _no version_ could

be selected.

As a consequence, we had a lot of overhead in both generating a stack

trace **and** an error message, that would never be used.

This commit reworks those special exceptions used during resolution so

that we avoid filling the stack trace (we don't care) and we create

the message lazily (only if it will actually be used).

  1. … 24 more files in changeset.
Optimize `ModuleVersionResolveException`

During resolution, we may throw a lot of `ModuleVersionResolveException`

or `ModuleVersionNotFoundException`. Often, one per repository, when

a version is not found in that repository. But in the end, the version

may be found, or a different version may be selected, in which case we

don't care about the failure, which is only used if _no version_ could

be selected.

As a consequence, we had a lot of overhead in both generating a stack

trace **and** an error message, that would never be used.

This commit reworks those special exceptions used during resolution so

that we avoid filling the stack trace (we don't care) and we create

the message lazily (only if it will actually be used).

  1. … 24 more files in changeset.
Support depending on multiple variants of the same component

This commit changes the resolution engine so that it is possible

to resolve multiple variants of the same component when using

variant-aware dependency management.

Before, in order to have 2 dependencies on the same component

but using different variants, one had to use explicit configuration

dependencies. Now, with this change, it is possible to have

two dependencies on the same component, but with different attributes.

Those components would resolve to different variants.

Special treatment is applied when attributes are declared on constraints:

in this case, we _merge_ the constraint attributes, and make sure that

the edge is computed using the merged attributes. Should they be

incompatible, the build would fail as before.

  1. … 29 more files in changeset.
Add 'constraint' property to dependencies in ResolutionResult

It's important to be able to differentiate between hard dependencies and

dependency constraints when analysing the resolution result. This was done

by adding a simple boolean property to `DependencyResult`, indicating if

the source of the edge was a dependency or a constraint.

The new API is not yet used in any dependency reporting.

  1. … 16 more files in changeset.
Add support for emitting information about repositories used during configuration resolution process, and sourced repository for a component (#5959)

- `ResolveConfigurationDependenciesBuildOperationType.Details` now contains a `List<Repository>` eventually provided by all `ResolutionAwareRepository` implementations

- `ResolvedComponentResult` has been subclassed to `ResolvedComponentResultInternal`, to provide the `repositoryName` used as source. This can be `null` in case of project dependency.

- Note that even when artifacts are resolved from the cache, they still convey the original repository that was used as source. The `name` of a repository is guaranteed to be unique inside a given repository container, and we use a single repository container to resolve a given configuration. Hence, the name can be safely used to uniquely identify which repository was used to source components.

- This commit also moves custom serialization logic to the owning type of `SerializedOperation` implementations to their owning types

  1. … 52 more files in changeset.
Fix potential class cast exception

    • -2
    • +38
    ./DefaultResolutionResultTest.groovy
  1. … 1 more file 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. … 164 more files in changeset.
Rename `DefaultVersionConstraint` to `DefaultMutableVersionConstraint`

... and use the immutable version whenever possible.

  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

  1. … 93 more files in changeset.
Removed convenience method. Needs more specing. Users will need to implement this functionality in their own builds.

+review REVIEW-5282

    • -49
    • +3
    ./DefaultArtifactResolutionResultTest.groovy
  1. … 7 more files in changeset.
Ground work for accessing the Ivy and Maven metadata artifacts via the Artifact Query API.

    • -0
    • +105
    ./DefaultArtifactResolutionResultTest.groovy
  1. … 15 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.

  1. … 307 more files in changeset.
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +43
    ./DefaultComponentArtifactsResultTest.groovy
    • -0
    • +113
    ./DefaultResolutionResultTest.groovy
    • -0
    • +63
    ./DefaultResolvedComponentResultTest.groovy
  1. … 1382 more files in changeset.