Fork me on GitHub
#hoplon
<
2015-12-26
>
laforge4917:12:48

Trying to convert an hl file to a cljs file. Getting illegal access on mkremote. Any ideas? java.lang.IllegalAccessError: mkremote does not exist at clojure.core$refer.doInvoke(core.clj:4097) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.core$apply.invoke(core.clj:632) at clojure.core$load_lib.doInvoke(core.clj:5730) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:632) at clojure.core$load_libs.doInvoke(core.clj:5749) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:632) at clojure.core$require.doInvoke(core.clj:5832) at clojure.lang.RestFn.invoke(RestFn.java:421) at server_notifications.notification_rpc$eval3$loading__5340__auto____4.invoke(notification-rpc.cljs:1) at server_notifications.notification_rpc$eval3.invoke(notification-rpc.cljs:1) at clojure.lang.Compiler.eval(Compiler.java:6782) at clojure.lang.Compiler.eval(Compiler.java:6771) at clojure.lang.Compiler.load(Compiler.java:7227) ... 14 more

raymcdermott18:12:00

@alandipert: @micha I made a demo that hooks Datomic Free into Castra at the back is that something that you would like added back in as a PR to the demos? (It’s not very fancy just replaces your random number with a random DB value!)

micha18:12:46

@raymcdermott: that would be great, yes!

laforge4918:12:17

I've added [hoplon/javelin "3.8.4"] to my build boot. And changed my ns on the cljs file that was a hl file to (ns server-notifications.notification-rpc (:require [javelin.core :refer [cell] :refer-macros [cell=]] [castra.core :refer [mkremote]] [adzerk.cljs-console :as log :include-macros true])) Now cell does not exist. @micha ?

laforge4918:12:25

Caused by: java.lang.IllegalAccessError: cell does not exist at clojure.core$refer.doInvoke(core.clj:4097) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.core$apply.invoke(core.clj:632) at clojure.core$load_lib.doInvoke(core.clj:5730) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:632) at clojure.core$load_libs.doInvoke(core.clj:5749) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:632) at clojure.core$require.doInvoke(core.clj:5832) at clojure.lang.RestFn.invoke(RestFn.java:436) at server_notifications.notification_rpc$eval3$loading__5340__auto____4.invoke(notification-rpc.cljs:1) at server_notifications.notification_rpc$eval3.invoke(notification-rpc.cljs:1) at clojure.lang.Compiler.eval(Compiler.java:6782) at clojure.lang.Compiler.eval(Compiler.java:6771) at clojure.lang.Compiler.load(Compiler.java:7227) ... 14 more

micha18:12:33

@laforge49: i'm not sure [javelin.core :refer [cell] :refer-macros [cell=]] is legit

micha18:12:01

i gave up on trying to figure that syntax out anymore

micha18:12:19

maybe something in the cljs compiler changed

micha18:12:23

since that was made

micha18:12:44

i just use a separate (:require-macros ...) clause

laforge4918:12:09

@micha No such var: clojure.core/require-macros (ns server-notifications.notification-rpc (:require-macros [javelin.core :refer [cell=]]) (:require [javelin.core :refer [cell]] [castra.core :refer [mkremote]] [adzerk.cljs-console :as log :include-macros true]))

laforge4918:12:17

I must be missing something!

laforge4918:12:43

And this IS a cljs file.

laforge4918:12:21

oh, refer-macros

laforge4918:12:25

no, it is require-macros, only I can't get it to compile

micha18:12:39

i have to go into the cljs compiler source to figure that out every time

flyboarder18:12:17

I would double check the clj vs cljs wiki page to make sure you have it correctly

flyboarder18:12:40

There is a bullet point on it

laforge4918:12:18

giving up for now

micha18:12:38

which repo?

micha18:12:51

@laforge49: i can have a look

laforge4919:12:38

I've put it back. I just was removing the .hl from https://github.com/laforge49/simple-notifications/blob/master/src/cljs/server_notifications/notification-rpc.cljs.hl and trying to add javelin. (I just reverted the boot.build file, too)

laforge4919:12:33

I figured it would be a while before that fix to boot comes out for windows and I just wanted to take a wack at this. But I'm still too much the newbie.

laforge4919:12:59

No worry, I've got other things to do. Like reworking the chat demo.

micha19:12:01

which fix?

laforge4919:12:27

changing file to path?

micha19:12:41

oh, i can fix that right now

micha19:12:53

but also .cljs should work, so that's also a thing

micha19:12:02

ok one sec

micha19:12:00

[hoplon/boot-hoplon "0.1.11"]

micha19:12:07

fixed (i hope)

micha19:12:15

@laforge49: if you rebuild your jar it should work with .hl files now

laforge4919:12:50

