QuiltMC / quilt-loader

The loader for Quilt mods.
Apache License 2.0
472 stars 87 forks source link

Quilt's Filesystems should be threadsafe #382

Closed AlexIIL closed 11 months ago

AlexIIL commented 1 year ago

As otherwise we get errors like this:

Caused by: java.lang.RuntimeException: java.io.IOException: Cannot replace existing entry /buildcraft org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry$QuiltUnifiedFolderWriteable with /buildcraft org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry$QuiltUnifiedFolderWriteable
    at org.duvetmc.mods.rgmlquilt.util.Remap.lambda$remap$5(Remap.java:168)
    at net.fabricmc.tinyremapper.TinyRemapper.lambda$apply$4(TinyRemapper.java:889)
    at net.fabricmc.tinyremapper.TinyRemapper.lambda$apply$5(TinyRemapper.java:905)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Cannot replace existing entry /buildcraft org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry$QuiltUnifiedFolderWriteable with /buildcraft org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry$QuiltUnifiedFolderWriteable
    at org.quiltmc.loader.impl.filesystem.QuiltMapFileSystem.addEntryWithoutParents0(QuiltMapFileSystem.java:234)
    at org.quiltmc.loader.impl.filesystem.QuiltMapFileSystem.addEntryRequiringParents0(QuiltMapFileSystem.java:171)
    at org.quiltmc.loader.impl.filesystem.QuiltMapFileSystem.addEntryRequiringParent(QuiltMapFileSystem.java:150)
    at org.quiltmc.loader.impl.filesystem.QuiltMapFileSystemProvider.createDirectory(QuiltMapFileSystemProvider.java:366)
    at java.nio.file.Files.createDirectory(Files.java:674)
    at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
    at java.nio.file.Files.createDirectories(Files.java:767)
    at org.duvetmc.mods.rgmlquilt.util.Remap.lambda$remap$5(Remap.java:157)
    ... 7 more
AlexIIL commented 11 months ago

Fixed in 0.22.0