JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Change `AbstractIntegrationSpec` to fail when a test runs a build that fails with more than one exception and does not verify the number of exceptions in the failure using `assertHasFailures()`.

This is to avoid additional exceptions unintentionally being introduced, for example when a failure starts being thrown because of configuration cache problems alongside the expected failure.

    • -0
    • +2
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 81 more files in changeset.
Align the ambiguous selection error messages with no matching case

This commit polishes improved error messages in variant selection by

making the "ambiguous" case closer to what we have for the "no matching"

case.

    • -6
    • +6
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 20 more files in changeset.
Introduce styled exceptions

This commit introduces the concept of _styled exceptions_, which basically

allow putting some emphasis on user facing error messages. Before this

change, exception messages were just plain text. It's now possible to have

exceptions which provide a rich styled output when an ANSI console is

available.

The attribute matching code has been adapted to make use of those new

exception types.

    • -55
    • +13
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 38 more files in changeset.
Make it possible to use an ecosystem describer in more cases

Before this commit the describer would only be used if the same set of attributes

was found. This means that if the consumer added, or removed, one attribute, we

would lose the benefit of better user error messages. With this change, we try

to find the _best matching_ describer, if any.

    • -21
    • +21
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 20 more files in changeset.
Improve error reporting for the Java ecosystem

This commit introduces improved error messages for the Java ecosystem

in case of variant matching errors.

    • -43
    • +43
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 26 more files in changeset.
Improve variant matching error messages

Error messages prove to be difficult to interpret from a user point of

view. This commit tries to improve the situation by doing a couple of

things:

1. describing more clearly what the consumer is asking for. This includes,

when possible (currently only in the Java ecosystem), interpreting the

consumer attributes as a human-readable description, instead of a raw

list of attributes.

2. giving more context when possible. In particular, sometimes we fail

with an ambiguous variant error selection, but we only list the remaining

candidates, not listing the ones which were actually discarded during

selection. This proved to be particularly complex to debug from various

users (plugin authors and end-users).

    • -1
    • +1
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 46 more files in changeset.
Set category attribute to 'library' for compile and runtime classpath

Otherwise Gradle may attempt to match variants of other categories

if the category=library variants to not fit (in which case Gradle

should fail).

    • -2
    • +15
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 12 more files in changeset.
Adjust tests and samples to new publishing default behavior

    • -1
    • +0
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 43 more files in changeset.
Rename format attribute and clean up values

Attribute is now org.gradle.libraryelements and only applied

to variants having the org.gradle.category at library.

This means that values related to platforms or document in the

former format attribute are removed.

    • -13
    • +13
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 46 more files in changeset.
Remove utilisation of *-jars usage values

    • -13
    • +26
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 55 more files in changeset.
Rework configuration / variant exception messages

* For ambiguity issues, other attributes are listed before compatible

attributes.

* For incompatibility issues, incompatible attributes are listed first,

followed by other attributes.

Issue #8747

    • -24
    • +36
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 19 more files in changeset.
Update test case to illustrate error

The test case used a String for the Java version, which works,

but in practice the attribute is an `Integer`. Coercion did the

magic, but if we use the _real_ type, it would have failed.

    • -6
    • +6
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 1 more file in changeset.
Fix rebase glitches

    • -0
    • +162
    ./JavaLibraryPublishedTargetJvmVersionIntegrationTest.groovy
  1. … 7 more files in changeset.