This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-11
Channels
- # aleph (3)
- # beginners (42)
- # cider (219)
- # cljs-dev (39)
- # cljsjs (19)
- # cljsrn (3)
- # clojure (97)
- # clojure-canada (12)
- # clojure-dev (14)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (3)
- # clojure-uk (140)
- # clojurescript (52)
- # clojutre (2)
- # cursive (2)
- # datomic (29)
- # docs (1)
- # duct (13)
- # emacs (19)
- # fulcro (8)
- # funcool (2)
- # graphql (26)
- # hyperfiddle (1)
- # luminus (9)
- # nyc (7)
- # off-topic (26)
- # om (21)
- # onyx (19)
- # overtone (1)
- # pedestal (4)
- # re-frame (10)
- # reagent (109)
- # ring (5)
- # rum (15)
- # shadow-cljs (120)
- # spacemacs (22)
- # specter (7)
- # vim (10)
This is a question that is hard to search phrase correctly: There have been issues using a higher version JDK to compile to a lower JRE target. For example using JDK8 javac with target and source set to something lower like 1.7 Here is an example of such a case http://www.draconianoverlord.com/2014/04/01/jdk-compatibility.html My question then relates to how clojure 1.9 and lower, uses ASM to target a lower classfile format. Clj has a 1.6 min, but I think the classfile format is 1.5 (doesn’t matter here necessarily). However, similar to javac, could the resulting bytecode still be invalid on an older jre due to issues like missing classes/base classes etc?
yes if you write code in 1.9 that depends on classes from 1.x you won’t be able to load it in 1.(x-1)
If you see the link I showed. It is things like “hidden” base class dependencies changing and that sort of thing
Like a somewhat of a “impl detail” in java.reflect causes unexpected bytecode reference differences.
clojure 1.6 through 1.9 used target jvm 1.6 bytecode clojure 1.10 is now using target jvm 1.8 bytecode
https://github.com/clojure/clojure/commit/38705b49fd3dbae11e94c576ef49ff3eb1c47395 the .java code was 1.6 target previously, everything else was 1.5
ah, good call. that was an oversight in clojure 1.6
in general, javac and jdk are careful about this stuff and clojure is as well, but yes there could be subtle issues due to jdk changes.