Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Extract anonymous classes to static inner classes

    • -17
    • +25
    ./UnresolvableConfigurationResult.java
  1. … 145 more files in changeset.
Extract anonymous classes to static inner classes

    • -17
    • +25
    ./UnresolvableConfigurationResult.java
  1. … 145 more files in changeset.
Extract anonymous classes to static inner classes

    • -17
    • +25
    ./UnresolvableConfigurationResult.java
  1. … 146 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. … 23 more files in changeset.
Fix dependencyInsight for project dependencies that fail to resolve

  1. … 2 more files in changeset.
Show selected id in dependencies report when differs from version constraint

    • -0
    • +15
    ./AbstractRenderableDependency.java
    • -1
    • +1
    ./AbstractRenderableDependencyResult.java
  1. … 2 more files in changeset.
Make use of `VersionConstraint` in dependency reporting

- Use `VersionConstraint.displayName` to render unresolved dependency

- Remove assumption that all unresolved deps are `ModuleComponentSelector`

- Tidy implementation of `DependencyResultSorter`

    • -14
    • +1
    ./AbstractRenderableDependencyResult.java
    • -7
    • +1
    ./RenderableUnresolvedDependencyResult.java
  1. … 2 more files in changeset.
Replace '=>' symbol with explicit 'requested'

  1. … 1 more file in changeset.
Do not attach children to constraints in `dependencies` report

Prior to this change, constraints and dependencies were treated identically in

the `dependencies` report. This meant that transitive dependencies would often

appear to be "brought in" by an imported BOM file or other source of dependency

constraints. This can be confusing to a user, who thinks of the constraint as

merely influencing the version of the dependency, not adding a new dependency.

This has been addressed by ensuring that transitive dependencies are attached to

a hard dependency in the dependencies report. Dependency constraint edges are

rendered non-transitively, even if they appear earlier in the dependency graph.

Fixes #5969

Fixes #4846

  1. … 4 more files in changeset.
Show more edge information in dependencyInsight

The `dependencyInsight` report shows detailed information about a particular

node in the dependency graph, including all incoming edges to that node traced from

the root. Understand which incoming edge is responsible for influencing the selected

version is an important use case for `dependencyInsight`.

A previous change added and conflict resolution reasons that were present for a

node on an incoming edge. This PR brings an improvement over this previous behaviour:

with this change we show the requested version for each edge where it is different

from the actual version that was selected.

    • -11
    • +15
    ./InvertedRenderableModuleResult.java
  1. … 2 more files in changeset.
Show conflict resolution reason for 2nd level dependencies

The dependencyInsight report shows a full suite of selection reasons

for the dependency being analysed, but shows only the selected version

for dependencies that are transitively responsible for the target

dependency.

With this change, we report the conflict resolution reason for any higher-order

dependencies that were selected through conflict resolution.

    • -0
    • +14
    ./InvertedRenderableModuleResult.java
  1. … 1 more file in changeset.
Use `getVersion()` in preference to `getVersionConstraint().getPreferredVersion()`

    • -1
    • +1
    ./AbstractRenderableDependencyResult.java
    • -2
    • +2
    ./RenderableUnresolvedDependencyResult.java
  1. … 11 more files in changeset.
Fix potential class cast exception

  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.

    • -2
    • +1
    ./AbstractRenderableDependencyResult.java
  1. … 163 more files in changeset.
Refactor dependency insight renderer for readability

This commit largely refactors the dependency insight report

infrastructure to make it more understandable. The same should

probably be done for the ascii reporter, but it's not as widely

used. This is the reason why the dependency graphs builder has

a `complete` method, instead of writing the legend directly

when all nodes are rendered: it is called multiple times,

instead of once.

  1. … 11 more files in changeset.
Add rendering of failures to dependency insight report

This commit adds support for rendering failures in the dependency insight

report. Before this, the only message you would get was `FAILED`, which

forces to implement a task to show the actual error, which can be a bit

painful sometimes. Instead, errors are now reported as extra details in

the header.

  1. … 3 more files in changeset.
