I have observed an oddity with the Clojure compiler: that it can produce different output for the same input. i.e. the generated .class files contain different bytes, though otherwise have identical runtime behavior. Why is this? I have created a Docker container and script which demonstrates the problem.
Though otherwise harmless in terms of the functionality of the resulting Java program, this is an issue for any attempts to cache the compiled classes based on simple byte equality, such as with Docker layer caching. Ideally, it would be possible to compile third-party Clojure libraries and store these in a separate Docker layer in containers for Clojure apps. If such a layer resulted in the same byte output given a particular fixed set of dependencies, then the layer could be recognized as already existing when pushing to a repository. This would avoid the storage & network costs that result from creating a whole new uberjar for every single source change within your application code.
Such caching is possible when not using AOT compilation, but this comes at the cost of slower application startup.