Closed sirius0xff closed 4 years ago
Compilation errors leave the clang/zapcc data structures inconsistent and unsuitable for further compilation. Backing up before compilation may be possible by duplicating the zapccs process and cleaning up, but will tie up extra memory and slow down compilation when there were no errors, which is the usual case when building a big project such as LLVM. Ideally that would be an option used only for interactive development.
Yes, that would be very helpful for development. I suspect something like docker maybe able to freeze, duplicate and restore the process?
docker pause
and docker save
? maybe. An overhead, though.
Lower level maybe fork
with fixes for open handles would work.
Currently zapccs close itself whenever there is compilation error.
I can imagine the error may made the cache invalid and it is very hard to restore the cache to original state, before compilation happens.
I think a simple workaround is simply backup the server and the whole cache before every compile, then if the new compile goes wrong, it can just restore to the old cache.
Are there simple ways to achieve this?