nubank / vessel

A containerization tool for Clojure applications
Apache License 2.0
43 stars 1 forks source link

Copy non-mapped files to the container #22

Closed alan-ghelardi closed 3 years ago

alan-ghelardi commented 3 years ago

Under some circumstances the Clojure compiler creates class files that start with the prefix null$. I haven't yet understood what are those circumstances, but those classes don't map directly to known namespaces what breaks the algorithm that Vessel uses to infer the relations between compiled classes and their sources.

Previously, I was throwing an exception when that behavior happened (as a save guard). Since the algorithm has been tested in many scenarios and looks like correct, now I'm changing the behavior to default to the first known source path when a given class file can't be mapped to a known source.

Bug fix.

Vessel throws an exception when can't map a compiled class file to a known namespace on the classpath.

Vessel defaults the non-mapped class file to one of the source directories to force the file in question to be copied to the corresponding layer.

No