brunoV / throttler

Control the throughput of function calls and core.async channels
286 stars 27 forks source link

Requiring throttler.core without core.async in dependecies cause to fail #13

Open cezarykosinski opened 4 years ago

cezarykosinski commented 4 years ago

Hi, I had an issue that you may be interested in. With deps file containing only throttler {:mvn/version "1.0.0"} I was getting this:

Clojure 1.10.0
user=> (require ['throttler.core :as 'throttler])
Syntax error macroexpanding clojure.core/refer-clojure at (async.clj:9:1).
:as - failed: #{:exclude} at: [:exclude :op :quoted-spec :spec]
:as - failed: #{:only} at: [:only :op :quoted-spec :spec]
:as - failed: #{:rename} at: [:rename :op :quoted-spec :spec]
(quote :as) - failed: #{:exclude} at: [:exclude :op :spec]
(quote :as) - failed: #{:only} at: [:only :op :spec]
(quote :as) - failed: #{:rename} at: [:rename :op :spec]

after adding extra org.clojure/core.async {:mvn/version "1.2.603"} to deps everything works just fine:

Clojure 1.10.0
user=> (require '[throttler.core :refer [throttle-fn]])
nil

Is this the desired behaviour to require from user to add core.async to project dependencies in order to successfully pull throttler.core? If it is, then maybe you'd consider mentioning that in README?

Kind regards, Cezary