mage
mage copied to clipboard
mage cannot be run concurrently in same directory
Currently, mage
will fail if you try to run it multiple times at the same time in the same directory. It will clobber the mage_output_file.go
it writes.
This can be worked around by compiling a static binary using the -compile
flag.
I use reflex to automatically execute mage
targets when code changes (unit tests, restarting applications, ...).
This is a nice to have, but as you said, the compile flag sorta fixes it (not a great solution). The biggest problem is that you would need to copy all the files to a different directory to compile... that might actually work in the case of compiling with go modules, I'm not 100% sure... but it's certainly not ideal. Worth thinking about though.