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.
Please check if the PR fulfills these requirements
[ ] There is an open issue describing the problem that this pr intents to solve.
[x] You have a descriptive commit message with a short title (first line).
[x] Tests for the changes have been added (for bug fixes / features).
[ ] Docs have been added / updated (for bug fixes / features).
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix.
What is the current behavior?
Vessel throws an exception when can't map a compiled class file to a known
namespace on the classpath.
What is the new behavior (if this is a feature change)?
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.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
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.
Please check if the PR fulfills these requirements
[ ] There is an open issue describing the problem that this pr intents to solve.
[x] Tests for the changes have been added (for bug fixes / features).
[ ] Docs have been added / updated (for bug fixes / features).
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
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