Fork me on GitHub

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.


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


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


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).


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


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.


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 😸


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.


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


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.


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...


(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)


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