Is there a tool that will take a set of `*.kt` fil...
# getting-started
i
Is there a tool that will take a set of
*.kt
files that form an application, and produce an equivalent single
.kt
file?
v
Why by the name of the good lord, should anyone want to do something like that?
i
It's often a useful first step in diagnosing a bug in a tool
Especially if you then want to use something like https://embed.cs.utah.edu/creduce/ to shrink it
v
o_O I see. I'd usually just zip-up the files if multiple are necessary to reproduce the bug.
e
"identical" is not possible, because top-level objects will all be forced into a single classfile after being merged into a single source file
"equivalent" is… probably possible in many cases, but tricky because changing imports can change resolved names. I don't think there's any general safe way to do this
2