You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a project which applies the userdev plugin in multiple sub-projects. However, attempting to build this project causes errors due to trying to use corrupted library jars.
> Task :forge:neoFormRename FAILED
Exception in thread "main" java.lang.RuntimeException: Could not add library: /home/squid/.gradle/caches/minecraft/libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar
at net.minecraftforge.fart.internal.ClassProviderBuilderImpl.addLibrary(ClassProviderBuilderImpl.java:56)
at net.minecraftforge.fart.internal.RenamerImpl.lambda$setup$0(RenamerImpl.java:64)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at net.minecraftforge.fart.internal.RenamerImpl.setup(RenamerImpl.java:64)
at net.minecraftforge.fart.internal.RenamerImpl.run(RenamerImpl.java:72)
at net.minecraftforge.fart.Main.main(Main.java:159)
Caused by: java.util.zip.ZipException: zip END header not found
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.findEND(ZipFileSystem.java:1320)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1534)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:179)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:125)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:120)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:528)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:400)
at net.minecraftforge.fart.internal.ClassProviderBuilderImpl.addLibrary(ClassProviderBuilderImpl.java:38)
... 5 more
From what I can tell, the neoFormListLibraries task from one project runs in parallel with neoFormRename in another, causing the latter to read corrupt partially-downloaded jars.
I think there's several things which should be done to avoid this:
Download the files to a temporary location, and then move them to the directory once downloading has finished, to avoid partial downloads.
Only download the file if it is missing and the checksum is mismatched.
I'm happy to put a PR together for this if that would be useful?
The text was updated successfully, but these errors were encountered:
There is a service that needs to be injected into the tasks or basically anything that uses the libraries.
Which brings up another complicated problem: decompile also uses that list and could run in parallel with lid libraries. We really need to get rid of the generic execute.
I've a project which applies the userdev plugin in multiple sub-projects. However, attempting to build this project causes errors due to trying to use corrupted library jars.
From what I can tell, the
neoFormListLibraries
task from one project runs in parallel withneoFormRename
in another, causing the latter to read corrupt partially-downloaded jars.I think there's several things which should be done to avoid this:
I'm happy to put a PR together for this if that would be useful?
The text was updated successfully, but these errors were encountered: