ProjectDependencyResolverTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Reuse one object for empty ComponentOverrideMetadata

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Reuse one object for empty ComponentOverrideMetadata

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Reuse one object for empty ComponentOverrideMetadata

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Reuse one object for empty ComponentOverrideMetadata

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Reuse one object for empty ComponentOverrideMetadata

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Provide an explicit `acceptor` and `rejector` to API for choosing dependency version

This will permit a single `ResolvedVersionConstraint` to have both a `prefer`

and a `require` version.

    • -2
    • +2
    ./ProjectDependencyResolverTest.groovy
  1. … 14 more files in changeset.
Merge `ProjectStateAccess` service into `ProjectState`, so that an action can be run against the mutable model of a project in a thread-safe way. The implementation is currently dumb.

This change moves some of the project state that is spread across a bunch of services into a single place.

    • -2
    • +10
    ./ProjectDependencyResolverTest.groovy
  1. … 9 more files in changeset.
Add some basic synchronization around access to the mutable state of a project from the dependency resolution engine. This synchronization isn't complete and there are a number of other places where the state of a project is accessed by Gradle services from multiple threads concurrently. This change includes just enough to prevent multiple threads triggering the creation and configuration of deferred tasks when they are indirectly referenced via project dependencies from multiple threads at once.

    • -1
    • +2
    ./ProjectDependencyResolverTest.groovy
  1. … 4 more files in changeset.
Simplify the collection of selection reasons

It is not necessary to resolve all selectors in order to include them

in the graph. For instance, if the we resolve a fixed version `12`, then

there is no reason to also resolve the version range `[10, 12]`.

For this reason, it should not be necessary to resolve a selector in

order to determine the selection reason. With this change, the selection

reason is no longer part of the `ComponentIdResolveResult`, and is

determined directly when adding the selector to the graph.

    • -3
    • +0
    ./ProjectDependencyResolverTest.groovy
  1. … 8 more files in changeset.
Provide ResolvedVersionConstraint when resolving component id

The 'resolved' version constraint is critical to resolving the component id

for a given selector. In order to honour all constraints in the resolution

process, this `ResolvedVersionConstraint` will be composed of more than

just the constraints for a single selector.

With this change, the `ResolvedVersionConstraint` is constructed

prior to resolving the id, rather than being constructed as part of that

process.

    • -2
    • +2
    ./ProjectDependencyResolverTest.groovy
  1. … 14 more files in changeset.
Add test coverage for dependency reasons

This commit adds test coverage, using the new resolve test fixtures.

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

    • -1
    • +3
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Removed unused `ModuleId` param from `DependencyToComponentIdResolver.resolve()`

    • -2
    • +2
    ./ProjectDependencyResolverTest.groovy
  1. … 14 more files in changeset.
Avoid computing `ModuleIdentifier` multiple times for the same module

This commit pre-computes a `ModuleIdentifier` from a dependency and passes it around several places where it

is used. This saves a bunch of lookups in the module identifier cache, which tend to be pretty expensive.

Dependency substitution is also passed the original module identifier, in case no substitution is done. This

prevents an additional lookup.

    • -2
    • +5
    ./ProjectDependencyResolverTest.groovy
  1. … 23 more files in changeset.
Remove build-on-demand for composite builds

This changes means that dependencies resolved for buildscript

classpath, and dependencies resolved at configuration time,

will be correctly substituted in a composite build but will not

be built correctly.

We need to fix this for buildscript dependencies.

The new behaviour is intended for configuration-time dependencies

(similar to regular project dependencies resolved at configuration-time)

    • -2
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 8 more files in changeset.
Moved test factory methods out of production code

    • -3
    • +3
    ./ProjectDependencyResolverTest.groovy
  1. … 19 more files in changeset.
Use build name for `ProjectComponentSelector` instead of identifier

This makes `ProjectComponentSelector` more useful across builds, since it does

not require a BuildIdentifier to be 'localized for the currently executing

build.

    • -2
    • +6
    ./ProjectDependencyResolverTest.groovy
  1. … 14 more files in changeset.
Introduce a separate `BuildIdentifier` for composites

ProjectComponentIdentifier and ProjectComponentSelector now each have

a BuildIdentifier instance to identify the build that contains the

project. You can create a project identifier for the 'current' build

or from an included build.

At this stage, any ProjectComponentIdentifier for the 'current'

build has a 'current' BuildIdentifier, with name = `null`.

This will be improved to be a true build identifier.

    • -1
    • +1
    ./ProjectDependencyResolverTest.groovy
  1. … 28 more files in changeset.
Always use factory method to create ProjectComponentId

    • -4
    • +5
    ./ProjectDependencyResolverTest.groovy
  1. … 24 more files in changeset.
Fix unit test

    • -1
    • +2
    ./ProjectDependencyResolverTest.groovy
Renamed some internal services to reflect a broader role in composite build

- ProjectComponentRegistry -> LocalComponentRegistry

- renamed getProject() -> getComponent()

- ProjectComponentProvider -> LocalComponentProvider

- Extracted register() method into a sub-interface

    • -6
    • +6
    ./ProjectDependencyResolverTest.groovy
  1. … 22 more files in changeset.
Rename `o.g.i.c.model.*{MetaData => Metadata}`

    • -6
    • +6
    ./ProjectDependencyResolverTest.groovy
  1. … 162 more files in changeset.
Remove unused DependencyDescriptor infrastructure

    • -5
    • +2
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Unit test fixes

    • -3
    • +4
    ./ProjectDependencyResolverTest.groovy
  1. … 1 more file in changeset.
LocalComponentMetaData extends ComponentResolveMetaData (instead of providing)

    • -13
    • +5
    ./ProjectDependencyResolverTest.groovy
  1. … 9 more files in changeset.
Completely separate converters for publish and resolve metadata

- Removed LocalComponentMetaData.toPublishMetaData()

- Inlined into IvyBackedArtifactPublisher, where it is used.

- Use same *->ModuleDescriptor converters for publish and resolve converters

    • -3
    • +3
    ./ProjectDependencyResolverTest.groovy
  1. … 24 more files in changeset.
Merge branch 'release'

    • -0
    • +19
    ./ProjectDependencyResolverTest.groovy
  1. … 1 more file in changeset.
Add resolution failure when a dependency is substituted with a non-existent project

+review REVIEW-5531

    • -0
    • +18
    ./ProjectDependencyResolverTest.groovy
  1. … 3 more files in changeset.
Move part of library dependency resolution to platformBase

+review REVIEW-5505

    • -11
    • +5
    ./ProjectDependencyResolverTest.groovy
  1. … 32 more files in changeset.
Revert "Move part of library dependency resolution to platformBase" as it breaks the build.

This reverts commit c499ea561628c359d55e8b738e8bbfa477499804.

    • -5
    • +11
    ./ProjectDependencyResolverTest.groovy
  1. … 25 more files in changeset.
Move part of library dependency resolution to platformBase

+review REVIEW-5505

    • -11
    • +5
    ./ProjectDependencyResolverTest.groovy
  1. … 25 more files in changeset.