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

Running included build task with --rerun fails #28666

Closed
blindpirate opened this issue Apr 3, 2024 · 1 comment
Closed

Running included build task with --rerun fails #28666

blindpirate opened this issue Apr 3, 2024 · 1 comment
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue

Comments

@blindpirate
Copy link
Collaborator

blindpirate commented Apr 3, 2024

Current Behavior

If an included composite build is used as a plugin in root build, running <includedBuildTaskName> --rerun fails with

Cannot call TaskOutputs.upToDateWhen(Spec) on task ':build-logic:compileJava' after task has started execution.

See the reproducer below.

Expected Behavior

No failure.

Context (optional)

In short, --rerun configures the tasks in root project configuration phase, but because we requires the included build-logic as plugin, :build-logic:compileJava tasks finishes before the root project configuration phase - so we're trying to configure a task that already finishes execution.

Steps to Reproduce

issue-4163.zip

$ ./gradlew build-logic:compileJava --rerun

FAILURE: Build failed with an exception.

* What went wrong:
Cannot call TaskOutputs.upToDateWhen(Spec) on task ':build-logic:compileJava' after task has started execution.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 384ms
5 actionable tasks: 1 executed, 4 up-to-date

Gradle version

8.8

Build scan URL (optional)

No response

Your Environment (optional)

No response

@ov7a
Copy link
Member

ov7a commented Apr 4, 2024

This issue will be closed as a duplicate of

Please add your use case and 👍 to that issue.

If you think our analysis is wrong, please provide us with more detailed information explaining why.

@ov7a ov7a closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@ov7a ov7a added closed:duplicate Duplicated or superseeded by another issue and removed to-triage labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue
Projects
None yet
Development

No branches or pull requests

2 participants