bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

Fix function parameters in 'figwheel-sidecar.system/repl-function-docs' #648

Closed zachcurry closed 6 years ago

zachcurry commented 6 years ago

The REPL function doc string does not accurately reflect the signatures of the functions in 'repl-api.clj'. Namely, the functions which accept a variable number of build 'ids' all have a signature identical to this one: repl-api.clj

(defn switch-to-build
  "Stops the currently running autobuilder and starts building the
builds with the provided ids."
  [& ids]
  (app-trans fs/switch-to-build ids))

If you try to pass a vector of 'ids', as 'repl-function-docs' suggests, you will get an exception in 'system/namify' as it calls 'clojure.core/name' on a vector.

Since there is no need to call the functions this way, and I presume it has never actually worked this way, I just went and changed the docs.

bhauman commented 6 years ago

Thanks! That was confusing it wasn't intending to indicate a vector of options, so this is better.