Pokechu22 / WorldDownloader

Makes a copy of parts of a multiplayer world for singleplayer use (EG, for backups or renders)
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/2520465-world-downloader-mod-create-backups-of-your-builds
Other
572 stars 135 forks source link

:1.15.2:processBasePatches fails to build #190

Open RaKXeR opened 4 years ago

RaKXeR commented 4 years ago

While running gradlew setupDecompWorkspace build (After building begradle), I get the following error:


Setting up MCP environment Initializing steps Executing steps

Running 'downloadManifest' Running 'downloadJson' Running 'downloadClient' Running 'strip' Running 'rename' Running 'mcinject' Running 'listLibraries' Running 'decompile' Running 'inject' Running 'patch' Hunk #1 Failed: Cannot find hunk target MCP environment setup is complete Error getting artifact: net.minecraft:client:1.15.2-custom-3135772e181398b7_mapped_snapshot_20200826-1.15.1:sources@jar from MinecraftUserRepo java.io.FileNotFoundException: Source 'C:\Users\RaKXeR\.gradle\caches\forge_gradle\minecraft_user_repo\mcp\1.15.2-custom-3135772e181398b7\client\patch\output.jar' does not exist at org.apache.commons.io.FileUtils.checkFileRequirements(FileUtils.java:1383) at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1060) at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1028) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findDecomp(MinecraftUserRepo.java:987) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findPatched(MinecraftUserRepo.java:996) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findSource(MinecraftUserRepo.java:1105) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findFile(MinecraftUserRepo.java:410) at net.minecraftforge.gradle.common.util.BaseRepo.getArtifact(BaseRepo.java:81) at net.minecraftforge.gradle.common.util.BaseRepo.getArtifact(BaseRepo.java:41) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.lambda$getArtifact$0(BaseRepo.java:127) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.getArtifact(BaseRepo.java:127) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.getArtifact(BaseRepo.java:124) at com.amadornes.artifactural.base.repository.ArtifactProviderBuilder$Complete.getArtifact(ArtifactProviderBuilder.java:92) at com.amadornes.artifactural.base.repository.SimpleRepository.getArtifact(SimpleRepository.java:41) at com.amadornes.artifactural.gradle.GradleRepositoryAdapter.getArtifact(GradleRepositoryAdapter.java:334) at net.minecraftforge.gradle.common.util.MavenArtifactDownloader._generate(MavenArtifactDownloader.java:136) at net.minecraftforge.gradle.common.util.MavenArtifactDownloader._download(MavenArtifactDownloader.java:115) at net.minecraftforge.gradle.common.util.MavenArtifactDownloader.generate(MavenArtifactDownloader.java:83) at pokechu22.test.begradle.baseedit.BaseEditPlugin.getMcSourcesJar(BaseEditPlugin.java:219) at pokechu22.test.begradle.baseedit.BaseEditPlugin.lambda$injectSourceSet$5(BaseEditPlugin.java:180) at org.gradle.internal.ImmutableActionSet$SetWithManyActions.execute(ImmutableActionSet.java:327) at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:232) at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:226) at org.gradle.api.internal.DefaultNamedDomainObjectCollection.add(DefaultNamedDomainObjectCollection.java:110) at org.gradle.api.internal.tasks.DefaultTaskContainer.access$2200(DefaultTaskContainer.java:69) at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider$1.run(DefaultTaskContainer.java:616) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.getOrNull(DefaultTaskContainer.java:603) at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.getOrNull(DefaultTaskContainer.java:568) at org.gradle.api.internal.DefaultNamedDomainObjectCollection.findByName(DefaultNamedDomainObjectCollection.java:272) at org.gradle.api.internal.tasks.DefaultTaskContainer.findByName(DefaultTaskContainer.java:495) at org.gradle.api.internal.tasks.DefaultTaskContainer.findByPath(DefaultTaskContainer.java:391) at org.gradle.api.internal.tasks.DefaultTaskContainer.getByPath(DefaultTaskContainer.java:412) at org.gradle.api.internal.tasks.DefaultTaskContainer.resolveTask(DefaultTaskContainer.java:408) at org.gradle.api.internal.tasks.DefaultTaskDependency.visitDependencies(DefaultTaskDependency.java:128) at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:96) at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:211) at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:121) at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:73) at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:64) at org.gradle.execution.taskgraph.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:46) at org.gradle.execution.taskgraph.LocalTaskInfo.getDependencies(LocalTaskInfo.java:89) at org.gradle.execution.taskgraph.LocalTaskInfo.resolveDependencies(LocalTaskInfo.java:62) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.addToTaskGraph(DefaultTaskExecutionPlan.java:167) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.addTasks(DefaultTaskExecutionGraph.java:122) at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:47) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25) at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54) at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:44) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25) at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54) at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:47) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(DefaultBuildConfigurationActionExecuter.java:36) at org.gradle.initialization.DefaultGradleLauncher$CalculateTaskGraph.run(DefaultGradleLauncher.java:297) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.initialization.DefaultGradleLauncher.constructTaskGraph(DefaultGradleLauncher.java:187) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142) at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:121) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:77) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:74) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:96) at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:74) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:43) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:74) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:50) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:748)

