WorldEdit

WorldEdit

42M Downloads

org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.jvm.toolchain.internal.DefaultToolchainSpec.

mk-pmb opened this issue · 5 comments

commented

WorldEdit Version

7.2.15 (commit 5ca4dff)

Platform Version

Fabric / GitHub Actions

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

I'm trying to build worldedit-fabric on GitHub Actions but it fails. I searched the logs for at in an attempt to find the actual initial error, which seems to be

org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.jvm.toolchain.internal.DefaultToolchainSpec.

The final error reported is

* What went wrong:
Could not determine the dependencies of task ':worldedit-forge:shadowJar'.
> Could not resolve all dependencies for configuration ':worldedit-forge:runtimeClasspath'.
   > Could not find net.minecraftforge:forge:1.20-46.0.1_mapped_official_1.20_at_4e53f9916095a9394a77b31b951372a951c4d22f.
     Searched in the following locations:
       - file:/home/runner/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.20-46.0.1_mapped_official_1.20_at_4e53f9916095a9394a77b31b951372a951c4d22f/forge-1.20-46.0.1_mapped_official_1.20_at_4e53f9916095a9394a77b31b951372a951c4d22f.pom
       - file:/home/runner/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.20-46.0.1_mapped_official_1.20_at_4e53f9916095a9394a77b31b951372a951c4d22f/forge-1.20-46.0.1_mapped_official_1.20_at_4e53f9916095a9394a77b31b951372a951c4d22f.jar
     Required by:
         project :worldedit-forge

Expected Behavior

gradlew exits with status code 0 and has produced JAR files.

Reproduction Steps

  1. Somewhere on GitHub, create a branch that triggers a GitHub Actions workflow to setup gradle, clone the WE repo and run ./gradlew build --stacktrace --info --scan. Since the gradle stuff is usually very similar for lots of Minecraft mods, my branch delegates the actual workflow implementation to a template I wrote.
  2. Wait for the GitHub Actions runner to do its thing.
  3. Navigate to the failed build step.
  4. In the upper right corner of the build progress report, click the cogwheel icon and select "View raw logs".
  5. Search for at to find the first error message, or search for What went wrong: to find the final error message.

Anything Else?

The lines above the initial error look like the problem is in the Forge part:

Downloading net.minecraftforge:ForgeAutoRenamingTool:1.0.1:all
Downloading net.minecraftforge:forgeflower:2.0.629.0
Setting up MCP environment
Initializing steps
 > […]
Executing steps
 > Running 'downloadManifest'
 > Running 'downloadJson'
 > Running 'downloadClient'
 > Running 'downloadServer'
 > Running 'extractServer'

and the final error message seems to corroborate it.
So if it's possible to compile only the Fabric parts, that would be a good-enough workaround for me.

commented

I don't think this has anything to do with us. I assume it's a temporary failure of ForgeGradle. If it persists, it would be something to report to them AFAIK.

commented

Additionally, for reference, we do run our own Actions and they've been working fine: https://github.com/EngineHub/WorldEdit/actions/workflows/gradle.yml

commented

I assume it's a temporary failure of ForgeGradle.

Which would be one more reason to try compiling only the Fabric part. Do you know if that's possible?

commented

Dropping it and the -mod project from settings.gradle.kts should suffice.

commented

It worked. Thanks!