anatawa12 / ForgeGradle-1.2

This is only for FG_1.2(for minecraft 1.7.10). Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
84 stars 33 forks source link

Some times build can throw FSE #195

Closed mts2200 closed 1 year ago

mts2200 commented 1 year ago

Log: https://pastebin.com/G1TiSJbd

Sometimes an error can occur, sometimes not, I did not find any pattern in this.

anatawa12 commented 1 year ago

Can you fix garbled characters?

mts2200 commented 1 year ago

The text already displays like "?????", this is not an encoding error when copying.

anatawa12 commented 1 year ago

I think it must be an encoding error in some layer. Please check your console encoding, codepage, and your java encoding. If you ran gradle using some ide, please try Windows Terminal. Especially on windows, it's very likely to happen encoding problem if your windows/java is not for english.

Aaur1s commented 1 year ago

+1, in those question marks it says that file is busy(most likely by IDE or gradle) and FG can't delete it. Very furstrating thing

Aaur1s commented 1 year ago

Here's logger code: https://github.com/anatawa12/ForgeGradle-1.2/blob/FG_1.2/src/main/java/net/minecraftforge/gradle/common/BasePlugin.java#L85

And deletion attempt(Exception comes from here): https://github.com/anatawa12/ForgeGradle-1.2/blob/FG_1.2/src/main/java/net/minecraftforge/gradle/FileLogListenner.java#L32

Do we even need it? Maybe just remove this logger?

anatawa12 commented 1 year ago

Thank you for improved error information. It looks the error only cause on non-unux-like system and you run two Gradle parallel. For example, importing project with IDEA and running some other task manually may cause this problem. Only windows disallow removing opened files and I'm using unix (macOS) for developing so I couldn't found this problem. sorry.

I think it's not good to run Gradle parallel but It looks the log is not necessary so I'll make the log optional and disabled by default.