Fork me on GitHub
#graalvm
<
2019-11-10
>
andy.fingerhut00:11:50

I do not know how others have applied 'the other patch' successfully, or not, but patch -p1 < patchfile.txt run from the root directory of a project is sometimes more forgiving of differences between the version of the code that was used to create the patch, vs. the code you are trying to apply it to, if they differ.

sogaiu00:11:46

thanks for the tip -- iiuc, the suggestion is that possibly using patch -p1 might work better than using git apply. i gave that a try, but it seems to fail on the same bit.

sogaiu00:11:07

ah, this is the first time in years of using patch that i've gotten to the bottom of why a patch didn't work 🙂

sogaiu00:11:59

it appears that clj-1472-3.patch doesn't know about the RT.init(); after:

static public Object loadWithClass(String scriptbase, Class<?> loadFrom) throws IOException, ClassNotFoundException{
in the current code base.

sogaiu01:11:36

patch came about 2018-12-13 commit: 2019-03-20(?)

alexmiller02:11:09

Yeah that was 1.10.1

sogaiu04:11:42

@lee i tried your updated script twice -- once with each patch, then with /tmp/parallel.clj, i got:

$ clj -J-XX:-EliminateLocks
Clojure 1.10.1-patch_clj_1472_3
user=> (load-file "/tmp/parallel.clj")
Java version: 11.0.5
Clojure version: 1.10.1-patch_clj_1472_3
"Elapsed time: 19899.181595 msecs"
10000000
nil
and
$ clj -J-XX:-EliminateLocks
Clojure 1.10.1-patch_clj_1472_reentrant_finally2
user=> (load-file "/tmp/parallel.clj")
Java version: 11.0.5
Clojure version: 1.10.1-patch_clj_1472_reentrant_finally2
"Elapsed time: 19817.686781 msecs"
10000000
nil

sogaiu04:11:09

it's nice to be able to tell from the output which patched clojure is being used 👍

sogaiu04:11:43

so your script is now known to work on manjaro linux too 🙂

lread04:11:49

thanks @sogaiu !

sogaiu04:11:01

ty for the script and related efforts!

lread12:11:32

and thanks to @borkdude for being so very @borkdude on this! what a whirlwind of productivity!

borkdude17:11:20

Just spotted one use of locking in this blog article: https://jacobobryant.com/post/2019/ion/