FAILURE: Build failed with an exception.

I don't really understand what's going on, I checked and the file they say is missing is actually there, but earlier in the log it says Hunk #1 Failed: Cannot find hunk target, no idea what a hunk is. Lots of people seem to have had hunk target issues with ForgeGradle overtime, but since your project uses BEGradle I have no idea how I could even look into something like that. Any ideas?

RaKXeR commented 4 years ago

OK I don't understand what happened once again, but it seems to work now.

After trying a bunch of things, and checking the directory again, the output.jar was indeed missing. I copied the one from 1.15.1 to the 1.15.2 and it compiled. I found it weird so I deleted the 1.15.2 cache folder and ran it again. the folder wasn't recreated but the build was still successful. So yeah, I don't know what was broken or how it was fixed but somehow it is...

Pokechu22 commented 4 years ago

That is pretty odd... one thing to note is that processBasePatches doesn't directly depend on that jar, but instead on a jar that's created from that jar later on. Once it creates the final jar, it doesn't need the patch jar. (I think it might actually delete the patch jar after completing everything that it depends on). Note that the patch jar is actually part of regular ForgeGradle (containing Minecraft code with compile errors fixed), though processBasePatches is part of BEGradle (dealing with src/main/base stuff).

The Hunk #1 Failed: Cannot find hunk target message refers to it attempting to apply the patch (a hunk is one section of code changed in a patch, marked by the @@@ bits); by its position that's likely related to the ForgeGradle patch jar not being generated. You'd need to run with --info to get more details on which one failed, though (and it's probably not going to happen consistently). BEGradle may still be at fault, though, since I make changes to the list of patches itself (due to some multi-version compatibility stuff breaking existing patches).

I've pushed a mapping update just now (no actual code changes from it, but I like to keep up-to-date and it requires going through some of the FG setup process again), so try building again and see if it builds successfully.

RaKXeR commented 4 years ago

Thanks for the reply. As I mentioned after working once it seems to work flawlessly now, and I spent 5h trying to fix this ghost issue today, so I think I'll call it there xD. While trying to fix things I restarted my pc, that may have been involved (maybe some file had been locked for some reason).

The reason I was doing this in the first place was because I was having some issues with villagers like as was reported for 1.16, but it was on 1.15. Clearly I didn't try enough times because the 2nd time I tried saving the world the villagers were saved properly. Oh well... honestly I haven't looked at mod making since 2013 but this mod of yours is really impressive for me. Being able to support all of these versions together like this + the amount of features you have... awesome stuff! Thanks for making this mod happen.

Tsoccerguy3 commented 4 years ago

This may be related , Poke , I wont open a separate issue . Here is the Gradle build log . I pulled the updates September 28 2020 . It wont build wdl gradle log.zip

Pokechu22 commented 4 years ago

That looks like it might be this same issue; can you try running gradlew build --info so that I can see which patch file is failing?

Tsoccerguy3 commented 4 years ago

wdl gradle log2.zip

here is a fresh log

Pokechu22 commented 4 years ago

OK, huh, this does seem to be an issue. For version compatibility, I rename Vec3d to Vector3d, which interferes with a patch to Particle (which fixes some kind of decompile error with NaN in the development environment). That patch exists in 1.14.3 and 1.14.4, and I have my own tweaked version of it. It looks like a 1.15.2 version of it was also added later on (MinecraftForge/MCPConfig@bf75bfb48d96a3e49f1dd4c31d5166703a05ac52) a few months after 1.15.2 was added. I guess I've been using the older version locally (and ForgeGradle didn't redownload it), while other people have been getting the new version with that patch.

I've added a replacement patch for that to 1.15.2, so this should be fixed now.

Tsoccerguy3 commented 4 years ago

it compililed up to 1.12.2 . 1.13 and beyond failed the tests . trying again with , gradlew setupdecompworkspace build -x test

wdl log 3.zip

Tsoccerguy3 commented 4 years ago

gradlew setupdecompworkspace build -x test , compile completed .

Pokechu22 commented 4 years ago

Based on those logs, the 1.13 base patches weren't applied (I don't see processBasePatches for 1.13 in it). The tests caught that, but if you actually tried to run the 1.13 build with the skipped tests it wouldn't work since the missing base changes wouldn't load the mod.

Specifically it seems that the various compilation tasks didn't depend on processBasePatches in 1.13.0, 1.13.1, 1.13.2, and 1.14.0. 1.14.0 was related to some kind of vanilla recompilation bug (now fixed) that always running processBasePatches made worse, and I guess the 1.13 versions had the same issue since I based it on the 1.14.0 build file. That should now be fixed.

I probably didn't run into that issue myself since I often manually run generateBasePatches and applyBasePatches after updating mapping versions, so 1.13.x and 1.14.0 would already have the patched code when I did a normal build.

Tsoccerguy3 commented 4 years ago

compile is fixed