Fork me on GitHub
#core-async
<
2017-02-10
>
bballantine19:02:16

Hi, I get an exception when trying to run clojure.core.async/pub in a repl. Wondering if anyone else has seen this:

user> (clojure-version)
"1.9.0-alpha14"
user> (require '[clojure.core.async :as a])
nil
user> (a/pub (a/chan) :my-topic?)
IllegalArgumentException No implementation of method: :exec of protocol: #'clojure.core.async.impl.protocols/Executor found for class: clojure.core.async.impl.exec.threadpool$thread_pool_executor$reify__3338  clojure.core/-cache-protocol-fn (core_deftype.clj:583)

bballantine19:02:57

or if I’m doing something wrong - if someone can point me in the right direction

hiredman20:02:42

how are you starting that repl?

hiredman20:02:05

my guess is you have the output of aot compilation somewhere on the classpath, which is being loaded in some way as to break things

hiredman20:02:25

so I am psyching myself up for my once a day "stop aot compiling" rant

bballantine20:02:08

In this case it’s an n-repl launched from within the app

bballantine20:02:30

let me try simply lein repl

bballantine20:02:32

@hiredman - using lein repl works. Thanks. Hadn’t occurred to me that it was because how I was creating the repl

hiredman20:02:24

is your app aot compiled?

bballantine20:02:50

Only in the uberjar profile, but in this case the app is run via lein run -m and then the app kicks off an nrepl when it starts up.

bballantine20:02:14

so.. I don’t think there is any aot in this case

bballantine20:02:48

but if you want still want to give me the “stop aot compiling” rant, I’ll be happy to hear it 🙂

bballantine20:02:07

(actually it’s lein trampoline run -m … — not sure if that makes a difference.)

hiredman20:02:12

the question is if there are classfiles sitting on disk in target/ left there by uberjar

hiredman20:02:44

yeah, don't aot compile, it is a source of annoying issues that end to manifest far from when/where they are casued

hiredman20:02:15

the most common reason people aot compile is because they don't know how else to start their app

bballantine20:02:27

thanks @hiredman — If I figure out the reason behind the exceptions more specifically, i’ll let you know