fabric-loom icon indicating copy to clipboard operation
fabric-loom copied to clipboard

Execution optimizations have been disabled for task `genSources`

Open axieum opened this issue 2 years ago • 3 comments

You can find the source of this project, I ran genSources on the main project - @axieum/minecord

06:07:21 pm: Executing task 'genSources'...

Starting Gradle Daemon...
Gradle Daemon started in 8 s 749 ms

> Configure project :
Fabric Loom: 0.8.21
Fabric Loom: 0.8.21
Fabric Loom: 0.8.21

> Task :unpickJar
> Task :genSources
> Task :minecord-api:unpickJar

> Task :minecord-api:genSources
Execution optimizations have been disabled for task ':minecord-api:genSources' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'C:\Users\username\.gradle\caches\fabric-loom\1.17.1-mapped-net.fabricmc.yarn-1.17.1+build.25-v2\minecraft-1.17.1-unpicked-net.fabricmc.yarn-1.17.1+build.25-v2.jar'. Reason: Task ':minecord-api:genSources' uses this output of task ':unpickJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :minecord-chat:unpickJar

> Task :minecord-chat:genSources
Execution optimizations have been disabled for task ':minecord-chat:genSources' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'C:\Users\username\.gradle\caches\fabric-loom\1.17.1-mapped-net.fabricmc.yarn-1.17.1+build.25-v2\minecraft-1.17.1-unpicked-net.fabricmc.yarn-1.17.1+build.25-v2.jar'. Reason: Task ':minecord-chat:genSources' uses this output of task ':minecord-api:unpickJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'C:\Users\username\.gradle\caches\fabric-loom\1.17.1-mapped-net.fabricmc.yarn-1.17.1+build.25-v2\minecraft-1.17.1-unpicked-net.fabricmc.yarn-1.17.1+build.25-v2.jar'. Reason: Task ':minecord-chat:genSources' uses this output of task ':unpickJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

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

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

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 6m 18s
6 actionable tasks: 6 executed
06:13:42 pm: Task execution finished 'genSources'.

axieum avatar Aug 01 '21 09:08 axieum

This happens because Gradle thinks (incorrectly, really) that subprojects' genSources tasks cross-depend on unpickJar from other projects since they touch the same file.

In your case (assuming you have the same mappings/AWs for each subproject), you can fix this by only running genSources in just the root project or one subproject.

Juuxel avatar Aug 01 '21 10:08 Juuxel

I mentioned in the issue that I ran genSources only from the root project, it just cascades to all subprojects.

axieum avatar Aug 01 '21 13:08 axieum

No, if you do gradlew genSources it does it in all projects where it's found. gradlew :genSources with a colon would be the root project's. (Tasks won't cascade unless you don't specify the project path like : or :mySubproj:)

Juuxel avatar Aug 01 '21 13:08 Juuxel

unpickJar task was removed, likely fixing this issue.

modmuss50 avatar Mar 19 '24 22:03 modmuss50