@micha notify now builds, but when I boot dev on the demo castra-simple2 I get this: C:\Users\Bill\Documents\GitHub\demos\castra-simple2>boot dev Starting reload server on <ws://localhost:50037> Writing boot_reload.cljs... Starting file watcher (CTRL-C to quit)... Extracting Hoplon dependencies... ò cljs\notify\notification_rpc.cljs.hl java.lang.IllegalArgumentException: No implementation of method: :make-input-stream of protocol: #'http://clojure.java.io/IOFactory found for class: nil clojure.core/-cache-protocol-fn core_deftype.clj: 554 http://clojure.java.io/fn/G io.clj: 69 http://clojure.java.io/input-stream io.clj: 136 ... boot.pod/copy-resource pod.clj: 167 hoplon.boot-hoplon/extract-deps! boot_hoplon.clj: 98 hoplon.boot-hoplon/eval564/fn/fn boot_hoplon.clj: 111 ... clojure.core/deref core.clj: 2206 hoplon.boot-hoplon/eval564/fn/fn/fn boot_hoplon.clj: 115 boot.task.built-in/fn/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn built_in.clj: 261 boot.core/run-tasks core.clj: 791 boot.core/boot/fn core.clj: 801 clojure.core/binding-conveyor-fn/fn core.clj: 1916 ... Elapsed time: 0.159 sec

laforge4919:12:41

So I need to update something in the boot.build file?

laforge4919:12:46

boot -u doesn

micha19:12:50

can you update the repo on github such that it reproduces this?

micha19:12:59

i can run it on windows now thanks to @flyboarder

micha19:12:14

you want to update the boot-hoplon dependency

micha19:12:18

to 0.1.11

micha19:12:26

in the build.boot

laforge4919:12:05

everything is up to date on the repositories. I'll make that small change.

micha19:12:49

you need to rebuild the jar file

micha19:12:58

with the new version of boot-hoplon

micha19:12:34

if you examine the jar and look at the manifest you should see paths in there with forward slash instead of backslash

laforge4919:12:05

Progressssss!

laforge4919:12:14

repos are updated

laforge4919:12:35

boot dev on demos/castra-simple2 works.

laforge4919:12:46

But I get errors when testing

micha19:12:22

but the .hl files are extracted from the jar correctly now?

laforge4919:12:55

Caused by: clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate notify/notification_api__init.class or notify/notification_api.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(simple_notifications/api.clj:1:1)

micha19:12:26

you set :resource-paths to #{"src"}, but that's not where the source files are

micha19:12:51

you want :resource-paths #{"src/clj" "src/cljs"}

micha19:12:15

or, you can just use a single directory and get rid of the clj/cljs subdirs

micha19:12:28

there's nothing wrong with mingling clj and cljs source files

micha19:12:39

they are identified by their file extensions

micha19:12:45

@laforge49: you'll need to rebuild your jar again, because the manifest has incorrect paths in it simple_smile

micha19:12:01

the manifest, if you examine it, probably has entries like

laforge4919:12:03

well jump up and down, 'cause my pants are on file.

micha19:12:17

cljs/notify/asdf.cljs.hl

micha19:12:07

oh i guess it will work because cljs will compile a source file that's not in the correct directory (i.e. the java package path)

laforge4919:12:11

everything is now synched

micha19:12:15

but some error messages may be crazy

laforge4919:12:23

no, I fixed resources

micha19:12:30

and you rebuilt the jar?

laforge4919:12:36

per your suggestion

laforge4919:12:41

and rebuilt the jar, yes

micha19:12:45

sweet, you're set then!

laforge4919:12:05

Now I can focus on rewriting chat. simple_smile

micha19:12:22

my goal is to finish all the boot api docs today

laforge4919:12:38

though I should release notify and castra-simple2 first

laforge4919:12:01

Don't burn out--you'd be missed! 😄

laforge4919:12:32

I'm sure you will be very happy to be done with the docs for a while. I always am. simple_smile

micha19:12:06

i had to make a doc generator program

micha19:12:15

since one of the ones i could find did what i wanted

micha19:12:26

good luck!

laforge4919:12:50

Mostly I make my own, but not so much in clojure yet

micha19:12:19

that's what it produces

micha19:12:59

it's cool that on github i can version the api docs with the code

laforge4919:12:10

that's a really nice feature!

laforge4920:12:39

@micha can you deploy haplon/notify? It looks like I am forbidden by clojars. Repositories have been updated for notify version 0.0.1. --b

micha20:12:43

@laforge49: what's your clojars username?

micha20:12:49

i'll add you to the thing ther

laforge4921:12:36

@micha laforge49, of course. simple_smile

micha21:12:17

haha, ok done

flyboarder21:12:12

that looks nifty

raymcdermott22:12:17

@micha ok will do some more tests and post it up