Fork me on GitHub
#clojure-dev
<
2016-06-08
>
seancorfield00:06:23

I created a version of Encore with the defn lifted out of the do and it correctly produced the warning — and still defined the function — so this seems like a Clojure bug to me. I’ll create a repro case and submit a JIRA for it.

seancorfield00:06:19

Which at least means we can move forward onto Alpha 5 at World Singles now!

hiredman00:06:01

if you checkout encore, and change it to depend on the latest alpha, launch lein repl, then require the namespace, it loads fine, prints the warning, and the function is there, without any change to the code, so I really doubt it is a clojure issue based entirely on that

seancorfield00:06:26

Well, it specifically was not working in Alpha 5 but it it worked in Alpha 4 — before bytes? was added to clojure.core. I repro’d that (multiple times).

seancorfield00:06:46

And lifting the defn out of the do made it work with Alpha 5.

seancorfield00:06:22

So now I need to figure out exactly what caused the behavior I saw and see if I can create a repro case for it.

seancorfield00:06:16

I will note that I’m using Boot for our project, so if I can only repro in a Boot REPL and not a Leiningen REPL, that will be an… interesting… data point 😸

seancorfield00:06:43

As I said, I repro’d it failing multiple times, in the REPL of another project that depends on Encore. I already tried it directly in a clone of Encore and it didn’t fail the same way.

seancorfield00:06:09

When I figure out the root cause, I’ll let folks here know.

seancorfield01:06:01

As I also said, modifying Encore to lift the definition of (both) bytes-class and bytes? out of the enclosing do — and making no other changes at all to Encore — produced a version that worked just fine in the REPL of the other project.

seancorfield01:06:19

FWIW, pulling Encore into a plain Boot REPL as a dependency — outside the other project — also loads fine, so there’s some other subtle issue at play here...

seancorfield01:06:56

(part of the weirdness I observed was that all the other symbols defined inside that do were present in the ns-publics of the loaded Encore namespace — just bytes? was missing… Hmm, I think I might have an idea… goes off to the REPL to try something)

seancorfield01:06:15

Nope. Oh well, I’ll keep poking at it until I figure it out.