Fork me on GitHub
#graalvm
<
2019-11-07
>
viesti07:11:56

Have been running clj-kondo via Emacs, I did allow the ruby interpreter that starts Emacs on OSX some privileges, but don't remember doing anything similar to clj-kondo

lread15:11:12

Thanks for help yesterday folks! In my minimal test bed, I did not get clojure.test/run-tests working with a CLJ-1472 patched version of clojure 1.10.1 (maybe my process was flawed, dunno) but I did have success with @taylor's clojurl lock fix!

👍 12
borkdude15:11:41

@lee The problem with the patch is that clojure and/or spec are AOT-d, this makes it more complicated than just running with a patched Clojure version. I don't remember the exact process but Alex explained it to me once

borkdude15:11:08

so I think you have to first recompile spec with the fi... hmm, I really don't remember how it went, it's very confusing

borkdude15:11:12

it might go like this: spec is AOTd so it has the reference to the old locking macro expansion baked in?

lread15:11:27

Oh... maybe some secret sauce then? I simply applied the candidate patch to a clone of clojure repo and ran an mvn install. That might not be the right way to do it.

lread15:11:54

Ah... I see maybe. Spec is in a separate project.

borkdude15:11:14

yeah, so you have to recompile spec using your patched version of clojure

borkdude15:11:26

and then depend on that in your patched clojure

borkdude15:11:41

or use the non-AOTed versions, that might also work

lread15:11:58

for my purposes, clojurl lockfix might be just fine. But I guess I'm not really helping test CLJ-1472 if I take that route.

borkdude15:11:33

I think Ghadi was working on it at some point, but gave up. Not sure what the status is now

borkdude15:11:00

clojurl makes locking into a special form implemented in Java, that seems to me a robust solution

lread15:11:42

From the JIRA issue it looks like Ghadi reworked a solution in June of this year. But yeah... don't know how much of a work in progress this might still be.

borkdude15:11:49

I don't think he's working on it anymore, and what improvements it has on the patch that was there before. Maybe @alexmiller knows more.

Alex Miller (Clojure team)15:11:43

Not being worked on by anyone atm

Alex Miller (Clojure team)15:11:32

It needs clean up with a clear list of options and pros/cons/perf for each

lread15:11:21

Thanks for the info @alexmiller, much appreciated.

borkdude15:11:47

@lee Sounds like a cool research project 😉

lread16:11:11

hmmm.... so... many... interesting... distractions... simple_smile

borkdude21:11:43

I tried CLJ-1472-reentrant-finally2.patch but this program didn't compile:

(ns spec-test.core
  (:gen-class)
  (:require [clojure.spec.alpha :as s]))


(s/def ::g int?)

(defn -main [& _args]
  (println (s/valid? ::g 1)))
Now I'm trying clj-1472-3.patch but it seems it doesn't apply:
$ git apply clj-1472-3.patch
error: patch failed: src/jvm/clojure/lang/Util.java:242
error: src/jvm/clojure/lang/Util.java: patch does not apply

borkdude22:11:24

no luck though

lread22:11:56

@borkdude, just verified that my result (no surprise) with clj-1472-3.patch matches yours.

lread22:11:25

@eraserhd, you mentioned you were having some success with one of the clj-1472 patches, would you happen to have any hints?

borkdude23:11:38

@lee I made some more notes. In the last step I'm trying tools.deps instead of lein, but it seems native-image can't find the class or main method

lread23:11:53

@borkdude I am doing my own testing with tools deps only but have only tried testing from an uberjar so far.

danielcompton23:11:32

I'd definitely be interested in having Clojurists Together try and help fund someone to work on this. Who would be best placed to work on it? Ghadi? @lee?

borkdude23:11:19

interesting!

lread23:11:59

@danielcompton thanks for thinking of me, but I am trying to focus on rewrite-cljc for now. @gerred did offer his assistance above.