ResolvedFileOrderingIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Include details about the file dependencies attached to each node in the dependency graph in the results written to file, rather than retaining this information in heap. This information is only required when using a filtered view via the legacy APIs.

    • -5
    • +5
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 16 more files in changeset.
Changed traversal of dependency graph results so that the `ArtifactSet` instances included in the result are visited in consumer first order, rather than the nodes, so that the artifact sets can be collected directly into a list in the correct order rather than collecting and retaining an additional map from node -> artifact set to apply the ordering.

    • -5
    • +5
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 16 more files in changeset.
Reworked dependency result artifact/file ordering to address some issues and to make 'consumer first' the default ordering.

Specifically, nodes in the graph are now sorted by component, rather than sorting by node. When sorting by node for a component with multiple nodes in the graph (eg a direct dependency on a maven module from a Gradle project plus a transitive dependency via another maven module, but also possible in other ways) it was possible for a particular component to appear _before_ all of its consumers.

This change affects the arbitrary order for files/artifacts that form a cycle.

    • -7
    • +7
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 13 more files in changeset.
Reworked the collection of file dependencies during dependency graph traversal, so that the files from these dependencies are ordered the same way as other kinds of dependencies, rather than always ordering these files at the start of the result.

    • -11
    • +11
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 16 more files in changeset.
Move `configurationAttributesSchema` down to `DependencyHandler`

This commit fixes gradle/performance#251 by moving the attributes schema to the dependency handler. It's worth noting that

is also renames the configuration method from `configurationAttributesSchema` to simply `attributesSchema`.

    • -2
    • +4
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 18 more files in changeset.
Changed artifact selection to select zero or one variant of each node in the dependency graph to be included in the result, whether directly or as an input to a transformation.

Artifacts from the selected variant are still filtered by artifact type, which leads to some confusing behaviour. The filtering will be replaced by an error in a later change.

    • -2
    • +3
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 28 more files in changeset.
Always perform an equality check at the end of the chain

This commit removes the `eventuallyIncompatible`, `eventuallyCompatible` and

`addEqualityCheck` methods, and instead systematically add an equality check

at the end of the chain. If still after equality check nothing expressed

an opinion (this is possible if any value is not present), then we eventually

fail.

    • -3
    • +1
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 14 more files in changeset.
Rename `configureMatchingStrategy` to `attribute` and add a no configure action variant

    • -1
    • +1
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 15 more files in changeset.
Always require the user to declare the schema of attributes

This commit changes the way matching works, by forcing the user to declare all attributes.

Previously, if, and only if, the type of the attribute was a `String`, then we automatically

assigned a matching strategy. This was inconsistent, while at the same type make it impossible

to make the difference between a missing attribute and an unknown attribute.

This is a preliminary step to the unification of full and partial matching. Note that this

commit doesn't remove the shortcut methods that allow us to use a string as an attribute key.

    • -4
    • +9
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 16 more files in changeset.
Added more coverage for the various methods of `ResolvedConfiguration` and `LenientConfiguration`. Fixed a regression in `LenientConfiguration.files` introduced in some earlier refactoring.

Also added some convenience overloads for the various filtered methods on these types.

    • -7
    • +14
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 8 more files in changeset.
Added some test coverage for file/artifact ordering and duplicate handling for the various query APIs, to ensure each API presents files in the same order. They don't as it turns out; the filtered and non-filtered variants use different ordering. All of the filtered methods return files in the same order, and all of the non-filtered methods return files/artifacts in the same order.

Changed duplicate handling for `ResolvableDependencies.getArtifacts()` so that it behaves the same way as `ResolvedConfiguration.getArtifacts()`. Which is to say they are now equally broken, as local artifacts are not deduplicated.

This test coverage is more about locking down existing behaviour than it is about describing desired behaviour.

    • -0
    • +164
    ./ResolvedFileOrderingIntegrationTest.groovy
  1. … 3 more files in changeset.