RootLocalComponentMetadataTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Implement lenient mode for locking

In lenient mode, lock entries are `requires` and not `strictly` and

there is no validation after resolution. This allows deviations from the

lock state.

Issue #9907

    • -8
    • +9
    ./RootLocalComponentMetadataTest.groovy
  1. … 8 more files in changeset.
Implement strict mode for locking

In strict mode, a locked configuration without a lockfile, empty or not,

is illegal and will cause the build to fail.

Issue #9907

    • -3
    • +4
    ./RootLocalComponentMetadataTest.groovy
  1. … 12 more files in changeset.
Add deprecation mechanism for configurations

    • -1
    • +1
    ./RootLocalComponentMetadataTest.groovy
  1. … 16 more files in changeset.
Use an `ImmutableSet` to represent the configuration hierarchy

ImmutableSets are ordered and optimized for lookups. We happen to

call `contains` a lot on hierarchies, so using a `Set` should

optimize things a little.

    • -1
    • +2
    ./RootLocalComponentMetadataTest.groovy
  1. … 31 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
    • +6
    ./RootLocalComponentMetadataTest.groovy
  1. … 164 more files in changeset.
Fix reason for lock constraints

    • -0
    • +22
    ./RootLocalComponentMetadataTest.groovy
  1. … 1 more file in changeset.
Use ModuleComponentIdentifier for locked dependencies

This is a pure refactoring that changes `DependencyLockingState` to

represent locked dependencies as `ModuleComponentIdentifier` instead of

as `DependencyConstraint` instances. This decouples the state from the

actual locking implementation, and removes the use of

`VersionConstraint.getPreferredVersion()` in order to map the state to

actual selectors in the graph.

    • -3
    • +3
    ./RootLocalComponentMetadataTest.groovy
  1. … 8 more files in changeset.
Make locking constraints non transitive

Having them transitive could bring back excluded modules.

    • -0
    • +16
    ./RootLocalComponentMetadataTest.groovy
  1. … 2 more files in changeset.
Enable updating a subset of locked dependencies

The feature is triggered by the "--update-locks org:foo,org:bar" command

line flag.

This filters out the constraints for dependencies to update and applies

the other constraints as "prefer" instead of "strict".

Fixes #4906

    • -2
    • +2
    ./RootLocalComponentMetadataTest.groovy
  1. … 14 more files in changeset.
Refactorings following review comments

* Rename LockConstraint to DependencyLockingState

* Removed EmptyLockConstraint

* Simplified some nested conditionals

    • -4
    • +3
    ./RootLocalComponentMetadataTest.groovy
  1. … 14 more files in changeset.
Avoid accessing `ResolutionStrategy` for non-root components

To determine if a configuration should have dependency locking enabled,

we inspect the ResolutionStrategy for that configuration. However, we

were needlessly inspecting this for configurations in referenced

projects, leading to added contention.

With this change, we only inspect the resolution strategy for

configurations when building the component metadata for the root

component, not for any referenced project components.

    • -5
    • +4
    ./RootLocalComponentMetadataTest.groovy
  1. … 12 more files in changeset.
Lock validation and persist through graph visitor

This introduces validation of graph resolution with the lock file.

Added or missing dependencies in the graph compared to the lock

file cause a failure.

The visitor doing the validation is also used for trigerring

the persistence of the result.

Fixes #4862

    • -2
    • +4
    ./RootLocalComponentMetadataTest.groovy
  1. … 28 more files in changeset.
Changes following code review

Issue #3182

* More specific reason added to generated constraint

* Moved code around and improved naming

* Perform mutation validation on DefaultResolutionStrategy

    • -2
    • +2
    ./RootLocalComponentMetadataTest.groovy
  1. … 9 more files in changeset.
Leverage injection for DependencyLockingProvider

Issue #3182

    • -3
    • +3
    ./RootLocalComponentMetadataTest.groovy
  1. … 9 more files in changeset.
Introduce dependency-locking

Issue #3182

    • -0
    • +51
    ./RootLocalComponentMetadataTest.groovy
  1. … 21 more files in changeset.