Closed miikka closed 6 years ago
Hmmm, do you happen to know if tools.analyzer
needs that particular version of the ASM library? I can make sure that I remove older versions, if not.
I don't know for sure, but I doubt it. It only uses org.objectweb.asm.Type/getType and Type.java hasn't changed much after ASM 4.2. I quickly tried running the tools.analyzer.jvm tests after bumping the ASM dep and they all passed, for whatever that's worth.
For what is worth, there's now an issue on tools.jvm.analyzer JIRA to update its ASM dependency, inspired by encountering a similar problem with another library.
FWIW, the ticket is closed, and t.j.a. has updated the dependency: https://github.com/clojure/tools.analyzer.jvm/commit/f273e18a58bcf9d34861e80c5ca278427dea48cd
@miikka, could you please confirm if this issue is obsolete now?
Yes, this is obsolete now. Of course it can still happen with other libraries that depend on org.ow2.asm/asm-all
, but I'm not sure if it makes sense for Virgil to be super-defensive here. I'll close this issue.
tools.analyzer.jvm depends on
[org.ow2.asm/asm-all "4.2"]
and Virgil depends on[org.ow2.asm/asm "5.1"]
. ASM 4.2 does not support Java 8, so if you depend on both and manage to get the libraries in the wrong order in your classpath, you'll get this stacktrace from Virgil:The annoying thing is that because the artefact IDs do not match,
lein deps :tree
or:pedantic? :abort
in project.clj won't complain about the problem. A possible workaround is to exclude asm-all and hope that it won't break anything in tools.analyzer.jvm.I'm not sure if Virgil needs to do anything about this. Mostly I opened this issue to document the problem somewhere. Since tools.analyzer.jvm is a fairly common dependency, this might bite some other people as well. Took me a while to figure out what's going on.