Skip to content

Gradle exception should come after rewrite output on GitHub actions #230

@koppor

Description

@koppor

The RuntimeException is put inbetween the output in GitHub actions making it unreadable.

Maybe a flush helps?

Running on GitHub CI

image

These recipes would make changes to src/main/java/org/jabref/cli/JournalListMvGenerator.java:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rewriteDryRun'.
> java.lang.RuntimeException: Applying recipes would make changes. See logs for more details.

* Try:
    org.jabref.config.rewrite.cleanup
> Run with --stacktrace option to get the stack trace.
        org.openrewrite.staticanalysis.EqualsAvoidsNull
> Run with --info or --debug option to get more log output.
Report available:
> Run with --scan to get full insights.
    /home/runner/work/jabref/jabref/build/reports/rewrite/rewrite.patch
> Get more help at https://help.gradle.org./
Run 'gradle rewriteRun' to apply the recipes.


BUILD FAILED in 1m 34s
> Task :rewriteDryRun FAILED

Running on command line

$ ./gradlew -s rewriteDryRun
These recipes would make changes to src\main\java\org\jabref\cli\JournalListMvGenerator.java:
    org.jabref.config.rewrite.cleanup
        org.openrewrite.staticanalysis.EqualsAvoidsNull
Report available:
    C:\git-repositories\jabref\build\reports\rewrite\rewrite.patch
Run 'gradle rewriteRun' to apply the recipes.

> Task :rewriteDryRun FAILED

FAILURE: Build failed with an exception.

What version of OpenRewrite are you using?

(Not quite sure, it is hard to determine - see #199)

I am using

  • OpenRewrite ?
  • Maven/Gradle plugin id 'org.openrewrite.rewrite' version '6.3.3'
  • rewrite-module v1.
    rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.2.1"))
    rewrite("org.openrewrite.recipe:rewrite-static-analysis")
    rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
    rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
    rewrite("org.openrewrite.recipe:rewrite-migrate-java")

How are you running OpenRewrite?

./gradlew rewriteDryRun

Commit at JabRef/jabref@a11cb9d (#10347)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions