Fork me on GitHub
#clojure-dev
<
2015-11-07
>
cfleming00:11:38

I’m having a problem in Cursive with my REPL initialisation in Clojure 1.4 (and presumably earlier versions). This works fine in 1.5+.

cfleming00:11:24

Basically I load a single file which contains various namespaces concatenated together. One of the later namespaces requires an earlier one, and this fails saying it can’t find the file containing the NS.

cfleming00:11:03

So it looks like it’s not checking whether the ns is already loaded, or perhaps the fact that the ns is loaded is updated once load-file has finished? Not sure.

cfleming00:11:19

Did something change from 1.4->1.5 which would have affected this?

alexmiller01:11:02

That was before I was closely involved but check the changelog

cfleming01:11:21

I couldn’t see anything obvious there.

cfleming01:11:50

I’ll check the source diffs to see if I can spot anything.

bronsa01:11:55

looks like protocol callsites are broken when using arrays

bronsa02:11:43

@alexmiller: it looks like the jvm verifier can't figure out that the direct interface method path on a protocol callsite can only be reached after a successful instanceof check

bronsa02:11:53

so we need an explicit checkcast

bronsa02:11:27

@cfleming: I remember that at some point in the past clojure wasn't able to load namespaces that didn't exist on disk

cfleming02:11:02

@bronsa: Thanks. In this case the nses load ok, it’s requiring one that was loaded in this fashion that fails. It seems odd, since it implies that Clojure isn’t aware the ns has been loaded yet. IIRC that’s done using refs, I haven’t had time to check if that code changed in 1.5

alexmiller02:11:46

@bronsa: thx, I'll look at it next week. It's weird that I have no memory of that ticket being logged. Must have been when I was at scout camp.

bronsa02:11:23

@alexmiller: not a regression btw

bronsa02:11:26

looks like it never worked

cfleming02:11:27

@bronsa: That’s the one, fixed in 1.5