You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you know if there’s something that jsonista could do better around this? Mixed-up Jackson deps seems to be a thing that keeps happening.
I'm not sure this is a good suggestion, but one option is, at runtime, to verify Jackson versions. This is stored inside for example META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties.
~/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.9$ unzip -p jackson-core-2.9.9.jar META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties
#Generated by org.apache.felix.bundleplugin#Wed May 15 19:58:39 PDT 2019
version=2.9.9
groupId=com.fasterxml.jackson.core
artifactId=jackson-core
I'm no Java/JAR-expert, but this file is similarly also stored inside my uberjar (packed by boot).
$ unzip -p target/app.jar META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties
#Generated by org.apache.felix.bundleplugin#Mon Jun 11 17:53:30 PDT 2018
version=2.9.6
groupId=com.fasterxml.jackson.core
artifactId=jackson-core
Thus the version can be read in Clojure, at runtime, with something like this:
When an incorrect version is detected, an error/warning could be printed.
I have not myself written code like this that is running in production, but if it saves hours of devs debugging time with strange behaviour due to a slightly incorrect dependency, it might be worth it?
Consider this a suggestion.
Hi,
and thanks for a fine library!
Re the twitter thread https://twitter.com/arcatan/status/1159690520194670598
I'm not sure this is a good suggestion, but one option is, at runtime, to verify Jackson versions. This is stored inside for example
META-INF/maven/com.fasterxml.jackson.core/jackson-core/pom.properties
.I'm no Java/JAR-expert, but this file is similarly also stored inside my uberjar (packed by boot).
Thus the version can be read in Clojure, at runtime, with something like this:
When an incorrect version is detected, an error/warning could be printed.
I have not myself written code like this that is running in production, but if it saves hours of devs debugging time with strange behaviour due to a slightly incorrect dependency, it might be worth it?
Consider this a suggestion.
CC @miikka @hlship
Thanks and kind regards.
The text was updated successfully, but these errors were encountered: