IvyBrokenRemoteResolveIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +7
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 12 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +7
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +7
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 12 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +7
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 12 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -3
    • +3
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 32 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -3
    • +3
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 32 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -18
    • +0
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 95 more files in changeset.
wip - fix more tests

    • -18
    • +0
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
wip - fix more tests

    • -18
    • +0
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 45 more files in changeset.
wip - fix more tests

    • -18
    • +0
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
Improve error reporting in case no matching dynamic version is found

This commit improves rendering of errors in case resolution fails because

all versions in a dynamic range are evicted, and that at least one of the

evicted versions was evicted because of attribute matching. The error will

now report the attributes on each tested version, as well as the requested

attributes.

For this, the module not found exception has been updated to carry more

context, and now makes use of the tree formatter for consistency with other

exceptions in the codebase.

    • -18
    • +18
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 37 more files in changeset.
Treat various kinds of dependency resolution failures in more consistent ways.

- When a non-lenient view is used as a task input, then propagate any failure to select a configuration in the dependency graph during task graph calculation, rather than suppressing these kinds of failures and propagating later when the files happen to be queried. This now happens consistently whether fluid dependencies are used or not. The only difference between these is how much of the graph is traversed at task graph calculation time.

- When a lenient view is used as a task input, suppress configuration selection failures during task graph calculation and instead present them in `ArtifactCollection.failures`. Do this consistently regardless of whether fluid dependencies are used or not. Previously this kind of failure was propagated during task graph calculation for lenient views.

Also changed the error message on resolution failure to include what kind of query was being performed at the time to trigger the failure.

From an implementation point of view, separated the handling of selection failures from the code that produces the legacy resolution result so that this handling can be reused when the legacy result is not required (such as, say, when calculating the task graph).

    • -2
    • +2
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 34 more files in changeset.
Include each of the dependency graph resolution failures in `ArtifactCollection.failures` when in lenient mode, rather than grouping them together as causes of a single `ResolveException`.

For artifact/file query methods that are not lenient, fail eagerly when the dependency graph cannot be fully resolved, rather than continuing and attempting to resolve the artifacts. This was the previous behaviour of these methods.

Also removed a duplicate from the exception chain when these methods do fail due to a dependency graph problem.

    • -2
    • +2
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 11 more files in changeset.
Add `lenient` option to `artifactView()`

By choosing a lenient view, the returned `FileCollection` or `ArtifactCollection`

will return any resolved files/artifacts, ignoring failures.

    • -2
    • +2
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 10 more files in changeset.
Use doLast instead of left shift operator

Made this change in preparation for deprecating the left shift operator.

+review REVIEW-6236

    • -7
    • +7
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 163 more files in changeset.
Added a little more coverage for caching in the presence of failures during dependency resolution.

    • -0
    • +49
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 1 more file in changeset.
Use component id rather than module version id in the 'required by' paths in resolve exceptions. This provides a better description for local components, and also allows for components that don't have a module version id.

    • -5
    • +82
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 13 more files in changeset.
Some test coverage to reporting locations when we can't resolve something.

    • -0
    • +6
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Tweaked 'could not download artifact' and 'could not find artifact' error messages.

    • -3
    • +3
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 13 more files in changeset.
Use a specific error message when a dependency cannot be found and no repositories have been defined.

    • -4
    • +83
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 9 more files in changeset.
Report locations for missing artifacts when meta-data is loaded from cache.

    • -5
    • +19
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +265
    ./IvyBrokenRemoteResolveIntegrationTest.groovy
  1. … 1384 more files in changeset.