ArtifactBackedResolvedVariantTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fixes for changes to transform subject.

    • -3
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 1 more file in changeset.
Detangle artifact transform nodes from `ResolveableArtifact` so that the initial set of files can be represented in some other way.

    • -3
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 15 more files in changeset.
Detangle artifact transform nodes from `ResolveableArtifact` so that the initial set of files can be represented in some other way.

    • -3
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 15 more files in changeset.
Detangle artifact transform nodes from `ResolveableArtifact` so that the initial set of files can be represented in some other way.

    • -3
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 16 more files in changeset.
Detangle artifact transform nodes from `ResolveableArtifact` so that the initial set of files can be represented in some other way.

    • -3
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 15 more files in changeset.
Change file collection `visitLeafCollections()` so that visitor receives a 'source' object and `Iterable<File>` that describes a file collection, instead of a `FileCollection` instance.

Change visiting of the outputs of artifact transforms so that an empty collection is visited when its 'spec' is requested by the visitor. The 'source' object can be used to carry details about the output variant to the instant execution serializer.

    • -6
    • +7
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 25 more files in changeset.
Change file collection `visitLeafCollections()` so that visitor receives a 'source' object and `Iterable<File>` that describes a file collection, instead of a `FileCollection` instance.

Change visiting of the outputs of artifact transforms so that an empty collection is visited when its 'spec' is requested by the visitor. The 'source' object can be used to carry details about the output variant to the instant execution serializer.

    • -6
    • +7
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 25 more files in changeset.
Change file collection `visitLeafCollections()` so that visitor receives a 'source' object and `Iterable<File>` that describes a file collection, instead of a `FileCollection` instance.

Change visiting of the outputs of artifact transforms so that an empty collection is visited when its 'spec' is requested by the visitor. The 'source' object can be used to carry details about the output variant to the instant execution serializer.

    • -6
    • +7
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 25 more files in changeset.
Change file collection `visitLeafCollections()` so that visitor receives a 'source' object and `Iterable<File>` that describes a file collection, instead of a `FileCollection` instance.

Change visiting of the outputs of artifact transforms so that an empty collection is visited when its 'spec' is requested by the visitor. The 'source' object can be used to carry details about the output variant to the instant execution serializer.

    • -6
    • +7
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 25 more files in changeset.
Change file collection `visitLeafCollections()` so that visitor receives a 'source' object and `Iterable<File>` that describes a file collection, instead of a `FileCollection` instance.

Change visiting of the outputs of artifact transforms so that an empty collection is visited when its 'spec' is requested by the visitor. The 'source' object can be used to carry details about the output variant to the instant execution serializer.

    • -6
    • +7
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 25 more files in changeset.
Rework visiting a `Configuration` so that its contents are treated as a sequence of collections, rather than a single monolithic collection of files. This will allow visitors such as continuous build or instant execution some finer-grained visibility into the contents of the `Configuration`.

In this commit, the collections do not carry any useful information and the granularity is per artifact, which is too fine-grained. Later commits will address this.

    • -0
    • +6
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 27 more files in changeset.
Rework visiting a `Configuration` so that its contents are treated as a sequence of collections, rather than a single monolithic collection of files. This will allow visitors such as continuous build or instant execution some finer-grained visibility into the contents of the `Configuration`.

In this commit, the collections do not carry any useful information and the granularity is per artifact, which is too fine-grained. Later commits will address this.

    • -0
    • +6
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 27 more files in changeset.
Rework visiting a `Configuration` so that its contents are treated as a sequence of collections, rather than a single monolithic collection of files. This will allow visitors such as continuous build or instant execution some finer-grained visibility into the contents of the `Configuration`.

In this commit, the collections do not carry any useful information and the granularity is per artifact, which is too fine-grained. Later commits will address this.

    • -0
    • +6
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 27 more files in changeset.
Simplify the unpacking from a consumer provided variant to a file to apply an artifact transform to. Visit the local artifacts of the variant and create a transform node directly for each local artifact, instead of unpacking to an intermediate artifact set and then to two different artifact types.

    • -0
    • +32
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 12 more files in changeset.
Change various buildable dependency resolution types to extend `TaskDependencyContainer` rather than providing their own contract for visiting their dependencies.

