tiny-remapper
tiny-remapper copied to clipboard
Concurrency issue with ZipFileSystemProvider.newFileSystem
ZipFileSystemProvider
can only provide one FileSystem
instance per URI. I'm getting a FileSystemAlreadyExistsException
when building a mod in CircleCI. Here's a sample log: https://pastebin.com/5MjxLqfd
It is tbd whether this should be changed in tiny-remapper. Right now it assumes none of the inputs were opened elsewhere and cleans up after itself. The global state of FileSystems is unfortunate, especially once someone closes them...
Interesting, so are you saying something else in the FabricMC stack opened the file or something outside entirely? This build was in CI so I'd assume only something within the FabricMC stack could be the culprit.
Yes it's most certainly a (known) issue in Loom (Fabric's gradle plugin), it doesn't reliably close files and is being reworked.
Cool, is there an open issue there I can subscribe to? Took a cursory look and didn't see one.
On Tue, Mar 26, 2019 at 19:31 Player [email protected] wrote:
Yes it's most certainly a (known) issue in Loom (Fabric's gradle plugin), it doesn't reliably close files and is being reworked.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FabricMC/tiny-remapper/issues/7#issuecomment-476941284, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQlpVJvv0EYCqgJz8kK1zmlT_Y_eWhPks5vatgHgaJpZM4cKuyV .
If you can find a way to re-produce it, that would help a lot, especially if its on a local system. I fixed most of the locked file issues, and I know of one that is still around. But that last one only affects gen sources.
As your issue seems a little different from what ive seen in the either make a new issue, or add to the following.
https://github.com/FabricMC/fabric-loom/issues/45
Thanks.
I am going to leave a comment on this as well. I am working on using Gradle transformers within loom to remap dependencies from one mapping into a next. This internally uses an instance of TinyRemapper as a library and by design Gradle executes all transformers in parallel. This of course immediately causes issues with the fact that ZipFileSystems of the same URI return the same instance and causes them to already be closed when the system processes them.
The link to the Loom PR: https://github.com/FabricMC/fabric-loom/pull/156 Currently still working on improving the implementation but I would need this to be fixed eventually. Possibly a synchronization needs to occur on all read methods to prevent this from happening.
This can be closed with https://github.com/FabricMC/tiny-remapper/commit/8f65b51ec7f2a8431764dc4e841e388c672ff034 @sfPlayer1