VersionConflictResolutionIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -5
    • +5
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -5
    • +5
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -5
    • +5
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 19 more files in changeset.
Fix ConcurrentModificationException in NodeState

When removing outgoing edges, there was a code path trying to remove

elements from the same collection that is being cleared initially.

This commit fixes that condition by not attempting to do so, knowing

that the edges to be removed will be as part of the external iteration.

Fixes #8944

    • -0
    • +62
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 3 more files in changeset.
Fix ConcurrentModificationException in NodeState

When removing outgoing edges, there was a code path trying to remove

elements from the same collection that is being cleared initially.

This commit fixes that condition by not attempting to do so, knowing

that the edges to be removed will be as part of the external iteration.

Fixes #8944

    • -0
    • +62
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 3 more files in changeset.
Update failOnVersionConflict error message

The message now leverages the description found on the selection reason.

It will enable to report on all conflicts, like capabilites, and not

just version ones.

Issue #8428

    • -3
    • +3
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 6 more files in changeset.
Revert "Temporarily ignore failing DM tests"

This reverts commit f71ac70373f4ed3b63143c08180b5fa158a320e9.

    • -2
    • +0
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 6 more files in changeset.
Temporarily ignore failing DM tests

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 6 more files in changeset.
Revert backport of PR 7049

Revert "Temporary ignore performance test"

This reverts commit 781c724b420540f0ca19df115b6a59bb392a7a6e.

Revert "Fix SelectorState when removed from target module"

This reverts commit 6008ed5bf7de91cf53664b631ea37700df93f173.

Revert "failing test!"

This reverts commit 801394795eeb3f1cc880236e3bac59c7de83da55.

Revert "Currently passing test"

This reverts commit e2607d184807931a19bd2e8ba6edd0d1dfa93c6e.

    • -53
    • +0
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 3 more files in changeset.
Fix SelectorState when removed from target module

When removing a `SelectorState` from its target module, it also needs to

be marked as _not_ resolved so that if it gets used again in the future

it will trigger proper selection again.

Doing this change uncovered a bug around conflict resolution. When a

module is forced to a different module, we need to remember this so that

any selector added after the force takes place can be marked as

overridden as well.

Fixes #7050

    • -1
    • +1
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 2 more files in changeset.
Fix SelectorState when removed from target module

When removing a `SelectorState` from its target module, it also needs to

be marked as _not_ resolved so that if it gets used again in the future

it will trigger proper selection again.

Doing this change uncovered a bug around conflict resolution. When a

module is forced to a different module, we need to remember this so that

any selector added after the force takes place can be marked as

overridden as well.

Fixes #7050

    • -1
    • +1
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 2 more files in changeset.
Clear remaining edges when module is pending again

When a module moves back to pending - aka no hard edges left to it - we

were not removing the remaining constraint edges that could point to it.

We can simply clear these edges and not restart their origin as we know

the scope of the change is only about dropping constraints.

Fixes #7060

    • -3
    • +10
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 2 more files in changeset.
failing test!

Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>

    • -7
    • +18
    ./VersionConflictResolutionIntegrationTest.groovy
failing test!

Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>

    • -7
    • +18
    ./VersionConflictResolutionIntegrationTest.groovy
Currently passing test

Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>

    • -0
    • +42
    ./VersionConflictResolutionIntegrationTest.groovy
Currently passing test

Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>

    • -0
    • +42
    ./VersionConflictResolutionIntegrationTest.groovy
Implement variant derivation strategy

This commit changes how Maven metadata is derived into variants. Now we will

only derive variants if the Java plugin is applied (the "base Java" plugin).

This is implemented via a variant derivation strategy, and allows fixing

the problem that a native component is unlikely to find sense in the derivation

of Java variants. This fixes a bug where the native plugins wouldn't be able

to consume native libraries published on Maven repositories, without Gradle

metadata.

    • -3
    • +2
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 43 more files in changeset.
Remove unused improve pom support flags

    • -3
    • +0
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 19 more files in changeset.
Tidy up variant-names in integration tests

Instead of inlining the expected variant name in the module coordinates,

