Fork me on GitHub
#graalvm
<
2019-11-06
>
eraserhd02:11:28

Getting back to rep, and I no longer need patched nrepl.transport and tools.cli to get it to build!! Hurrah!

👍 8
eraserhd02:11:46

might as well try with an unpatched clojure

eraserhd02:11:36

locking macro patch still needed

lread16:11:12

has anybody been able to use clojure.test\run-tests under graalvm? I've got a small sample working under clojure 1.9 but I am getting the unbalanced monitors error when trying to create a native-image when using clojure 1.10. @eraserhd, maybe I need the patch you are using? By locking macro patch, do you mean CLJ-1472-reentrant-finally2.patch from https://clojure.atlassian.net/browse/CLJ-1472 ?

borkdude16:11:28

that issue is a bit of a pain in the ass. what I have done for some projects is patch or just copy the clojure code and remove any references to locking

borkdude16:11:28

you might also use this workaround: https://github.com/taylorwood/clojurl/commit/12b96b5e9a722b372f153436b1f6827709d0f2ab it introduces a special form for locking and then uses that special form to patch several clojure functions.

lread16:11:31

thanks @borkdude! I'll start with the taylorwood work-around.

borkdude16:11:58

that man rocks

borkdude16:11:07

shoutout to @taylor

❤️ 4
eraserhd16:11:46

lread: That error is definitely what I get without the locking patch.

lread16:11:19

ok, thanks @eraserhd, another avenue to explore.

borkdude16:11:43

I wonder what is different about clojure 1.9 and clojure 1.10 that this error started happening so often. maybe clojure 1.10 loads spec while doing things like resolve?

taylor16:11:29

I think the version of spec that comes with 1.9 doesn’t use locking

eraserhd16:11:46

The reentrant-finally2 patch is trying to fix the bytecode generation, hmm.

eraserhd16:11:13

I was using the clj-1472-2.patch, which punts it to Java.

lread16:11:56

hmm... thanks there is also a clj-1472-3.patch

eraserhd16:11:03

er, that's probably the one

lread16:11:42

it is a bit confusing, the JIRA issue references the clj-1472-3.patch but CLJ-1472-reentrant-finally2.patch was created later.

lread16:11:39

@borkdude, I was hopeful when I saw -Dclojure.spec.skip-macros=true in your clj-kondo compile script. I thought it might be related to this issue.

borkdude16:11:08

that was one attempt to deal with this issue

borkdude16:11:19

and maybe also some speedup, but not sure what the effect was

lread16:11:51

ah ya maybe, see it recommend for cli-matic for startup time: https://github.com/l3nz/cli-matic#reducing-startup-time-with-skip-macros

sogaiu16:11:09

@lee thanks for sharing that tip

lread16:11:38

while wandering lost in the woods, I see many interesting things. simple_smile

gerred18:11:51

@borkdude have you started notarizing+stapling your GraalVM binaries yet? thinking to start solving this problem and want to collect some info. 🙂

gerred18:11:09

i'm using https://github.com/mitchellh/gon on other stuff right now but want to make something just aliasable in deps.edn for it.

borkdude18:11:11

@gerred I haven't looked into this. Will users get into trouble with my binaries if I don't?

sogaiu18:11:10

wow, draconian

sogaiu18:11:20

apple's thing that is

sogaiu18:11:10

i wonder if that impacts atom plugins and vscode extensions

sogaiu18:11:21

i guess this is getting off-topic

borkdude18:11:44

not off-topic as far as I'm concerned: this affects all graalvm built clojure binaries

sogaiu18:11:09

the description looks like what i went through recently

sogaiu18:11:34

i wouldn't have classified it as painful -- but then development-type folks are used to having to do these kinds of "extra" things

borkdude18:11:16

the binaries I produce are generally for developers, so I guess it's fine

sogaiu18:11:21

definitely not convenient though

borkdude18:11:50

I'll make an issue for it

borkdude18:11:01

and look into it later. I'm not running catalina myself yet

borkdude18:11:10

do you have to pay Apple for a developer account/certificate?

borkdude19:11:16

maybe there can be a brew tool that whitelists all kinds of binaries, like a .catalina_ignore or something

sogaiu19:11:55

not sure about the dev cert -- if you happen to fit in this category, then no you don't have to pay? https://developer.apple.com/support/membership-fee-waiver/

borkdude19:11:59

or maybe brew can sign these things 🙂

borkdude19:11:10

Fee waivers are not available for: Individuals and sole proprietors/single person businesses

gerred19:11:52

this doesn't affect homebrew/downloading from the terminal

gerred19:11:58

it does affect binaries downloaded via browsers and apps though.

sogaiu19:11:48

hmm...i think i did have to do something to get clj-kondo to work...am i confusing some issues?

borkdude19:11:09

maybe you downloaded it from github?

borkdude19:11:19

but if you install it from curl it will work?

sogaiu19:11:32

unfortunately, i'm weeks away from the env where i tested it

sogaiu19:11:45

likely there's someone else around who can verify

borkdude19:11:18

> this doesn't affect homebrew/downloading from the terminal what about binaries you install with homebrew, but are then executing using some other App like http://Emacs.app?

borkdude19:11:47

anyway @gerred if you create a tool for it, I'm willing to try it

borkdude19:11:15

it's just that 99 euro a year that apple wants from me, while I'm giving my tools away for free, which feels a bit wrong

gerred19:11:17

that'll be ok ^ the quarantine flag is a bit that gets set on the binary

gerred19:11:40

maybe Clojurists Together could invest in a Developer ID cert and come up with a process for that? I'd be willing to develop some tooling there to enable that for binaries.

danielcompton23:11:01

The general idea with developer IDs is that they map pretty closely to the org producing the software. I'm not opposed to investigating this more though

danielcompton23:11:51

Actually, reading https://discourse.brew.sh/t/code-signing-installed-executables/2131/11, it seems like maybe having a "Clojure Homebrew" style organisation that managed the building and notarization for Clojure apps could work OK.

gerred19:11:42

it's insane though.

sogaiu19:11:09

i guess this kind of thing tends to happen when there's a fair bit of $$$ on the line

danielcompton23:11:01

The general idea with developer IDs is that they map pretty closely to the org producing the software. I'm not opposed to investigating this more though

danielcompton23:11:51

Actually, reading https://discourse.brew.sh/t/code-signing-installed-executables/2131/11, it seems like maybe having a "Clojure Homebrew" style organisation that managed the building and notarization for Clojure apps could work OK.