greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

deps.edn usage fails with sha, ClassNotFoundException errors #79

Closed filipesilva closed 2 years ago

filipesilva commented 2 years ago

Hi there,

When following the usage instructions with deps.edn I get two different classes of errors, even on an empty dir.

Using just :tag doesn't seem to be supported anymore:

filipesilva@Filipes-Air ~/s/empty-dir [1]> clj -Sdeps '{:deps {mvxcvi/cljstyle {:git/url "https://github.com/greglook/cljstyle.git", :tag "0.15.0"}}}' \
                                               -m cljstyle.main \
                                               check
Error building classpath. Library mvxcvi/cljstyle has coord with missing sha

If I use the sha I get a ClassNotFoundException instead:

filipesilva@Filipes-Air ~/s/empty-dir [1]> clj -Sdeps '{:deps {mvxcvi/cljstyle {:git/url "https://github.com/greglook/cljstyle.git", :sha "13fd2a3ff4097f1ed5c7ec96baf13e547ac2a26b"}}}' \
                                               -m cljstyle.main \
                                               check
WARNING: Implicit use of clojure.main with options is deprecated, use -M
Syntax error (ClassNotFoundException) compiling at (cljstyle/format/zloc.clj:1:1).
rewrite_clj.node.stringz.StringNode

Full report at:
/var/folders/hx/dl3d0pqn6615z78g83gc26300000gn/T/clojure-1489479610023568038.edn
filipesilva commented 2 years ago

I was able to workaround by including a newer version of rewrite-clj as a dep that matches the same version in this projects project.clj. I think what happened was that you updated project.clj but not deps.edn.