This removes the need for adapters when visiting the build dependencies of dependency resolution types as part of visiting the dependencies of a task.

    • -5
    • +5
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 24 more files in changeset.
Replace `BuildDependenciesVisitor` with `TaskDependencyResolveContext` so that the same visitor type is used to visit the build dependencies of a configuration/variant/artifact as is used to visit the build dependencies of other things.

    • -1
    • +2
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 26 more files in changeset.
Avoid locking the target project of project dependencies during task execution.

During work graph calculation, add an action that runs immediately after the producing task of an artifact completed that caclculates the dependency resolution metadata for that artifact. This happens before the consuming tasks are started, and so is available without locking when those tasks execute. Previously this calculation was done by consuming tasks, and they would need to lock the target project to do this.

This strategy works only for those tasks that declare that they will need these files (e.g. are declared as inputs in some form). For tasks that do not declare these inputs (possibly because there is no easy way to do so yet), the action is not added and the locking will still occur when the consuming task executes.

The implementation bolts a new concept onto the task nodes, as an increment towards making these actions real nodes in the graph that can be scheduled in the normal way.

    • -10
    • +3
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 27 more files in changeset.
Avoid eager creation of display name for variants

In a lot of cases, we were eagerly concatenating strings in `visitFile` even if the name was never used.

    • -7
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 24 more files in changeset.
Moved some logic that decides whether or not to resolve an artifact synchronously or asynchronously into the implementation of the artifact, to move it closer to the code that is in a better position to know this.

    • -3
    • +3
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 5 more files in changeset.
Always use a variant display name for artifact resolution

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

    • -6
    • +6
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 15 more files in changeset.
Don't attempt to resolve asynchronously an artifact that has already been resolved in the current build invocation and whose result is already known in memory.

This avoids unnecessary synchronization overhead to run a build operation that effectively is a no-op, generates much less garbage, and delivers a more useful stream of build events to the build user.

    • -0
    • +3
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 3 more files in changeset.
Added a new type `ResolveableArtifact` to use instead of public `ResolvedArtifact` when resolving and visiting the artifacts of a dependency resolution result.

    • -2
    • +1
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 29 more files in changeset.
Reorganise the rich build operation details/results type to further decouple from producer side semantics.

    • -1
    • +1
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 82 more files in changeset.
Improved the 'no matching variant' and 'too many matching variant' error messages to use a better description of each of the variants, such as which project/module and configuration the variant belongs to.

Made a bunch of changes to forward the display name of the variant from where the variant originates from through to the variant selection logic so it can construct the error messages, using `Describable` to represent the display name.

    • -1
    • +2
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 34 more files in changeset.
Treat a failure to resolve the dependencies of a configuration as a failure to calculate task dependencies, when using dependency substitution, so that execution fails early. Previously these were ignored, usually to be rethrown later when the files of the configuration were queried.

This is a potential breaking change.

    • -6
    • +8
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 26 more files in changeset.
Cleaned up the various `ResolvedArtifactSet` implementations, post API refactor.

    • -10
    • +70
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 13 more files in changeset.
Unify BuildOperationExecutor and BuildOperationProcessor APIs

This introduces the following `BuildOperationExecutor`

interface (as outlined in gradle/gradle#1676):

void run(RunnableBuildOperation buildOperation);

<T> T call(CallableBuildOperation<T> buildOperation);

<O extends RunnableBuildOperation> void runAll(

Action<BuildOperationQueue<O>> schedulingAction);

<O extends BuildOperation> void runAll(

BuildOperationWorker<O> worker,

Action<BuildOperationQueue<O>> schedulingAction);

To accomplish this, the following changes were performed:

- Various representation of build operations have been merged into

1) BuildOperation (with sub-interfaces)

-> declare and describe a build operation

2) BuildOperationDescriptor (BuildOperationDescriptor.Builder)

-> describe a build operation

3) BuildOperationState

-> represents a running build operation, with run state, start time,

parent relationship information, and description

- The DefaultBuildOperationExecutor and DefaultBuildOperationProcessor

implementations have been merged in DefaultBuildOperationExecutor,

which is now build session scoped.

    • -2
    • +2
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 180 more files in changeset.
Remove ResolvedVariant.getArtifacts()

- Replaced ResolvedVariant.getArtifacts() with inline visit() and prepare()

- Inlined a bunch of `ResolvedArtifactSet` impls into `ResolvedVariant` impls

    • -0
    • +91
    ./ArtifactBackedResolvedVariantTest.groovy
  1. … 14 more files in changeset.