Add rendering of failures to dependency insight report

This commit adds support for rendering failures in the dependency insight

report. Before this, the only message you would get was `FAILED`, which

forces to implement a task to show the actual error, which can be a bit

painful sometimes. Instead, errors are now reported as extra details in

the header.

  1. … 3 more files in changeset.
Render target version only when it differs from requested

    • -3
    • +9
    ./RenderableUnresolvedDependencyResult.java
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.

    • -0
    • +59
    ./AbstractRenderableDependency.java
    • -15
    • +1
    ./AbstractRenderableDependencyResult.java
    • -0
    • +48
    ./DefaultSection.java
    • -20
    • +1
    ./RenderableUnresolvedDependencyResult.java
    • -27
    • +2
    ./UnresolvableConfigurationResult.java
  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.

    • -0
    • +59
    ./AbstractRenderableDependency.java
    • -15
    • +1
    ./AbstractRenderableDependencyResult.java
    • -0
    • +48
    ./DefaultSection.java
    • -20
    • +1
    ./RenderableUnresolvedDependencyResult.java
    • -27
    • +2
    ./UnresolvableConfigurationResult.java
  1. … 18 more files in changeset.
Consider dependency attributes in insight report

Fixes #5401 by merging configuration attributes and dependency

attributes before comparing against the attributes of the resolved

variant.

  1. … 2 more files in changeset.
Avoid duplicate details in dependencyInsight

Fixes #5397

  1. … 3 more files in changeset.
Make constraints an additional cause instead of replacing requested

This makes it simpler to recognize that a dependency was both requested and constrained.

This commit also reworks the `SelectionReasonHelper` to not use the deprecated `getDescription`

method and implement its own logic instead.

  1. … 3 more files in changeset.
Show that a constraint was used in the dependency insight report

This commit adds a new cause for a component selection reason, `CONSTRAINT`, which is used

whenever a constraint has been used during selection. This lets us recognize, in the resolution

result API, when a constraint has been applied. The dependency insight report makes use of

that information to show a `via constraint` label in that case.

If a dependency constraint also provides a custom reason, then the message displayed in the

report mentions both `via constraint` and the custom reason.

  1. … 5 more files in changeset.
Show variant details in dependency insight report

This commit introduces the visualization of selected variant details in the

dependency insight report. By default, variant details are not displayed,

and it's required to use the `--show-variant-details` flag to enable them.

Depending on the type of dependency, variant details may either refer to

the selected target configuration, or show proper variant attributes. In

both cases, the selected variant display name is shown. When a variant

defines attributes, the attributes of the variant are displayed and compared

to the requested attributes.

The report will show which attributes where matched, which attributes were

compatible, which attributes weren't requested, and eventually which attributes

were found on the variant, but not used during selection.

    • -0
    • +6
    ./AbstractRenderableDependencyResult.java
    • -0
    • +6
    ./RenderableUnresolvedDependencyResult.java
    • -0
    • +11
    ./UnresolvableConfigurationResult.java
  1. … 8 more files in changeset.
Fix code style

Rewrite code to make it less contrived.

Make sure reasons available in published metadata are visible

This commit updates the renderer so that we make sure that dependency

selection reason found in published module metadata is displayed in

the insight report.

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

    • -0
    • +29
    ./SelectionReasonHelper.java
  1. … 3 more files in changeset.
Add support for declaring a reason for dependencies

This information is not yet propagated to the dependency insight report,

because for that we need to update `DependencyMetadata` to support reasons

too, which is going to be implemented in a subsequent commit. Instead,

this one just adds the basic structure to be able to declare reasons.

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

  1. … 11 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
    • +3
    ./AbstractRenderableDependencyResult.java
    • -2
    • +2
    ./RenderableUnresolvedDependencyResult.java
  1. … 91 more files in changeset.
Replace usages of org.gradle.api.Nullable

With javax.annotation.Nullable.

    • -1
    • +2
    ./AbstractRenderableDependencyResult.java
  1. … 460 more files in changeset.