weavejester / cljfmt

A tool for formatting Clojure code
Eclipse Public License 1.0
1.11k stars 120 forks source link

Formatting croaks on some new Clojure 1.12 syntax #355

Closed PEZ closed 5 days ago

PEZ commented 6 days ago

Hi!

The new Clojure 1.12 syntax for array classes makes clj-fmt sad:

  #_{:deps {dev.weavejester/cljfmt {:mvn/version "0.12.0"}}}
  (require '[cljfmt.core :as fmt])
  (fmt/reformat-string "^[Long] a")
  ;;=> "^[Long] a"
  (fmt/reformat-string "^Long/1 a")
  ;;=> Execution error (ExceptionInfo) at clojure.tools.reader.impl.errors/throw-ex (errors.clj:34).
  ;;   Invalid symbol: Long/1.

It starts working if I make it use rewrite-clj 1.1.48.

weavejester commented 5 days ago

Updated the dependencies. I'll release a new version soon.