use `ResolveTestFixture.expectDefaultConfiguration(variant)`.

    • -21
    • +21
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 8 more files in changeset.
Enable improved POM support by default

This commit makes the experimental flag `IMPROVED_POM_SUPPORT` the default.

The flag is still there for backwards compatibility but has effectively no

impact. As a consequence, the behavior of improved POM support is now the

default, which implies that:

- Maven dependencies packaged as `pom` or `jar` now have derived variants

(`compile` and `runtime`) and we properly choose between the variants based

on the consumer attributes

- platform dependencies using the `platform` and `enforcedPlatform` keywords

are enabled

Enabling improved POM support by default is a **breaking change**: there's

a risk that resolved dependencies is different, in particular because we

will now only include the `compile` dependencies of a POM file whenever the

consumer asks for the API variant. There are also some changes in the

dependency insight reports due to the use of attribute based matching instead

of configuration selection.

Last but not least, this commit is likely to introduce a small performance

regression due to attribute based selection.

    • -16
    • +16
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 50 more files in changeset.
Ability to revert a dependency to pending

This change covers one more edge case where the dependency causing the

status revert happens to itself declare an optional dependency to the

reverting module.

Fixes #6604

    • -1
    • +8
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 3 more files in changeset.
Ability to revert a dependency to pending

This changes enables a no longer pending dependency to move back to

pending if all hard edges are removed.

Fixes #6604

    • -0
    • +42
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 6 more files in changeset.
Recompute selected component when removing a selector

Previously, once a component was selected, removing a selector would not

change the resolution result, potentially keeping a selection that no

longer applied.

Now upon removal of a selector, the selected component may be updated.

Fixes #6567

    • -5
    • +3
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 5 more files in changeset.
Recompute selected component when removing a selector

Previously, once a component was selected, removing a selector would not

change the resolution result, potentially keeping a selection that no

longer applied.

Now upon removal of a selector, the selected component may be updated.

Fixes #6567

    • -11
    • +8
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 7 more files in changeset.
Import POM files as different variants

This commit implements solution 6 of #4422, by importing POM files

using different variants. By default, a POM file will be imported

as 6 different variants:

- 2 libraries (runtime and compile)

- 4 platforms (runtime and compile, regular and enforced)

This implies that a dependency on a BOM will now be intepreted as

a dependency on a library, whereas a dependency on a BOM expressed

using the `platform(...)` or `enforcedPlatform(...)` methods will

be interpreted as importing the platform component published at

the same coordinates.

This commit doesn't remove optional dependencies for Maven, but

reimplements how the dependencies are shuffled in different variants.

The dependencies found in a dependency management block are no

longer considered optional. Instead, they are properly marked as

constraints. However, they are only visible if using the experimental

flag, **and** using the platform variant.

    • -1
    • +1
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 31 more files in changeset.
Simplify test case for #6403

    • -7
    • +5
    ./VersionConflictResolutionIntegrationTest.groovy
Fix incorrect conflict detection

Whenever 2 selectors agree on the version to use but one of them

is not a "shortcutting" selector, we created a conflict, instead

of checking if they agreed before.

Fixes #6403

    • -0
    • +36
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 2 more files in changeset.
Revert "Support version range merging for '.+' selectors"

Includes additional test changes for coverage added after the initial

commit.

This reverts commit 26da3b84b581a22c7c825495ec1ba4ec45e1febf.

    • -3
    • +3
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 4 more files in changeset.
Fix order dependent resolution when module is evicted

This commit fixes several ordering issues, due to the fact selectors

were still used during resolution even if the corresponding node was

evicted.

Fixes #5530

    • -5
    • +11
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 3 more files in changeset.
Consistently report conflict resolution

This commit refactors how conflict resolution selection reasons are handled, in order to:

- collect the list of versions which participated in conflict resolution

- report a single conflict resolution cause when conflicts are resolved several times for the same module

- consistently report module replacement rules as rules, not conflict resolution. Before this change,

a module replacement was reported as both a conflict and a rule

    • -6
    • +6
    ./VersionConflictResolutionIntegrationTest.groovy
  1. … 29 more files in changeset.