Closed jngbng closed 4 years ago
Hey @jngbng, thanks for the feedback!
That was my bad for not clarifying that the cheshire
dependency is a breaking change 🤦. I completely agree that the README could clarify this on the breaking change. I also want to investigate a bit further on whether there's other ways of providing helpful error messages when using optional dependencies.
RE: lein clean
. I strongly recommend running lein clean
after changing any dependencies. What can happen is that you may have previously compiled clojure namespaces that get picked up. In general, I recommend running lein clean
after changing changing dependencies or after running lein jar
or lein uberjar
. This should cover most of the cases.
@jngbng See #558 and let me know if this addresses your concerns.
I've re-ran your test code with a snapshot build and this is now the error message that is returned:
❯ lein run
Syntax error (IllegalStateException) compiling at (/private/var/folders/gr/n1_1kt5126dbgmjjzwm44nf00000gn/T/form-init8169005464871833131.clj:1:125).
Missing #'cheshire.core/parse-stream-strict. Ensure the version of cheshire is >= 3.9.0
Full report at:
/var/folders/gr/n1_1kt5126dbgmjjzwm44nf00000gn/T/clojure-17780328165989224335.edn
Contents of Full Report:
The improvement is in 3.10.3
It is not really a bug, but I though someone would make a mistake as I did.
As of
clj-http 3.10.1
, it depends oncheshire 5.9.0
. (https://github.com/dakrone/clj-http/blob/3.x/changelog.org#3101).I thought it would not affect me since I do not use those new feature. But actually,
clj-http
is NOT compatible withcheshire 5.8.1
AT ALL: it throws NullPointerException on runtime. (I missed this problem when I test on my local environment due tolein
cache bug.)It would be better that this version requirement is mentioned as a breaking change.
I hope this helps someone. :)
Following is a sample code.
project.clj:
main.clj:
result:
ps. After upgrading clj-http on
project.clj
,lein
magically usescheshire 5.9.1
and everything seems to work well.lein deps :tree
also showscheshire 5.9.1
is used. But afterlein clean
, it stops working. should I alwayslein clean
after updateingproject.clj
?