Try to use fabric loom in Termux Android but something could not be downloaded #3659
-
DescriptionI was trying build something with fabric-loom 1.5.8 but it failed in there: https://github.com/FabricMC/fabric-loom/blame/713e1ff268df3b3ff1f5963f9bc3ac7b221e7666/src/main/java/net/fabricmc/loom/util/download/Download.java#L284 try {
// Once the file has been fully read, create a hard link to the destination file.
// And then remove the temporary file, this ensures that the output file only exists in fully populated state.
Files.createLink(output, partFile); //this line thrown
Files.delete(partFile);
} catch (IOException e) {
throw error(e, "Failed to complete download");
} and the log below:
(full logs can be found there: https://paste.gg/p/anonymous/c3b2e8fcdaaf4e7eb62f7c84dd819244) I'm certainly known this shouldn't happen in a normal linux environment, but I was working on Termux Android, and Android don't allow app to create hard link for a file. So it has failed. Previously I was using fabric-loom 1.3.10 and it completed the build normally. After a simple search, I found out why the new version of fabric-loom could not run normally in my environment, which is the code at the beginning. I'm not sure, could this be supported? Use fabric-loom to complete the construction of Minecraft Fabric mod on Android. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think this is possibly something we can fix. It might be ok for loom to just move the file instead of link + delete. I think technically on windows a move operation isnt atomic, but its highly unlikey to cause a real world problem. Ideally this would throw an UnsupportedOperationException or something so we could know to fall back to a move 🤔 |
Beta Was this translation helpful? Give feedback.
-
I have removed the link from the latest 1.6.2 version here: https://github.com/orgs/FabricMC/discussions/3659 please let me know how you get on with this version. |
Beta Was this translation helpful? Give feedback.
I have removed the link from the latest 1.6.2 version here: https://github.com/orgs/FabricMC/discussions/3659 please let me know how you get on with this version.