gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add dedicated placeholder assertion error type

This commit introduces a dedicated placeholder assertion error

type which is used whenever a subtype of `AssertionError` cannot

be deserialized. Before, we would use the regular `PlaceholderException`,

which happens to discard the fact that it's an `AssertionError`.

The consequence is that IntelliJ IDEA in combination with Spock can't

infer the correct failure kind, and displays a wrong icon (see #12302).

It does not, however, fix the problem that the "Click here to see diff"

link doesn't show up. The reason is that this feature builds on top

of a dedicated subtype of `AssertionError` that the messaging bus

isn't aware of (org.opentest4j.AssertionFailedError and its legacy JUnit

equivalent).

Fixes #12302

    • -0
    • +63
    ./internal/serialize/PlaceholderAssertionError.java
    • -0
    • +27
    ./internal/serialize/PlaceholderExceptionSupport.java
  1. … 2 more files in changeset.
Add support for serialization of suppressed exceptions

This change serializes the Java 7+ suppressed exceptions similarly

to exception causes. This means that we would try to deserialize

known exceptions and if it's not possible, for example because the

suppressed exception is a custom exception type, then we fallback

on the placeholder exception type.

    • -32
    • +0
    ./internal/serialize/CausePlaceholder.java
  1. … 3 more files in changeset.
Add support for serialization of suppressed exceptions

This change serializes the Java 7+ suppressed exceptions similarly

to exception causes. This means that we would try to deserialize

known exceptions and if it's not possible, for example because the

suppressed exception is a custom exception type, then we fallback

on the placeholder exception type.

    • -32
    • +0
    ./internal/serialize/CausePlaceholder.java
    • -0
    • +43
    ./internal/serialize/NestedExceptionPlaceholder.java
  1. … 3 more files in changeset.
Add support for serialization of suppressed exceptions

This change serializes the Java 7+ suppressed exceptions similarly

to exception causes. This means that we would try to deserialize

known exceptions and if it's not possible, for example because the

suppressed exception is a custom exception type, then we fallback

on the placeholder exception type.

    • -32
    • +0
    ./internal/serialize/CausePlaceholder.java
    • -0
    • +43
    ./internal/serialize/NestedExceptionPlaceholder.java
  1. … 3 more files in changeset.
Handle potential failure in `getMessage`

  1. … 1 more file in changeset.
Handle potential failure in `getMessage`

  1. … 1 more file in changeset.
Add support for "useful NPE messages"

This commit adds special handling of null pointer exceptions

in case the current process is running on Java 14+. Without

this hack, the "improved NullPointerException messages" are

not serialized. As a consequence, the daemon cannot display

them, despite being generated on the worker.

  1. … 1 more file in changeset.
Add support for "useful NPE messages"

This commit adds special handling of null pointer exceptions

in case the current process is running on Java 14+. Without

this hack, the "improved NullPointerException messages" are

not serialized. As a consequence, the daemon cannot display

them, despite being generated on the worker.

  1. … 1 more file in changeset.
Add support for "useful NPE messages"

This commit adds special handling of null pointer exceptions

in case the current process is running on Java 14+. Without

this hack, the "improved NullPointerException messages" are

not serialized. As a consequence, the daemon cannot display

them, despite being generated on the worker.

  1. … 1 more file in changeset.
Add support for "useful NPE messages"

This commit adds special handling of null pointer exceptions

in case the current process is running on Java 14+. Without

this hack, the "improved NullPointerException messages" are

not serialized. As a consequence, the daemon cannot display

them, despite being generated on the worker.

  1. … 1 more file in changeset.
Detect special multicause exceptions

This commit fixes an issue where test reports and build scans didn't capture

all the causes of an exception, in case the "multi-cause" exception isn't

a type known of the daemon. By that, we mean a type which is not available

at runtime in the daemon process, but is used in the worker process.

Typically, the `org.opentest4j.MultipleFailuresError` type used by

JUnit is such an example: the type is used in a test process, but

not loaded in Gradle. In such cases, Gradle builds a placeholder

exception type which collects the root cause. But in case the

exception is actually collecting multiple causes like in this test

class, Gradle lost some information in the process.

Therefore, this commit introduces a heuristic to figure out if an

exception is collecting multiple causes instead of a single one.

The heuristic is kept very simple: one has to find a method which

name is either `getCauses` (like for Gradle's own default multi

cause exception) or `getFailures` (like in opentest4j), and it

has to return a collection of failures.

This will not fix all problems but it should capture a good amount

of them.

Fixes #9487

  1. … 3 more files in changeset.
Detect special multicause exceptions

This commit fixes an issue where test reports and build scans didn't capture

all the causes of an exception, in case the "multi-cause" exception isn't

a type known of the daemon. By that, we mean a type which is not available

at runtime in the daemon process, but is used in the worker process.

Typically, the `org.opentest4j.MultipleFailuresError` type used by

JUnit is such an example: the type is used in a test process, but

not loaded in Gradle. In such cases, Gradle builds a placeholder

exception type which collects the root cause. But in case the

exception is actually collecting multiple causes like in this test

class, Gradle lost some information in the process.

Therefore, this commit introduces a heuristic to figure out if an

exception is collecting multiple causes instead of a single one.

The heuristic is kept very simple: one has to find a method which

name is either `getCauses` (like for Gradle's own default multi

cause exception) or `getFailures` (like in opentest4j), and it

has to return a collection of failures.

This will not fix all problems but it should capture a good amount

of them.

Fixes #9487

  1. … 3 more files in changeset.
Check daemon reuse between CLI and TAPI

  1. … 1 more file in changeset.
Check daemon reuse between CLI and TAPI

  1. … 1 more file in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 12 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 12 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 12 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 12 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 12 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Introduce internal `@EventScope` annotation to attach to listener interfaces to declare which scope their events are generated in.

Add some validation to `ListenerManager` to verify that each listener interface is annotated with the correct scope.

    • -5
    • +21
    ./internal/event/DefaultListenerManager.java
  1. … 61 more files in changeset.
Annotate internal APIs used by test-distribution (#13010)

In order to avoid accidentally changing an internal API without

adjusting the test-distribution plugin, they are now annotated with

`@UsedByScanPlugin("test-distribution")`.

  1. … 30 more files in changeset.
Annotate internal APIs used by test-distribution

In order to avoid accidentally changing an internal API without

adjusting the test-distribution plugin, they are now annotated with

`@UsedByScanPlugin("test-distribution")`.

  1. … 30 more files in changeset.
Address compiler warnings in 'messaging' subproject

    • -4
    • +5
    ./internal/event/BroadcastDispatch.java
    • -3
    • +3
    ./internal/event/DefaultListenerManager.java
    • -1
    • +1
    ./internal/serialize/MapSerializer.java
    • -1
    • +1
    ./internal/serialize/SetSerializer.java
Address compiler warnings in 'messaging' subproject

    • -4
    • +5
    ./internal/event/BroadcastDispatch.java
    • -3
    • +3
    ./internal/event/DefaultListenerManager.java
    • -1
    • +1
    ./internal/serialize/MapSerializer.java
    • -1
    • +1
    ./internal/serialize/SetSerializer.java