Fork me on GitHub
#leiningen
<
2019-08-23
>
danboykis00:08:51

is it possible for uberjar aot to compile java11 class files instead of java8 like it does now?

mikerod00:08:39

@danboykis maybe comes down to what clj version you are using

mikerod00:08:18

Why do you need it to compile higher version classfiles?

mikerod00:08:31

Newer jvm can run older classfile version.

mikerod00:08:47

But I think this is likely more of a #clojure question

mikerod00:08:05

Don’t think anything lein can do specifically. Unless I’m not thinking of something.

danboykis00:08:02

@mikerod no reason, I was just curious

mikerod00:08:30

Maybe related

mikerod00:08:34

For background.

danboykis00:08:13

i think you're right, clojure doesn't build anything beyond 1.8

danboykis00:08:21

it has nothing to do with lein

mikerod01:08:18

Yeah. It embeds the asm bytecode emitter.

mikerod01:08:23

And I think has a fixed target

Alex Miller (Clojure team)02:08:44

So rolling back to the original question, the answer to java 11 class files is no

🎉 4
Alex Miller (Clojure team)02:08:32

Clojure (1.9-1.10.1) emits only java 8 class files

👍 8
danboykis17:08:10

since hooks are deprecated what is the recommended replacement(s)?

mikerod18:08:27

It’s more that it is a brittle/fragile thing to do - and lein shouldn’t go out of it’s way to explicitly support it

mikerod18:08:48

I believe that’s the idea. You can still use hooks yourself from within a plugin, but it’s definitely better to try to avoid it if you can get the functionality another way

mikerod18:08:00

this is my take on it. I don’t think there is an easy answer to what “replaces” it

mikerod18:08:53

sometimes the reason you use a hook is because the lib/api you are using doesn’t give you enough “granularity” (or should I say “hooks”) to tweak the behavior you want. in that case, perhaps try using the lib different, not at all/an alternative impl, or ask for changes?

mikerod18:08:23

hooks seem to me to be a somewhat structured way to alter-var-root on arbitrary internal impl details of libs - aka monkey patching