oakmac / standard-clojure-style-js

Standard Clojure Style in JavaScript
ISC License
33 stars 1 forks source link

broken ns with reader conditionals #142

Open oakmac opened 3 days ago

oakmac commented 3 days ago

From cljs-math:

(ns ^{:doc "ClojureScript wrapper functions for math operations"
      :author "Paula Gearon" }
    cljs.math
  ;; create space to load this in Clojure for testing
  #?@(:clj ((:refer-clojure :exclude [aset aget + unsigned-bit-shift-right bit-shift-right bit-shift-left])
            (:require [js :refer [aset aget +]])
            (:import [js ArrayBuffer Uint8Array Uint32Array Float64Array]))))

#?(:clj (def number Double))
oakmac commented 3 days ago

FYI for anyone who is effected by this bug before it is fixed:

Once this bug is fixed in Standard Clojure Style, it will reformat the ns form to look different than this. So it may be the path of least resistance to simply change your ns to something that Standard Clojure Style can correctly format. The end result will be the same before/after this bug is fixed.