Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradlew build --fail-fast fails #24523

Open
axelfontaine opened this issue Mar 27, 2023 · 5 comments
Open

gradlew build --fail-fast fails #24523

axelfontaine opened this issue Mar 27, 2023 · 5 comments
Labels
a:feature A new functionality in:invoking-gradle Running Executing in:testing in:writing-tasks task option

Comments

@axelfontaine
Copy link

Expected Behavior

gradlew build --fail-fast runs the build and fails fast on first broken test

Current Behavior

> Unknown command-line option '--fail-fast'

Note that gradlew test --fail-fast works

Context

I wanted to speed up broken CI runs and added this to Github Action's yml file

Steps to Reproduce

Try the command above on a Kotlin project

Your Environment

Gradle 8.0.2

@ov7a
Copy link
Member

ov7a commented Mar 30, 2023

Right now you can do this via providing all the needed tasks with their configuration options in a command line like this:

gradle build test --fail-fast

But if you have have other tests tasks, you should provide them in a command line as well. Do you want Gradle to support --fail-fast globally?

@axelfontaine
Copy link
Author

In the docs there is zero indication that --fail-fast can only be used when explicitly invoking a test task.

So either the docs must be fixed or the behavior must be changed to allow this globally.

@ov7a
Copy link
Member

ov7a commented Mar 30, 2023

--fail-fast is a test task option, but you are right, the docs can be improved.

Would you benefit from having a global setting or you are ok with current behavior?

@axelfontaine
Copy link
Author

In my case a global setting would be better as I could then simply invoke gradle build --fail-fastin CI and have all tasks execute in the usual order.

@ov7a
Copy link
Member

ov7a commented Apr 3, 2023

Thank you for your interest in Gradle!

This feature request is in the backlog of the relevant team but this area of Gradle is currently not a focus one so it might take a while before it gets implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:invoking-gradle Running Executing in:testing in:writing-tasks task option
Projects
None yet
Development

No branches or pull requests

3 participants