Fork me on GitHub
#cider
<
2019-05-15
>
rickmoynihan09:05:32

Has anyone else had problems with load-file in cider/nrepl choking on aliased keywords? With a RuntimeException: Invalid Token: ::aliased/keyword

Frank Henard14:05:23

not sure, but is aliased keywords the same as namespaced keywords. eg. :my-ns/my-kw. If so, then I'm pretty sure there should only be one colon as in my example.

rickmoynihan14:05:11

nope aliased keywords are double colon

👍 4
rickmoynihan14:05:24

in which case clojure expands the ns based on the alias in require

rickmoynihan14:05:35

See reader docs here:

rickmoynihan14:05:44

I can’t link you to the section

rickmoynihan14:05:47

but the text is:

rickmoynihan14:05:13

> If the keyword is qualified, the namespace will be resolved using aliases in the current namespace. In a namespace where x is aliased to example, ::x/foo resolves to :example/foo.

Frank Henard16:05:45

Interesting. I didn't know about that

rickmoynihan09:05:45

hmm ok pretty sure this is a scope capture bug

Frank Henard14:05:23

not sure, but is aliased keywords the same as namespaced keywords. eg. :my-ns/my-kw. If so, then I'm pretty sure there should only be one colon as in my example.

richiardiandrea17:05:04

does anybody have a pom.xml with a working nrepl setup?

richiardiandrea17:05:41

also it's been a while since I worked with cider in the JVM, I wonder what I am doing wrong because it seems like importing my java files/classes does not work 😄

richiardiandrea17:05:10

I definitely seem to have the right classpath entries that's why I am baffled

richiardiandrea17:05:50

I wonder if I need to include target and compile the java files ...

bozhidar20:05:41

> does anybody have a pom.xml with a working nrepl setup?

bozhidar20:05:43

Not me. 😄

bozhidar20:05:53

I recall there was some maven nrepl plugin, though.

bozhidar20:05:05

> also it’s been a while since I worked with cider in the JVM, I wonder what I am doing wrong because it seems like importing my java files/classes does not work 😄

bozhidar20:05:33

Doesn’t work in what sense? There’s nothing special you need to do. They simply have to be on your classpath.

richiardiandrea20:05:23

@bozhidar that was my impression as well, but no, I basically discovered that I needed lein-virgil to compile .java to .class obviously