PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

paper fork: Implicit dependencies error when running the following tasks: `createMojmapPaperclipJar`, `createReobfPaperclipJar`, `createReobfBundlerJar`

granny opened this issue · comments

Expected behavior

Updating to v1.5.6 and running createMojmapPaperclipJar, createReobfPaperclipJar or createReobfBundlerJar successfully builds a runnable jar.

Observed/Actual behavior

Updating to v1.5.6 and running createMojmapPaperclipJar, createReobfPaperclipJar or createReobfBundlerJar will throw an Implicit dependency exception, making the build fail.

Steps/models to reproduce

  1. clone https://github.com/granny/paperweight-examples/tree/experiment
  2. run ./gradlew applyPatches
  3. run one of the following tasks: ./gradlew createMojmapPaperclipJar ./gradlew createReobfPaperclipJar, ./gradlew createReobfBundlerJar
  4. profit

Stacktrace

With 0002-Move-Log4j-plugins-back-into-main-sourceset.patch

Executing 'createReobfPaperclipJar' Output
10:20:00 PM: Executing 'createReobfPaperclipJar'...

> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileJava FAILED
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 2 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 3s
10:20:04 PM: Execution finished 'createReobfPaperclipJar'.
Executing 'createReobfBundlerJar' Output
10:50:36 PM: Executing 'createReobfBundlerJar'...

> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileJava FAILED
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 2 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 3s
10:50:39 PM: Execution finished 'createReobfBundlerJar'.
Executing 'createMojmapPaperclipJar' Output
10:50:21 PM: Executing 'createMojmapPaperclipJar'...

> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileJava FAILED
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 2 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 2s
10:50:24 PM: Execution finished 'createMojmapPaperclipJar'.
Executing 'createMojmapBundlerJar' Output
10:49:57 PM: Executing 'createMojmapBundlerJar'...

> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileJava UP-TO-DATE
> Task :forktest-server:classes UP-TO-DATE
> Task :forktest-server:shadowJar UP-TO-DATE
> Task :createMojmapBundlerJar UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 2s
7 actionable tasks: 7 up-to-date
10:50:00 PM: Execution finished 'createMojmapBundlerJar'.

Without 0002-Move-Log4j-plugins-back-into-main-sourceset.patch

Executing 'createReobfPaperclipJar' Output
10:28:10 PM: Executing 'createReobfPaperclipJar'...

> Task :forktest-server:processLog4jPluginsResources NO-SOURCE
> Task :forktest-server:processResources
> Task :forktest-api:compileJava FROM-CACHE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile
> Task :forktest-server:compileLog4jPluginsJava FAILED
> Task :forktest-api:jar
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 5 executed, 1 from cache

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileLog4jPluginsJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileLog4jPluginsJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileLog4jPluginsJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 3s
10:28:13 PM: Execution finished 'createReobfPaperclipJar'.
Executing 'createReobfBundlerJar' Output
10:47:04 PM: Executing 'createReobfBundlerJar'...

> Task :forktest-server:processLog4jPluginsResources NO-SOURCE
> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileLog4jPluginsJava FAILED
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 2 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileLog4jPluginsJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileLog4jPluginsJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileLog4jPluginsJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 2s
10:47:07 PM: Execution finished 'createReobfBundlerJar'.
Executing 'createMojmapPaperclipJar' Output
10:46:39 PM: Executing 'createMojmapPaperclipJar'...

> Task :forktest-server:processLog4jPluginsResources NO-SOURCE
> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileLog4jPluginsJava FAILED
> Task :clonePaperRepo

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
6 actionable tasks: 2 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':forktest-server:compileLog4jPluginsJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: '/home/granny/github/granny/paperweight-examples/.gradle/caches/paperweight/upstreams/paper/.gradle/caches/paperweight/taskCache/minecraft.jar'.
    
    Reason: Task ':forktest-server:compileLog4jPluginsJava' uses this output of task ':clonePaperRepo' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':clonePaperRepo' as an input of ':forktest-server:compileLog4jPluginsJava'.
      2. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':clonePaperRepo' from ':forktest-server:compileLog4jPluginsJava' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 2s
10:46:43 PM: Execution finished 'createMojmapPaperclipJar'.
Executing 'createMojmapBundlerJar' Output
10:45:07 PM: Executing 'createMojmapBundlerJar'...

> Task :forktest-server:processLog4jPluginsResources NO-SOURCE
> Task :forktest-server:processResources UP-TO-DATE
> Task :forktest-api:compileJava UP-TO-DATE
> Task :forktest-api:processResources NO-SOURCE
> Task :forktest-api:classes UP-TO-DATE
> Task :forktest-api:generateApiVersioningFile UP-TO-DATE
> Task :forktest-api:jar UP-TO-DATE
> Task :forktest-server:compileLog4jPluginsJava UP-TO-DATE
> Task :forktest-server:log4jPluginsClasses UP-TO-DATE
> Task :forktest-server:compileJava UP-TO-DATE
> Task :forktest-server:classes UP-TO-DATE
> Task :forktest-server:shadowJar UP-TO-DATE
> Task :createMojmapBundlerJar UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1s
8 actionable tasks: 8 up-to-date
10:45:08 PM: Execution finished 'createMojmapBundlerJar'.

(Same, and when force-adding the supposedly missing dependencies it says the upstream data file does not exist. Skipping the patch was the only way I got it working)

@MartijnMuijsers what patch did you skip? The temporarily solution I settled with is to stay on v1.5.5 and revert the paper commit that uses a function added in v1.5.6

https://github.com/PurpurMC/Purpur/blob/b0a7353a701d864b98296f9ccee79d39008860c4/patches/server/0308-temporarily-revert-PaperMC-Paper-eb60bff.patch

@granny Sorry that's what I meant, I meant skip as in effectively, due to your revert patch.