demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link

Muddler produces .mpackage with 0 byte XML file #26

Closed krystophv closed 2 years ago

krystophv commented 2 years ago

When using Muddler on a relatively large (138kb XML produced) project, the build process is creating an .mpackage with an empty XML file in it. The /build/tmp directory also has a 0 byte XML file, but the /build directory contains a full copy of the XML. I'm concerned that perhaps the call to write the contents of the XML file (https://github.com/demonnic/muddler/blob/main/src/main/groovy/muddler/App.groovy#L137) is asynchronous and that, for large enough files, the write won't have completed before the process tries to make a copy of the file (so the file will be created, but empty).

I haven't had any issues producing smaller packages, nor in the same project prior to adding some new large chunks of code, which makes me think that the size has some bearing on the error. I'm also using the docker image, so the translation through the volume mount could exacerbate any potential timing issues when it comes to filesystem operations.

demonnic commented 2 years ago

fixed in 0.12