Fork me on GitHub

Hi all, when building a project using aot compilation, I've seen two approaches: 1. (aot :namespace #{'project.core} 2. (aot :all) Why would you use :all? My interpretation would be that by compiling the root namespace, all reachable namespaces required for the project to execute would also be compiled ahead of time (assuming we don't need unreachable namespaces). Am I misinterpreting something?


Is :all only required if you want unreachable namespaces to be compiled as well?


@zalky There's quite a lot of code out there that may require namespaces at runtime, so they wouldn't appear to be "reachable", or you may be dealing with a library that has several independent namespaces that users might require.


(However, you should pretty much never AOT compile a library -- it can cause a lot of pain for your users)


And, in general, I would recommend avoiding AOT compilation altogether. You don't need it.