greglook / cljstyle

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

java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderFailed to process 1 files #93

Closed dpom closed 2 years ago

dpom commented 2 years ago

Hello, I use cljstyle quite heavily so first off thanks for all the hard work!

Since a week in a few projects that have similar deps.clj when I run the command: clojure -M:format fix I receive the messages: java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderError while processing file ... ... java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderFailed to process x files

The relevant part of deps.edn:

:aliases

  :format
  {:extra-deps {mvxcvi/cljstyle {:mvn/version "0.15.0"}}
   :main-opts  ["-m" "cljstyle.main"]}

On my laptop I installed Manjaro with:

dpom commented 2 years ago

I found a solution for this issue in https://clojurians-log.clojureverse.org/rewrite-clj/2022-02-03:

:aliases
{
 :format
  {:replace-deps {mvxcvi/cljstyle {:mvn/version "0.15.0"}}
   :main-opts  ["-m" "cljstyle.main"]}
}