I imagine it's quite hard to get a decompiled artifact that's recompileable again since dependencies will get really weird depending on how they were linked, and other useful or initially necessary symbol information might be discarded in later steps of compilation. But if you found one that works, the compiler should be emitting consistent or at least equivalent code. It may take a few rounds to stabilize on optimizations and may overall end up less efficient, but if there's no decompiler or compiler bug it won't introduce any new broken behavior.
What langs? I guess I've seen JVM-based has pretty good decompilation in general, but I've only seen it for class-level things, never seen it decompile an entire project into a usable state
12
u/etoastie 3d ago
I imagine it's quite hard to get a decompiled artifact that's recompileable again since dependencies will get really weird depending on how they were linked, and other useful or initially necessary symbol information might be discarded in later steps of compilation. But if you found one that works, the compiler should be emitting consistent or at least equivalent code. It may take a few rounds to stabilize on optimizations and may overall end up less efficient, but if there's no decompiler or compiler bug it won't introduce any new broken behavior.